Split merged BAM file
1
1
Entering edit mode
10.5 years ago
crysis405 ▴ 30

I need to revert a BAM file back to FastQ. Based on the GATK guide I need to shuffle first and then convert: http://www.broadinstitute.org/gatk/guide/article?id=2908

However, they don't mention anything about merged BAM files.

How do you split a BAM file by read group information? (Is it possible with Picardtools or samtools?)

fastQ bam • 2.3k views
ADD COMMENT
1
Entering edit mode
10.5 years ago

Use SamToFastq command and set

OUTPUT_PER_RG=TRUE

http://picard.sourceforge.net/command-line-overview.shtml#SamToFastq

ADD COMMENT
0
Entering edit mode

Is there a more general utility? Like if I need to split a merged file from GATK BQSR by read group when I want to run reducedreads? Are there any alternatives to BamUtils splitBam (I am sure there must by something that the GATK team use to do this).

ADD REPLY
0
Entering edit mode

So you are not asking for something more general, you are asking for something in GATK package.

ADD REPLY
0
Entering edit mode

By more general I meant something that doesn't require me to convert SamToFastq

ADD REPLY
0
Entering edit mode

I am sorry, I dont understand. You wanted to revert a BAM file back to FastQ and SamToFastq can work with BAM files instead of SAM files as well.

ADD REPLY
0
Entering edit mode

Two independent things. I have merged BAMs so I want to split them and I want to convert BAMs to Fastq.

ADD REPLY

Login before adding your answer.

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