This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using Gatk If I Have No Read Group Information

To use GATK for SNP-calling, we need read group info in the header. But what if we have no such info?

I've got several bam files from other collaborator without knowing any info of, say, which lane or libraries the sequence come from. In such circumstances, we simply regard all alignment in the bam file as from the same lane of same library?

And we just insert a line into the header like:

@RG ID:filename SM:filename LB:filename PL:Illumina

? thx

gatk

2 answers

use picard AddOrReplaceReadGroups ( http://picard.sourceforge.net/command-line-overview.shtml#AddOrReplaceReadGroups ) to add a simple group to your bam.

Yeah, it's working. But my bam file is 100GB; and seems it's rebuilding the whole file, which takes a long time.

The read group information has to be added to each read (RG:Z:your_RG_ID) so it needs to reprocess the entire file. Per-read run groups allow a BAM file to contain multiple RGs, but it's extra work when fixing up BAMs with missing information.

You can use GATK's --default_read_group flag and set it to anything you'd like

Andreas

Sorry I cannot find it....

Oops...seems that option is gone from newer versions of GATK. No idea why they would delete it

Log in to answer this question.