Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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"?


    Thanks

    -C

  • #2
    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)

    Comment


    • #3
      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 INPUT=sample.cat.pic 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, 02:20 AM.

      Comment


      • #4
        Use picard's MergeSam rather than samtools merge if the files have different headers.

        Comment


        • #5
          @ 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).

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Techniques and Challenges in Conservation Genomics
            by seqadmin



            The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

            Avian Conservation
            Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
            03-08-2024, 10:41 AM
          • seqadmin
            The Impact of AI in Genomic Medicine
            by seqadmin



            Artificial intelligence (AI) has evolved from a futuristic vision to a mainstream technology, highlighted by the introduction of tools like OpenAI's ChatGPT and Google's Gemini. In recent years, AI has become increasingly integrated into the field of genomics. This integration has enabled new scientific discoveries while simultaneously raising important ethical questions1. Interviews with two researchers at the center of this intersection provide insightful perspectives into...
            02-26-2024, 02:07 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 03-14-2024, 06:13 AM
          0 responses
          34 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 03-08-2024, 08:03 AM
          0 responses
          72 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 03-07-2024, 08:13 AM
          0 responses
          81 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 03-06-2024, 09:51 AM
          0 responses
          68 views
          0 likes
          Last Post seqadmin  
          Working...
          X