From 600617a63c000f9c58648fe231e11fbb8119ba9f Mon Sep 17 00:00:00 2001 From: delangel Date: Fri, 22 Apr 2011 14:10:33 +0000 Subject: [PATCH] Enabled code to deal with hard-clipping adaptor sequence when processing reads in pileup in indel caller. Proven now that changes are minimal (4 less calls in NA12878 chr20, quals slightly different), minor changes in vcf fields in integration tests. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5679 348d0f76-0448-11de-a6fe-93d51630548a --- .../IndelGenotypeLikelihoodsCalculationModel.java | 11 ++++------- .../gatk/walkers/indels/PairHMMIndelErrorModel.java | 6 +++--- .../genotyper/UnifiedGenotyperIntegrationTest.java | 6 +++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java index e5a9927e4..78d7d14f0 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java @@ -48,19 +48,13 @@ import org.broadinstitute.sting.utils.sam.ReadUtils; import java.util.*; public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoodsCalculationModel { - private final int maxReadDeletionLength = 3; private final int HAPLOTYPE_SIZE; private final int minIndelCountForGenotyping; private final boolean getAlleleListFromVCF; - // todo - the following need to be exposed for command line argument control - private final double indelHeterozygosity = 1.0/8000; - boolean useFlatPriors = true; private boolean DEBUG = false; - // todo -cleanup - private HaplotypeIndelErrorModel model; private PairHMMIndelErrorModel pairModel; private GenomeLoc lastSiteVisited; @@ -114,7 +108,10 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood for ( ExtendedEventPileupElement p : indelPileup.toExtendedIterable() ) { - SAMRecord read = p.getRead(); + //SAMRecord read = p.getRead(); + SAMRecord read = ReadUtils.hardClipAdaptorSequence(p.getRead()); + if (read == null) + continue; if(ReadUtils.is454Read(read)) { continue; } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java index 7ca6f4964..dd81570a1 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java @@ -583,11 +583,11 @@ public class PairHMMIndelErrorModel { } } - for (SAMRecord read : pileup.getReads()) { -/* SAMRecord read = ReadUtils.hardClipAdaptorSequence(read); + for (SAMRecord pread : pileup.getReads()) { + SAMRecord read = ReadUtils.hardClipAdaptorSequence(pread); if (read == null) continue; - */ + if(ReadUtils.is454Read(read)) { continue; } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index 9ce58665b..d1f587a20 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -27,7 +27,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot1() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10,022,000-10,025,000", 1, - Arrays.asList("a2218244df08dce96d04f8736a6de796")); + Arrays.asList("02481347a19d80e09538f2f6aa1be74a")); executeTest("test MultiSample Pilot1", spec); } @@ -248,7 +248,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -glm INDEL" + " -L 1:10,000,000-10,500,000", 1, - Arrays.asList("ffeea8550a707871a68f6707159f4ea9")); + Arrays.asList("08b63c534a7e129e53cdd1527d51be5c")); executeTest(String.format("test indel caller in SLX"), spec); } @@ -277,7 +277,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -glm INDEL" + " -L 1:10,000,000-10,500,000", 1, - Arrays.asList("897057070aa2e3651d91625a58c5ec4b")); + Arrays.asList("1d1ddad622dbee7e74550b5bb9d0928f")); executeTest(String.format("test indel calling, multiple technologies"), spec); }