Entering edit mode
4.9 years ago
manubiomed20
▴
10
I made a complete genome assembly and then tried to generate a bai using this command (with the file path):
samtools index /home/ims.santos06/bam/SRR062634.bam/home/ims.santos06/bam/SRR062634.bam.bai
but it did not work because of this error:
[E :: hts_idx_push] Unsorted positions on sequence # 6: 68538456 followed by 68538386
samtools index: failed to create index for "/home/ims.santos06/bam/SRR062634.bam".
Was it a mistake in the assembly? How do I solve this problem?
A message to both manubiomed20 and darbinator :
Please use the formatting bar (especially the
code
option) to present your post better. You can use backticks for inline code (`text` becomestext
), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.Indexing automatically generates a file which ends in
.bai
and uses the name of the BAM file you used as an input forsamtools index
.