no,I just copy someone else's code,because it is the first time to use that for me.
• 0 views
•
link
Hi, there is an error occuring after the following command
[E::hts_idx_push] Unsorted positions on sequence #4: 27130750 followed by 27130362
samtools index: failed to create index for "1_sorted.bam"
and my samtools sort command is
samtools sort 1_raw.bam -n -m 2G -@ 4 -o 1_sorted.bam
[bam_sort_core] merging from 8 files and 4 in-memory blocks...
I want to know where is the problem,who can give we some advice on the error??
Log in to answer this question.
(remove the
-noption); It is because the-noption is sorted by name.Index, requires the bam file sorted by Coordinates.
See the manual of samtools: http://www.htslib.org/doc/samtools-index.html
thank you,I have solved the problem according to your requirements