Seqanswers Leaderboard 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

            • seqadmin
              Pathogen Surveillance with Advanced Genomic Tools
              by seqadmin




              The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
              03-24-2025, 11:48 AM
            • seqadmin
              New Genomics Tools and Methods Shared at AGBT 2025
              by seqadmin


              This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

              The Headliner
              The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
              03-03-2025, 01:39 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 03-20-2025, 05:03 AM
            0 responses
            41 views
            0 reactions
            Last Post seqadmin  
            Started by seqadmin, 03-19-2025, 07:27 AM
            0 responses
            49 views
            0 reactions
            Last Post seqadmin  
            Started by seqadmin, 03-18-2025, 12:50 PM
            0 responses
            36 views
            0 reactions
            Last Post seqadmin  
            Started by seqadmin, 03-03-2025, 01:15 PM
            0 responses
            191 views
            0 reactions
            Last Post seqadmin  
            Working...