Hi all,

I have been looking in various forums, yet I didn't find any answer to my
troubles using samtools index:

Briefly, I'm aligning small fastq file to a reference genome using BWA. I
then create a bam file from the sam BWA output, sort the sam file and try
to index the bam file, but I always have this error message:

[E::hts_idx_push] NO_COOR reads not in a single block at the end 0 -1

Here are the command lines I used:

bwa mem -t 8 -k 19 -c 500 -O 0,0 -E 2,2 -v 1 -T 10 "$GENOME_INDEX"
"$FILE_REP"/P1_001.fq > P1_001.sam

samtools view -Sb P1_001.sam > P1_001.bam

samtools sort P1_001.bam P1_001.sorted

samtools index -b P1_001.sorted.bam

My bam file looks sorted tho:

@HD VN:1.3 SO:coordinate
@SQ SN:chrUn LN:1110957068
@SQ SN:chrUn_1 LN:46845775
@SQ SN:chrUn_10 LN:34542469

Does anyone have already experienced this issue ?

Regards,

J.
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to