Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmccabe
    Senior Member
    • Jul 2012
    • 355

    #1

    Add read group to bam

    I am running the AddOrReplaceReadGroups and do not know what to put for the items in bold. This is PE data from an Illumina NextSeq. The bam file name is long (I tend to name them with what has been done so far):

    Code:
    dedup_sorted_mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam
    Code:
    # fix the read groups
    java -jar picard.jar AddOrReplaceReadGroups \
        I= reads_without_RG.bam \
        O=  reads_with_RG.bam \
        SORT_ORDER=coordinate \
       [B]RGID=foo \ [/B]
       [B]RGLB=bar \[/B]
       [B]RGPL=illumina \ [/B]
       [B]RGSM=Sample1 \[/B]
        CREATE_INDEX=True
    Thank you .
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    They can all be whatever you want. I tend to use the same thing for SM, ID and LB, which works unless you make multiple libraries from samples or run them at multiple times. PL is fine as "illumina".

    Comment

    • cmccabe
      Senior Member
      • Jul 2012
      • 355

      #3
      This is one library, but in the future they will be barcoded. I am new to Illumina data and getting used to it. Thank you .

      Code:
         RGID=NextSeq \     (identifier)
         RGLB=IDP \            (library method)
         RGPL=illumina \      (platform)
         RGSM=NA12878 \   (sample)

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        @Devon: Do you always use them? They are not strictly needed (except GATK tools, are there other programs?).

        Comment

        • Bukowski
          Senior Member
          • Jan 2010
          • 388

          #5
          Originally posted by GenoMax View Post
          @Devon: Do you always use them? They are not strictly needed (except GATK tools, are there other programs?).
          I thought GATK was the entire reason AddOrReplaceReadGroups existed

          Comment

          • cmccabe
            Senior Member
            • Jul 2012
            • 355

            #6
            I went ahead and tried the below and get a RGPU required error but there is no mention of that on the GATK website. Thank you .

            Code:
            cmccabe@DTV-A5211QLM:~/Desktop/NGS$ java -jar /home/cmccabe/Desktop/NGS/picard-tools-1.139/picard.jar AddOrReplaceReadGroups \
            > I=/home/cmccabe/Desktop/NGS/picard-tools-1.139/dedup_sorted_mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam \
            > O=/home/cmccabe/Desktop/NGS/picard-tools-1.139/RG_dedup_sorted_mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam \
            > SORT_ORDER=coordinate \
            > RGID=NextSeq \
            > RGLB=IDP \
            > RGPL=illumina \
            [B]> RGPU=R1 \[/B]
            > RGSM=NA12878 \
            > CREATE_INDEX=True
            ERROR: Option 'RGPU' is required.
            Edit: I added the RGPU as R1 (FASTQ files were all labled R1_S1 or R1_S2, so I figured R1 was the lane and the S1 or S2 referred to the diirection)
            Last edited by cmccabe; 11-04-2015, 12:35 PM. Reason: added edit

            Comment

            • Bukowski
              Senior Member
              • Jan 2010
              • 388

              #7


              RGPU (String) Read Group platform unit (eg. run barcode) Required.

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                Originally posted by Bukowski View Post
                I thought GATK was the entire reason AddOrReplaceReadGroups existed
                It does feel like it since that is the only time I have used that tool.

                Comment

                • cmccabe
                  Senior Member
                  • Jul 2012
                  • 355

                  #9
                  Thank you

                  Comment

                  • dpryan
                    Devon Ryan
                    • Jul 2011
                    • 3478

                    #10
                    @Genomax: Our mapping pipeline automatically adds them, since Picard will bork (or at the very least complain) occasionally without them too. When I need to manually do the alignment I never add them...unless I need to use GATK :P

                    @cmccabe: One warning about using "NextSeq" as the ID is that the ID is the only value that MUST be unique when you compare multiple BAM files. Just keep that in mind before you get in the habit of assigning RGID.

                    Comment

                    • cmccabe
                      Senior Member
                      • Jul 2012
                      • 355

                      #11
                      Good to know... thank you very much .

                      Comment

                      Latest Articles

                      Collapse

                      • SEQadmin2
                        16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                        by SEQadmin2




                        NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                        Today, 06:46 AM
                      • SEQadmin2
                        Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                        by SEQadmin2



                        Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                        Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                        ...
                        10-14-2026, 09:55 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, 10-28-2026, 09:57 AM
                      0 responses
                      24 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 10-28-2026, 09:51 AM
                      0 responses
                      15 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 10-22-2026, 11:13 AM
                      0 responses
                      68 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 10-22-2026, 10:48 AM
                      0 responses
                      48 views
                      0 reactions
                      Last Post SEQadmin2  
                      Working...