Incremental Additions To An Indexed Bam File?
Is there a way to incrementally add entries to an indexed BAM file in a scalable way? Or will the reindexing take longer and longer every time?
• 2,360 views
•
link
2 answers
Indexed bam files must be sorted by their target ID and positions, therefore, when you append additional alignments to the file they will not be properly sorted. Your only option is to sort the file you want to merge, use samtools merge and then index the new file.
• 2 views
•
link
I think you need to merge the new BAM file with the old and then reindex. I have not seen any shortcuts but would love to hear if someone has one.
• 1 views
•
link
Log in to answer this question.