Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #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


      • #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


        • #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


          • #6
            Thanks Mard for the info.

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Recent Developments in Metagenomics
              by seqadmin





              Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
              09-23-2024, 06:35 AM
            • seqadmin
              Understanding Genetic Influence on Infectious Disease
              by seqadmin




              During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

              Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
              09-09-2024, 10:59 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 10-02-2024, 04:51 AM
            0 responses
            13 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-01-2024, 07:10 AM
            0 responses
            21 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 09-30-2024, 08:33 AM
            0 responses
            25 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 09-26-2024, 12:57 PM
            0 responses
            18 views
            0 likes
            Last Post seqadmin  
            Working...
            X