From d84444200b364534d36fb0c4f76f41494cfd96f2 Mon Sep 17 00:00:00 2001 From: ebanks Date: Fri, 20 Nov 2009 16:13:18 +0000 Subject: [PATCH] The Unified Genotyper now sorts the sample names in the vcf that it outputs. [There was no reason to enforce that every VCF being output from the GATK should have the samples sorted, since someone might want them ordered non-alphabetically] git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2102 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/genotyper/UnifiedGenotyper.java | 4 ++-- .../genotyper/UnifiedGenotyperIntegrationTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java index 7751a0ab1..36f56c3e7 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -62,7 +62,7 @@ public class UnifiedGenotyper extends LocusWalker, GenotypeL private GenotypeWriter writer; // samples in input - private HashSet samples; + private TreeSet samples; // keep track of some metrics about our calls private CallMetrics callsMetrics; @@ -108,7 +108,7 @@ public class UnifiedGenotyper extends LocusWalker, GenotypeL } // get all of the unique sample names - samples = new HashSet(); + samples = new TreeSet(); // if we're supposed to assume a single sample if ( UAC.ASSUME_SINGLE_SAMPLE != null ) { samples.add(UAC.ASSUME_SINGLE_SAMPLE); 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 f30790853..4023fdb09 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -47,7 +47,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot1PointEM() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/low_coverage_CEU.chr1.10k-11k.bam -varout %s -L 1:10,023,400-10,024,000 -bm empirical -gm EM_POINT_ESTIMATE -confidence 30", 1, - Arrays.asList("37e112d619c2b6f213554edd10262523")); + Arrays.asList("fbb3ae6e835df5cf9b99dae5bf1fa8e5")); executeTest("testMultiSamplePilot1 - Point Estimate EM", spec); } @@ -55,7 +55,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot2PointEM() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/pilot2_daughters.chr20.10k-11k.bam -varout %s -L 20:10,000,000-10,010,000 -bm empirical -gm EM_POINT_ESTIMATE -confidence 30", 1, - Arrays.asList("6d28b2af631805dc593508a21ef46a83")); + Arrays.asList("98495e6f75a63558996ed45f7a1f062a")); executeTest("testMultiSamplePilot2 - Point Estimate EM", spec); } @@ -68,7 +68,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot1Joint() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/low_coverage_CEU.chr1.10k-11k.bam -varout %s -L 1:10,023,400-10,024,000 -bm empirical -gm JOINT_ESTIMATE -confidence 30", 1, - Arrays.asList("3a33873d7284cc113a639ee12c925ac0")); + Arrays.asList("6f2753dbbf6b4ff98a75510e7ff2d5ae")); executeTest("testMultiSamplePilot1 - Joint Estimate", spec); } @@ -76,7 +76,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot2Joint() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/pilot2_daughters.chr20.10k-11k.bam -varout %s -L 20:10,000,000-10,010,000 -bm empirical -gm JOINT_ESTIMATE -confidence 30", 1, - Arrays.asList("bcdb54d8867543c5c316b65b27b0d3d6")); + Arrays.asList("979c1d88f2464548e83027daf685c2ad")); executeTest("testMultiSamplePilot2 - Joint Estimate", spec); }