Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MurielGB
    Member
    • Oct 2013
    • 51

    #1

    How to correctly choose Read Groups ?

    Hello !

    I need to add read groups to my BAM files before merging and variant calling with GATK.
    Do you have any advice ?

    I will use AddOrReplaceReadGroups.jar (picard) and plan to fill in the following tags : ID, library (LB), sequencing platform=Illumina (PL), and sample (SM).
    Am I missing another important tag ?

    Also, if I understand well, the ID should be unique to a sample, lane and sequencing experiment ?

    Thanks,

    Muriel
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    I use a different read-group for each pair of (paired-end) fastq, even if they belong to the same lane/lib/sample etc...: in the end I can find the FASTQ from a given SAM-Record. My scripts look like this:

    Code:
    (...)
    (bwa...) -r "@RG	ID:${pair.generateId}	LB:${pair.sample.lib}	SM:${pair.sample.name}	PL:ILLUMINA	PU:${pair.lane}" \
    (...)

    Comment

    • MurielGB
      Member
      • Oct 2013
      • 51

      #3
      OK thanks !

      But since I already used bwa to generate the BAM file for each sample which corresponds to the alignement of forward, reverse and single reads, how can I do this ?
      I don't think I can separate those three groups in a BAM file can I ?
      Because I juste wanted to use AddOrReplaceReadGroups and not to re-use bwa (which would be much longer...)

      Next time, I will know that I should have specified the RG before but what about those already mapped reads ?

      Thanks !

      Comment

      • lindenb
        Senior Member
        • Apr 2010
        • 143

        #4
        if you already have one BAM per sample you can just add one distinct ID for each file.

        Comment

        • MurielGB
          Member
          • Oct 2013
          • 51

          #5
          OK, I will re-map then :/

          So, according to your method, you define pair.generateId, pair.sample.lib etc.. at the beginning of the script so that after you can use this line right ?
          Sorry, I am not only new in NGS, I am also new in bash scripting

          Muriel

          Comment

          • lindenb
            Senior Member
            • Apr 2010
            • 143

            #6
            define pair.generateId, pair.sample.lib etc.. at the beginning of the script so that after you can use this line right ?
            yes.

            I use https://github.com/lindenb/jvarkit/wiki/Illuminadir to generate a JSON description of my FASTQs and I then use https://github.com/lindenb/jsvelocity to generate my scripts.

            Comment

            • MurielGB
              Member
              • Oct 2013
              • 51

              #7
              OK ! Thanks a lot for your help !!

              Comment

              • MurielGB
                Member
                • Oct 2013
                • 51

                #8
                Hey I come back to you since I had a look on bwa.
                I seems that naming RG with bwa is during the process sampe and samse.
                But during sampe you give both forward and reverse fastq files at the same time so how can you give different read names to F and R ?

                Comment

                • lindenb
                  Senior Member
                  • Apr 2010
                  • 143

                  #9
                  the option '-r' is set during bwa sampe: you can give only one group for both direction. You can later find the orientation using the sam flag.

                  Comment

                  • MurielGB
                    Member
                    • Oct 2013
                    • 51

                    #10
                    Aaaah ok !
                    Thanks !

                    Comment

                    Latest Articles

                    Collapse

                    • 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
                    • 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
                      ...
                      09-28-2026, 10:25 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, 10-15-2026, 10:52 AM
                    0 responses
                    23 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 10-14-2026, 05:39 AM
                    0 responses
                    27 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 10-13-2026, 09:56 AM
                    0 responses
                    24 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 10-09-2026, 11:14 AM
                    0 responses
                    28 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...