SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
GATK sample/library/lane meaning in BAM read group @RG Sylphide Bioinformatics 6 05-27-2014 08:20 AM
converting bam files to non-normalized read counts lpn Bioinformatics 4 10-09-2012 07:52 PM
adding platform information to a bam file efoss Bioinformatics 2 09-12-2011 10:22 AM
Consensus part from sequence read(fastq) and align(BAM) files culmen Bioinformatics 5 12-21-2010 03:57 AM
Adding read group and Platform information sbaheti Bioinformatics 2 09-25-2010 10:47 AM

Reply
 
Thread Tools
Old 02-23-2015, 04:46 AM   #41
sarvidsson
Senior Member
 
Location: Berlin, Germany

Join Date: Jan 2015
Posts: 137
Default

Quote:
Originally Posted by kapr0007 View Post
Hi, this is the command i used

perl -e ’print "@RG\tID:FP\tSM:F11-12\tLB:FP\tPL:Illumina\n@RG\tID:FP\tSM:L6-6\tLB:FP\tPL:Illumina\n"’ > rg1.txt
samtools merge -rh rg1.txt merged_f11-l6 l6-6.bam f11-12.bam
Check your rg1.txt, you need to escape the '@'s:

Code:
perl -e ’print "\@RG\tID:FP\tSM:F11-12\tLB:FP\tPL:Illumina\n\@RG\tID:FP\tSM:L6-6\tLB:FP\tPL:Illumina\n"’ > rg1.txt
gives a correct header file. I guess you can leave out "-r" in the samtools call, didn't test that however (given that the single files have correctly set read groups already, if not you can skip the -h and the rg1.txt file and only use the -r feature).

Last edited by sarvidsson; 02-23-2015 at 04:54 AM.
sarvidsson is offline   Reply With Quote
Old 02-23-2015, 05:03 AM   #42
kapr0007
Junior Member
 
Location: sweden

Join Date: Oct 2014
Posts: 5
Default

thanks for you quick reply,

my rg.txt is ID:FP SM:F11-12 LB:FP PL:Illumina
ID:FP SM:L6-6 LB:FP PL:Illumina

with your code "\@RG... looks like. should it be like this?

@RG ID:FP SM:F11-12 LB:FP PL:Illumina
@RG ID:FP SM:L6-6 LB:FP PL:Illumina

with try leaving -r in samtools,

appreciate your quick reply
kapr0007 is offline   Reply With Quote
Old 02-23-2015, 05:16 AM   #43
sarvidsson
Senior Member
 
Location: Berlin, Germany

Join Date: Jan 2015
Posts: 137
Default

Quote:
Originally Posted by kapr0007 View Post
thanks for you quick reply,

my rg.txt is ID:FP SM:F11-12 LB:FP PL:Illumina
ID:FP SM:L6-6 LB:FP PL:Illumina

with your code "\@RG... looks like. should it be like this?

@RG ID:FP SM:F11-12 LB:FP PL:Illumina
@RG ID:FP SM:L6-6 LB:FP PL:Illumina

with try leaving -r in samtools,

appreciate your quick reply
Yes, that looks OK. Varsågod!
sarvidsson 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 03:53 AM.


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