Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • seq_GA
    Senior Member
    • Feb 2009
    • 124

    Gatk multiSample realignment and recalibration

    Hi,
    I have used gatk for single sample realignment followed by recalibration. I want to try multi sample realignment and recalibration as mentioned in the best practice page http://www.broadinstitute.org/gsa/wi...th_the_GATK_v2
    The example doesn't show how to use the commandline.
    Has anyone used this feature? If so can you please share the command line for gatk to call this? Thanks.
  • fpepin
    Member
    • Feb 2011
    • 30

    #2
    Is this what you have in mind? http://www.broadinstitute.org/gsa/wi..._around_indels

    Score recalibration can be found at http://www.broadinstitute.org/gsa/wi..._recalibration

    I could offer more details, but they're simply saying it better (and more completely) than I could.

    Comment

    • seq_GA
      Senior Member
      • Feb 2009
      • 124

      #3
      Thanks for your response. Right now I am using the following commandline to do realignment and recalibration sample by sample.

      Code:
      java -Xmx4g -jar /tools/GenomeAnalysisTK-1.0.4013/GenomeAnalysisTK.jar -T RealignerTargetCreator -I test_PCR_removed_sorted.bam -R /Genome/hg19/hg19.fa -o output.intervals 
      
      echo "GATK run realigner"
      java -Xmx4g -jar /tools/GenomeAnalysisTK-1.0.4013/GenomeAnalysisTK.jar -T IndelRealigner -U -S Silent -I test_PCR_removed_sorted.bam -R /Genome/hg19/hg19.fa -targetIntervals output.intervals --output test_reAligned.bam
      
      echo "GATK Count covariates and generate csv"
      java -Xmx4g -jar /tools/GenomeAnalysisTK-1.0.4013/GenomeAnalysisTK.jar -R /Genome/hg19/hg19.fa --DBSNP /GATK/latest_GATK/resources/dbsnp_129_b37.rod -I test_reAligned_sorted.bam --max_reads_at_locus 20000 --default_platform illumina -T CountCovariates -cov ReadGroupCovariate -cov CycleCovariate -cov DinucCovariate -recalFile test_recal.csv
      
      echo " GATK re-calibration"
      java -Xmx4g -jar /tools/GenomeAnalysisTK-1.0.4013/GenomeAnalysisTK.jar -R /Genome/hg19/hg19.fa -I test_reAligned_sorted.bam -T TableRecalibration --default_platform illumina -outputBam test_reAligned_reCal.bam -recalFile test_recal.csv
      But I am interested in Best: multi-sample realignment with known sites and recalibration as mentioned here http://www.broadinstitute.org/gsa/wi..._recalibration

      How to implement the following.
      Code:
      for each sample
          lanes.bam <- merged lane.bam's for sample
          dedup.bam <- MarkDuplicates(lanes.bam)
      
      samples.bam <- merged dedup.bam's for all samples
      realigned.bam <- realign(samples.bam)
      recal.bam <- recal(realigned.bam)
      Please let me know whether my intrepretation as below is correct.
      1. Merge all lane for each sample bam file.
      2. Mark duplicates of sample bam
      3. Merge all the sample dedup bams
      4. Call realignment
      5. Call recalibration.
      Thanks.

      Comment

      • fpepin
        Member
        • Feb 2011
        • 30

        #4
        I'm not an expert, but that does sound reasonable (and very close to what I have). I also call the indel discovery tool before the realignment to get additional regions to focus on.

        I use Picard for the duplicate removal:
        Code:
        java -Xmx8g -jar MarkDuplicates.jar I=bamFile O=bamDupRemFile \ 
        M=duplicateMetricsFile VALIDATION_STRINGENCY=SILENT ASSUME_SORTED=true \
        REMOVE_DUPLICATES=true
        Merging can be done with samtools:
        Code:
        samtools merge mergedBam bam1 bam2 bam3
        Unfortunately, you'll need to redo the header as it will only use the header from the first bam file and it will miss the @RG from the others. Hopefully I'm behind in the news and someone can mention an easy tool to do it, I just have a bit of perl code to do it. I can post it here if you want.

        Comment

        • mard
          Member
          • Jan 2010
          • 21

          #5
          Originally posted by fpepin View Post

          Unfortunately, you'll need to redo the header as it will only use the header from the first bam file and it will miss the @RG from the others. Hopefully I'm behind in the news and someone can mention an easy tool to do it, I just have a bit of perl code to do it. I can post it here if you want.
          Picard's MergeSamFiles will merge multiple BAM files and add all @RGs to the header of the merged BAM.

          Comment

          • seq_GA
            Senior Member
            • Feb 2009
            • 124

            #6
            Thanks Mard for the info.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
              by SEQadmin2


              Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


              The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
              ...
              Yesterday, 10:05 AM
            • SEQadmin2
              Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
              by SEQadmin2


              With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


              Introduction

              Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
              05-22-2026, 06:42 AM
            • SEQadmin2
              Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
              by SEQadmin2

              Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


              Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
              05-06-2026, 09:04 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 12:03 PM
            0 responses
            19 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, Yesterday, 11:40 AM
            0 responses
            14 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 05-28-2026, 11:40 AM
            0 responses
            29 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 05-26-2026, 10:12 AM
            0 responses
            31 views
            0 reactions
            Last Post SEQadmin2  
            Working...