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
                        New Genomics Technologies Take Aim at Long-Standing Limits
                        by SEQadmin2


                        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                        ...
                        Yesterday, 10:25 AM
                      • SEQadmin2
                        How Immunogenomics Decodes Immunity’s Genetic Blueprint
                        by SEQadmin2




                        The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

                        This convergence of genetics, immunology, and computation...
                        09-01-2026, 05:41 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, Today, 09:51 AM
                      0 responses
                      7 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 09-25-2026, 09:06 AM
                      0 responses
                      31 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 09-23-2026, 11:05 AM
                      0 responses
                      26 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 09-18-2026, 11:37 AM
                      1 response
                      46 views
                      0 reactions
                      Last Post pekgio
                      by pekgio
                       
                      Working...