From 13240588cf70052c7139fa3e30b54d7fd071286f Mon Sep 17 00:00:00 2001 From: Menachem Fromer Date: Mon, 6 May 2013 13:52:14 -0400 Subject: [PATCH] Fix to only consider the samples that are both in the PED file and in the VCF file --- .../sting/gatk/walkers/phasing/PhaseByTransmission.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java index a4c1caf86..87e9a6ea0 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java @@ -450,9 +450,9 @@ public class PhaseByTransmission extends RodWalker, HashMa Set vcfSamples = SampleUtils.getSampleList(vcfRods, GATKVariantContextUtils.GenotypeMergeType.REQUIRE_UNIQUE); //Get the trios from the families passed as ped - setTrios(); + setTrios(vcfSamples); if(trios.size()<1) - throw new UserException.BadInput("No PED file passed or no trios found in PED file. Aborted."); + throw new UserException.BadInput("No PED file passed or no *non-skipped* trios found in PED file. Aborted."); Set headerLines = new HashSet(); @@ -471,9 +471,9 @@ public class PhaseByTransmission extends RodWalker, HashMa /** * Select trios and parent/child pairs only */ - private void setTrios(){ + private void setTrios(Set vcfSamples){ - Map> families = this.getSampleDB().getFamilies(); + Map> families = this.getSampleDB().getFamilies(vcfSamples); Set family; ArrayList parents; for(Map.Entry> familyEntry : families.entrySet()){