Fix VariantsToTable output of FORMAT record lists when -SMA is specified
* PT 84242218 * Note that FORMAT fields behave the same as INFO fields - if the annotation has a count of A (one entry per Alt Allele), it is split across the multiple output lines. Otherwise, the entire list is output with each field
This commit is contained in:
parent
b561febbfd
commit
71bdfbe465
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue