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:
rpoplin 2014-12-16 10:37:22 -05:00
commit bcc6b73e9b
2 changed files with 16 additions and 1 deletions

View File

@ -114,6 +114,21 @@ public class VariantsToTableIntegrationTest extends WalkerTest {
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)
public void testGenotypeFieldsWithInline() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(

View File

@ -351,7 +351,7 @@ public class VariantsToTable extends RodWalker<Integer, Integer> {
}
// otherwise, add the original value to all of the records
else {
final String valStr = val.toString();
final String valStr = prettyPrintObject(val);
for ( List<String> record : result )
record.add(valStr);
}