SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add read groups in .bam file from 454 sequencing Maulik23 Bioinformatics 1 12-26-2012 08:03 AM
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
basic question about read groups efoss Bioinformatics 2 10-19-2011 04:32 PM
missing read groups for unaligned reads gfmgfm Bioinformatics 2 01-20-2011 05:49 AM

Reply
 
Thread Tools
Old 11-08-2013, 04:49 AM   #1
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default How to correctly choose Read Groups ?

Hello !

I need to add read groups to my BAM files before merging and variant calling with GATK.
Do you have any advice ?

I will use AddOrReplaceReadGroups.jar (picard) and plan to fill in the following tags : ID, library (LB), sequencing platform=Illumina (PL), and sample (SM).
Am I missing another important tag ?

Also, if I understand well, the ID should be unique to a sample, lane and sequencing experiment ?

Thanks,

Muriel
MurielGB is offline   Reply With Quote
Old 11-08-2013, 05:56 AM   #2
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default

I use a different read-group for each pair of (paired-end) fastq, even if they belong to the same lane/lib/sample etc...: in the end I can find the FASTQ from a given SAM-Record. My scripts look like this:

Code:
(...)
(bwa...) -r "@RG	ID:${pair.generateId}	LB:${pair.sample.lib}	SM:${pair.sample.name}	PL:ILLUMINA	PU:${pair.lane}" \
(...)
lindenb is offline   Reply With Quote
Old 11-08-2013, 06:02 AM   #3
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default

OK thanks !

But since I already used bwa to generate the BAM file for each sample which corresponds to the alignement of forward, reverse and single reads, how can I do this ?
I don't think I can separate those three groups in a BAM file can I ?
Because I juste wanted to use AddOrReplaceReadGroups and not to re-use bwa (which would be much longer...)

Next time, I will know that I should have specified the RG before but what about those already mapped reads ?

Thanks !
MurielGB is offline   Reply With Quote
Old 11-08-2013, 06:06 AM   #4
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default

if you already have one BAM per sample you can just add one distinct ID for each file.
lindenb is offline   Reply With Quote
Old 11-08-2013, 06:09 AM   #5
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default

OK, I will re-map then :/

So, according to your method, you define pair.generateId, pair.sample.lib etc.. at the beginning of the script so that after you can use this line right ?
Sorry, I am not only new in NGS, I am also new in bash scripting

Muriel
MurielGB is offline   Reply With Quote
Old 11-08-2013, 06:16 AM   #6
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default

Quote:
define pair.generateId, pair.sample.lib etc.. at the beginning of the script so that after you can use this line right ?
yes.

I use https://github.com/lindenb/jvarkit/wiki/Illuminadir to generate a JSON description of my FASTQs and I then use https://github.com/lindenb/jsvelocity to generate my scripts.
lindenb is offline   Reply With Quote
Old 11-08-2013, 06:19 AM   #7
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default

OK ! Thanks a lot for your help !!
MurielGB is offline   Reply With Quote
Old 11-08-2013, 06:58 AM   #8
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default

Hey I come back to you since I had a look on bwa.
I seems that naming RG with bwa is during the process sampe and samse.
But during sampe you give both forward and reverse fastq files at the same time so how can you give different read names to F and R ?
MurielGB is offline   Reply With Quote
Old 11-08-2013, 07:02 AM   #9
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default

the option '-r' is set during bwa sampe: you can give only one group for both direction. You can later find the orientation using the sam flag.
lindenb is offline   Reply With Quote
Old 11-08-2013, 07:03 AM   #10
MurielGB
Member
 
Location: Montpellier, France

Join Date: Oct 2013
Posts: 51
Default

Aaaah ok !
Thanks !
MurielGB 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 11:14 PM.


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