AC strat now checks if evals will be merged before throwing an error on multiple eval files.
Minor tweaks to WGP script based on new recal VCF format.
This commit is contained in:
parent
3fa9089085
commit
df5dd841af
|
|
@ -20,10 +20,8 @@ import java.util.*;
|
|||
public class AlleleCount extends VariantStratifier {
|
||||
@Override
|
||||
public void initialize() {
|
||||
List<RodBinding<VariantContext>> evals = getVariantEvalWalker().getEvals();
|
||||
|
||||
// we can only work with a single eval VCF, and it must have genotypes
|
||||
if ( evals.size() != 1 )
|
||||
if ( getVariantEvalWalker().getEvals().size() != 1 && !getVariantEvalWalker().mergeEvals )
|
||||
throw new UserException.BadArgumentValue("AlleleCount", "AlleleCount stratification only works with a single eval vcf");
|
||||
|
||||
// There are 2 x n sample chromosomes for diploids
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class VariantEvalIntegrationTest extends WalkerTest {
|
|||
private static String variantEvalTestDataRoot = validationDataLocation + "VariantEval";
|
||||
private static String fundamentalTestVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.snps_and_indels.vcf";
|
||||
private static String fundamentalTestSNPsVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.vcf";
|
||||
private static String fundamentalTestSNPsSplit1of2VCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.split_1_of_2.vcf";
|
||||
private static String fundamentalTestSNPsSplit2of2VCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.split_2_of_2.vcf";
|
||||
private static String fundamentalTestSNPsOneSampleVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.NA12045.vcf";
|
||||
|
||||
private static String cmdRoot = "-T VariantEval" +
|
||||
|
|
@ -437,24 +439,69 @@ public class VariantEvalIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testAlleleCountStrat() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T VariantEval",
|
||||
"-R " + b37KGReference,
|
||||
"--dbsnp " + b37dbSNP132,
|
||||
"--eval " + fundamentalTestSNPsVCF,
|
||||
"-noEV",
|
||||
"-EV CountVariants",
|
||||
"-noST",
|
||||
"-ST AlleleCount",
|
||||
"-L " + fundamentalTestSNPsVCF,
|
||||
"-o %s"
|
||||
),
|
||||
1,
|
||||
Arrays.asList("1198bfea6183bd43219071a84c79a386")
|
||||
);
|
||||
buildCommandLine(
|
||||
"-T VariantEval",
|
||||
"-R " + b37KGReference,
|
||||
"--dbsnp " + b37dbSNP132,
|
||||
"--eval " + fundamentalTestSNPsVCF,
|
||||
"-noEV",
|
||||
"-EV CountVariants",
|
||||
"-noST",
|
||||
"-ST AlleleCount",
|
||||
"-L " + fundamentalTestSNPsVCF,
|
||||
"-o %s"
|
||||
),
|
||||
1,
|
||||
Arrays.asList("1198bfea6183bd43219071a84c79a386")
|
||||
);
|
||||
executeTest("testAlleleCountStrat", spec);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleEvalTracksAlleleCountWithMerge() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T VariantEval",
|
||||
"-R " + b37KGReference,
|
||||
"--dbsnp " + b37dbSNP132,
|
||||
"--eval " + fundamentalTestSNPsSplit1of2VCF,
|
||||
"--eval " + fundamentalTestSNPsSplit2of2VCF,
|
||||
"--mergeEvals",
|
||||
"-noEV",
|
||||
"-EV CountVariants",
|
||||
"-noST",
|
||||
"-ST AlleleCount",
|
||||
"-L " + fundamentalTestSNPsVCF,
|
||||
"-o %s"
|
||||
),
|
||||
1,
|
||||
Arrays.asList("1198bfea6183bd43219071a84c79a386")
|
||||
);
|
||||
executeTest("testMultipleEvalTracksAlleleCountWithMerge", spec);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleEvalTracksAlleleCountWithoutMerge() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T VariantEval",
|
||||
"-R " + b37KGReference,
|
||||
"--dbsnp " + b37dbSNP132,
|
||||
"--eval " + fundamentalTestSNPsSplit1of2VCF,
|
||||
"--eval " + fundamentalTestSNPsSplit2of2VCF,
|
||||
//"--mergeEvals", No merge with AC strat ==> error
|
||||
"-noEV",
|
||||
"-EV CountVariants",
|
||||
"-noST",
|
||||
"-ST AlleleCount",
|
||||
"-L " + fundamentalTestSNPsVCF
|
||||
),
|
||||
0,
|
||||
UserException.class
|
||||
);
|
||||
executeTest("testMultipleEvalTracksAlleleCountWithoutMerge", spec);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIntervalStrat() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
|
|
|
|||
Loading…
Reference in New Issue