SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   basic question about read groups (http://seqanswers.com/forums/showthread.php?t=14857)

efoss 10-18-2011 02:05 PM

basic question about read groups
 
I have run into problems in which GATK complains that my bam file is malformed because it's missing read group information. I have fixed this by going back to the "sampe" step in bwa and adding a "-r" option and today for the first time I'm trying to fix this with PicardTools' "AddOrReplaceReadGroups" tool. But these tools take quite a long time to run. Would there be anything wrong with simply adding the read group information manually at the top of a sam file and then converting that sam file to a bam file? I guess I don't know if there is anything more to the read group than a line near the beginning of a sam file or whether instead adding read group information with a bwa tool or a PicardTools tool is doing something more involved (e.g. somehow embedding read group information in multiple places in the sam/bam file).

Thank you.

Eric

maubp 10-19-2011 01:11 AM

In addition to the @RG line in the SAM header, every single read belonging to that read group has to declare this in its tags - and that part means adding this requires a lot of IO and will be comparatively slow.

If all you want to do is add some information to an existing read group, you just need to edit the SAM header. Using samtools reheader let's you modify this efficiently in a BAM file.

efoss 10-19-2011 05:32 PM

Quote:

Originally Posted by maubp (Post 54346)
In addition to the @RG line in the SAM header, every single read belonging to that read group has to declare this in its tags - and that part means adding this requires a lot of IO and will be comparatively slow.

If all you want to do is add some information to an existing read group, you just need to edit the SAM header. Using samtools reheader let's you modify this efficiently in a BAM file.

Thanks. That makes sense.

Eric


All times are GMT -8. The time now is 03:42 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.