Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools "is recognized as '*'" "truncated file" error axiom7 Bioinformatics 3 11-26-2014 03:53 AM
Picard Tools "loaded 0 genes" ckrna Bioinformatics 3 02-08-2012 12:26 PM
picard: "No enum const clas" error mrfox Bioinformatics 1 04-17-2011 02:36 PM
tophat v1.1.1 - "warning: multiple closures found for read" cs Bioinformatics 1 11-02-2010 08:02 AM
TopHat "accepted_hits.sam" header line sunnyvu Bioinformatics 1 04-02-2010 09:05 AM

Thread Tools
Old 02-18-2011, 05:44 PM   #1
Location: USA

Join Date: Oct 2009
Posts: 41
Default Error "RG ID on SAMRecord not found in header" from Picard's MarkDuplicates.jar‏

I am trying the following command:

java -Xmx4g -jar /home/picard-tools-1.35/MarkDuplicates.jar INPUT=$dir/input.bam OUTPUT=$dir/output.bam TMP_DIR=/home/temp METRICS_FILE=PCR_duplicates REMOVE_DUPLICATES=true ASSUME_SORTED=true VALIDATION_STRINGENCY=LENIENT

And getting lots of errors like "RG ID on SAMRecord not found in header".

The command is still running and I haven't seen output.bam coming out... From what I saw previously, it is most likely that I will end up getting no output when the command stops.

I used BWA for reads mapping, then SAMtools for sorting reads and merge reads from different lanes or different Illumina flowcells. For each bam file, I used the corresponding flowcell name as the prefix, e.g., FC124_1_sorted.bam.

Since I merged different flowcells from the same Illumina machine, I used "samtools merge -r". Based on SAMtools manual, "merge -r" can attach an RG tag to each alignment. The tag value is inferred from file names.

I am running commands in a cluster node which has 4GB RAM and 10Tb space and I assume the memory and space should be enough for picard.

Anyone knows how to fix the error "RG ID on SAMRecord not found in header"?


cliff is offline   Reply With Quote
Old 02-19-2011, 09:06 AM   #2
Location: Gothenburg/Uppsala, Sweden

Join Date: Oct 2010
Posts: 82

Is there a line describing the read groups in your SAM header? (you can view the header on a bam file using e.g. samtools view -H)
gaffa is offline   Reply With Quote
Old 11-10-2011, 02:00 AM   #3
Location: Seoul, South Korea

Join Date: Oct 2011
Posts: 30

I used picard AddOrReplaceReadGroups.jar on this problem.

I think samtools also can add (actually, replace: by samtools reheader) read groups to your bam file.

For example:
java -Xmx4g -jar /home/lab/bin/picard/AddOrReplaceReadGroups.jar VALIDATION_STRINGENCY=LENIENT VERBOSITY=ERROR SO=unsorted OUTPUT=sample.rga.bam RGPL=illumina RGLB=sm_1110 RGPU=barcode_1110 RGSM=sample_1110
Any other ideas?

Last edited by alexbmp; 11-10-2011 at 02:20 AM.
alexbmp is offline   Reply With Quote
Old 11-10-2011, 03:47 AM   #4
Senior Member
Location: Sweden

Join Date: Mar 2008
Posts: 324

Use picard's MergeSam rather than samtools merge if the files have different headers.
Chipper is offline   Reply With Quote
Old 11-10-2011, 04:27 AM   #5
Location: Seoul, South Korea

Join Date: Oct 2011
Posts: 30

@ Chipper

Yes, I also agree using picard MergeSam instead of samtools merge.

However I found a case that picard MergeSam doesn't take many inputs (500 inputs) when options are default.

So in that case I used samtools merge (the files were split; they ought to have the same header).
alexbmp is offline   Reply With Quote

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 07:32 PM.

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