Split BAM file into parts with headers rebuilt
0
1
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?

RNA-Seq BAM split contigs • 1.5k views
ADD COMMENT
0
Entering edit mode

and I also need the header to be rebuilt to include only the contigs relevant to this part.

I wonder why

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

I hope you don't ever have paired-end reads with mates on different contigs...

ADD REPLY

Login before adding your answer.

Traffic: 2453 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