Merge pull request #786 from broadinstitute/pd_variantstotable_sma
Fix VariantsToTable output of FORMAT record lists when -SMA is specified
This commit is contained in:
commit
bcc6b73e9b
|
|
@ -114,6 +114,21 @@ public class VariantsToTableIntegrationTest extends WalkerTest {
|
||||||
executeTest("testGenotypeFields", spec);
|
executeTest("testGenotypeFields", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMultiallelicGenotypeFields() {
|
||||||
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
|
"-R " + b37KGReference +
|
||||||
|
" --variant " + privateTestDir + "multiallelic_gt.vcf" +
|
||||||
|
" -T VariantsToTable" +
|
||||||
|
" -F CHROM -F POS -F ID -F REF -F ALT -F QUAL -F MULTI-ALLELIC" +
|
||||||
|
" -GF PL -GF AD" +
|
||||||
|
" -SMA" +
|
||||||
|
" -o %s",
|
||||||
|
1,
|
||||||
|
Arrays.asList("7d38e7adb07eee94405188d145f22bb5"));
|
||||||
|
executeTest("testMultiallelicGenotypeFields", spec);
|
||||||
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testGenotypeFieldsWithInline() {
|
public void testGenotypeFieldsWithInline() {
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ public class VariantsToTable extends RodWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
// otherwise, add the original value to all of the records
|
// otherwise, add the original value to all of the records
|
||||||
else {
|
else {
|
||||||
final String valStr = val.toString();
|
final String valStr = prettyPrintObject(val);
|
||||||
for ( List<String> record : result )
|
for ( List<String> record : result )
|
||||||
record.add(valStr);
|
record.add(valStr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue