SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
a basic question about coverage maria_mari Bioinformatics 7 01-30-2012 03:12 PM
picard add read groups HGENETIC Bioinformatics 0 01-25-2012 03:19 AM
best-practices for assigning read-groups for snp-caller brentp Bioinformatics 2 12-20-2011 07:34 AM
depth of coverage basic question madsaan Bioinformatics 0 03-24-2011 06:40 AM
missing read groups for unaligned reads gfmgfm Bioinformatics 2 01-20-2011 05:49 AM

Reply
 
Thread Tools
Old 10-18-2011, 01:05 PM   #1
efoss
Member
 
Location: Seattle

Join Date: Jul 2011
Posts: 98
Default 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
efoss is offline   Reply With Quote
Old 10-19-2011, 12:11 AM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

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.

Last edited by maubp; 10-19-2011 at 12:12 AM. Reason: Typo
maubp is offline   Reply With Quote
Old 10-19-2011, 04:32 PM   #3
efoss
Member
 
Location: Seattle

Join Date: Jul 2011
Posts: 98
Default

Quote:
Originally Posted by maubp View Post
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
efoss is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:22 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO