Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to create refGene.txt file for bacteria, problem compliling kent source ketan_bnf Bioinformatics 11 02-11-2015 01:03 PM
Merge bam files to create a consensus? bwubb Bioinformatics 3 03-20-2012 12:40 PM
samtools sorting outfile is not as large as input file vinay052003 Bioinformatics 4 03-12-2012 10:03 AM
Are there any good ways to use SAMtools java API to convert .bam file into .txt file? alextree Bioinformatics 8 01-24-2012 10:20 AM
SAMTOOLS AND GATK input file (base qualities) hrajasim Illumina/Solexa 0 05-13-2011 06:58 AM

Thread Tools
Old 08-29-2013, 10:59 PM   #1
Junior Member
Location: Australia

Join Date: Jul 2013
Posts: 1
Default how do i create an rg.txt file for input into samtools merge? / picard


I have merged bam files from 6 lanes for a number of samples, and am trying to use picard MarkDuplicates. However, I get an error PicardException: Value was put into PairInfoMap more than once. Which I've learn is due to some issues with the read group information.

I'm planning to rerun samtools merge using the -r and -h options (ie samtools merge -rh rg.txt in1.bam in2.bam in3.bam in4.bam in5.bam in6.bam out.bam) but I'm not sure what file to use for the -h option, what needs to be included etc in the required file. Could anyone please let me know where to get the file format or what information to include?

Thanks in advance
lexi is offline   Reply With Quote
Old 08-30-2013, 12:15 AM   #2
Junior Member
Location: Finland

Join Date: Jan 2012
Posts: 8

When merging different bam files, reads from those bam files need some way to be distinguished. It can also be done by using AddOrReplaceReadGroups from picard tools (I prefer picard tools to samtools). If you use picard tools read group headers are give in commandline. As far as i remember you need to put them in file if you use Sam tools. RG is described in SAM format specification. YOu can also find read group headers in AddOrReplaceReadGroups page.

Last edited by bishwo; 08-30-2013 at 12:19 AM.
bishwo is offline   Reply With Quote
Old 08-30-2013, 04:20 AM   #3
Devon Ryan
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480

See also the same question on biostars.
dpryan is offline   Reply With Quote

bam files, merged bam, samtools

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 06:22 AM.

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