Entering edit mode
7.0 years ago
viktorfeketa
▴
30
Hi, I have a BAM file with 12000 contigs, I need to split it into several parts (let's say 12 parts with 1000 contigs each), and I also need the header to be rebuilt to include only the contigs relevant to this part. Could you please suggest a way to do that?
I wonder why
the downstream tool that I am trying to use works by loading all contigs into memory. Because this particular input has too many contigs, the tool crashes due to prohibitively high memory usage. One solution that I was advised is to split the input BAM into parts, and include only a subset of contigs in the header, so that the tool loads and works with only a subset of contigs.
I hope you don't ever have paired-end reads with mates on different contigs...