Incremental Additions To An Indexed Bam File?
2
2
Entering edit mode
13.4 years ago

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?

bam • 1.8k views
ADD COMMENT
2
Entering edit mode
13.4 years ago
Gww ★ 2.7k

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.

ADD COMMENT
1
Entering edit mode
13.4 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2489 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6