These error messages indicate that the reads are not sorted by coordinate — in particular, that the reads mapped to ScdB1pO_646;HRSCAF=880 are not all together, and that the reads at positions 11159020 < 11158717 are not sorted by position on their chromosome.
This is because samtools sort -n has been used to sort the reads by name instead. Remove -n to sort by position, which is what is needed to prepare a BAM file for indexing with samtools index.
These error messages indicate that the reads are not sorted by coordinate — in particular, that the reads mapped to ScdB1pO_646;HRSCAF=880 are not all together, and that the reads at positions 11159020 < 11158717 are not sorted by position on their chromosome.
This is because samtools sort -n has been used to sort the reads by name instead. Remove -n to sort by position, which is what is needed to prepare a BAM file for indexing with samtools index.
Thank you, it worked! As for why I used the -n flag, I am trying replicate the results of a journal article. The journal article did not provide explicit instructions for sorting/indexing the files, and this is my first time sorting/indexing files. I think "sort by reads" simply More
These error messages indicate that the reads are not sorted by coordinate — in particular, that the reads mapped to ScdB1pO_646;HRSCAF=880 are not all together, and that the reads at positions 11159020 < 11158717 are not sorted by position on their chromosome.
This is because
samtools sort -nhas been used to sort the reads by name instead. Remove-nto sort by position, which is what is needed to prepare a BAM file for indexing withsamtools index.These error messages indicate that the reads are not sorted by coordinate — in particular, that the reads mapped to ScdB1pO_646;HRSCAF=880 are not all together, and that the reads at positions 11159020 < 11158717 are not sorted by position on their chromosome.
This is because
samtools sort -nhas been used to sort the reads by name instead. Remove-nto sort by position, which is what is needed to prepare a BAM file for indexing withsamtools index.More
VOTE
VOTE
VOTE
VOTE