Merged bug fix from Stable into Unstable

This commit is contained in:
Ryan Poplin 2011-11-07 15:26:35 -05:00
commit 94dc447a70
2 changed files with 16 additions and 3 deletions

View File

@ -556,9 +556,9 @@ public class SelectVariants extends RodWalker<Integer, Integer> {
if (vc == null)
return false;
// if we're not looking at specific samples then the absense of a compVC means discordance
if (NO_SAMPLES_SPECIFIED && (compVCs == null || compVCs.isEmpty()))
return true;
// if we're not looking at specific samples then the absence of a compVC means discordance
if (NO_SAMPLES_SPECIFIED)
return (compVCs == null || compVCs.isEmpty());
// check if we find it in the variant rod
Map<String, Genotype> genotypes = vc.getGenotypes(samples);

View File

@ -64,6 +64,19 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
executeTest("testDiscordance--" + testFile, spec);
}
@Test
public void testDiscordanceNoSampleSpecified() {
String testFile = validationDataLocation + "NA12878.hg19.example1.vcf";
WalkerTestSpec spec = new WalkerTestSpec(
"-T SelectVariants -R " + hg19Reference + " -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s -NO_HEADER",
1,
Arrays.asList("5d7d899c0c4954ec59104aebfe4addd5")
);
executeTest("testDiscordanceNoSampleSpecified--" + testFile, spec);
}
@Test
public void testConcordance() {
String testFile = validationDataLocation + "NA12878.hg19.example1.vcf";