Unconfigured Ad

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

    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

                      • mylaser
                        Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                        by mylaser
                        Kheloyaar: The Complete Guide to Kheloyaar Loginand Kheloyaar ID
                        The online gaming industry has transformed the way people enjoy digital entertainment. As technology continues to improve, players are looking for platforms that offer convenience, security, and a seamless user experience. Kheloyaarhas gained attention among users who value an easy-to-use platform, quick account access, and a simple registration process.
                        Whether you're exploring Kheloyaar for the first time or want to understand...
                        Today, 09:27 PM
                      • SEQadmin2
                        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                        by SEQadmin2



                        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                        ...
                        Today, 11:10 AM
                      • SEQadmin2
                        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                        by SEQadmin2



                        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                        Yesterday, 05:17 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, Today, 10:04 AM
                      0 responses
                      8 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, Yesterday, 10:08 AM
                      0 responses
                      7 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 07-07-2026, 11:05 AM
                      0 responses
                      9 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 07-02-2026, 11:08 AM
                      0 responses
                      31 views
                      0 reactions
                      Last Post SEQadmin2  
                      Working...