On 3 Dec 2014, at 18:39, Radhouane Aniba <arad...@gmail.com> wrote: > I noticed that samtools is not managing exit code for its programs the same > way
This is in general https://github.com/samtools/samtools/issues/51 . It takes somewhat disproportionate effort to fix all these as each instance reflects a separate piece of code, but we're gradually working through them. > where we have 'samtools sort' and 'samtools view' given files that do not > exist, both should return an exit code of 1 > > sort => exit code 0 > view => exit code 1 > > Any thoughts ? You are testing an old version of samtools. In the particular case of samtools sort's exit status, this was fixed a little over a year ago [1]: $ samtools-1.0 sort S222.bam S22.sorted; echo "exit code $?" [E::hts_open] fail to open file 'S222.bam' [bam_sort_core] fail to open file S222.bam exit code 1 To be sure, there is room for improvement (and deduplication) in the error message, but the exit status indicates the failure as expected. John [1] See https://github.com/samtools/samtools/commit/d60c730cb9b87cb4b0d58e3dc7c184b551607bbd -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help