Hello John, On 05/11/15 21:49, John Marshall wrote: > Hello Michael, > > On 5 Nov 2015, at 16:56, Michael Nuhn <mn...@ebi.ac.uk> wrote: >> I am using samtools 1.2. When I run the index command like this: >> >> /software/ensembl/funcgen/samtools index >> /lustre/scratch109/ensembl/funcgen/mn1/problem_bam/HEL9217:hist:BR2_WCE_3526_bwa_samse_1.unfiltered.bam >> >> samtools instantly terminates and generates no output. The exit code >> does not indicate a failure > > The lack of error reporting here is something that has been improved since > 1.2. Samtools built from the current develop branch reports for this file: > > [bam_index] corrupted or unsorted input file > > and exits with failure. This was > https://github.com/samtools/samtools/issues/362 .
Ok, cool, I have to try that. > >> -rw-r--r-- 1 mn1 ebiusers 34G Nov 5 11:20 >> /lustre/scratch109/ensembl/funcgen/mn1/problem_bam/HEL9217:hist:BR2_WCE_3526_bwa_samse_1.unfiltered.bam >> >> and has headers and alignments in it. The bam file is generated by picard. > > In this case, I suspect the problem is that your file is actually a SAM file! > This can't be indexed with samtools index, and I'll change the message for > this case to make it easier to diagnose. (A bgzipped SAM file could be > indexed with tabix, but unfortunately such an index can't be used with > "samtools view FILE REGION".) Indeed it is! Thanks, that explains a lot. Cheers, Michael. > John > ------------------------------------------------------------------------------ _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help