@@ -60,7 +60,10 @@ public class FuncotatorIntegrationTest extends CommandLineProgramTest {
60
60
private static final String GERMLINE_DATASOURCES_FOLDER = "funcotator_dataSources_germline_latest" ;
61
61
62
62
private static final String XSV_CLINVAR_MULTIHIT_TEST_VCF = toolsTestDir + "funcotator" + File .separator + "clinvar_hg19_multihit_test.vcf" ;
63
+ private static final String FILTER_TEST_VCF = toolsTestDir + "funcotator" + File .separator + "FILTER_test.vcf" ;
63
64
private static final String DS_XSV_CLINVAR_TESTS = largeFileTestDir + "funcotator" + File .separator + "small_ds_clinvar_hg19" + File .separator ;
65
+ private static final String DS_FILTER_PARSE_TESTS = largeFileTestDir + "funcotator" + File .separator + "small_ds_FILTER_test" + File .separator ;
66
+
64
67
private static final String NOT_M2_TEST_HG19 = toolsTestDir + "funcotator/NotM2_test_custom_maf_fields.vcf" ;
65
68
private static final String M2_TEST_HG19 = toolsTestDir + "funcotator/M2_test_custom_maf_fields.vcf" ;
66
69
private static final String NOT_M2_TEST_HG19_TUMOR_ONLY = toolsTestDir + "funcotator/NotM2_test_custom_maf_fields_tumor_only.vcf" ;
@@ -903,6 +906,41 @@ public void testCanAnnotateHg38ClinvarAndGencodeV28() {
903
906
.count (), NUM_CLINVAR_HITS );
904
907
}
905
908
909
+ @ Test
910
+ public void testFilterParsing () {
911
+
912
+ final File outputFile = createTempFile ("tmpTestFilterParsing" , "vcf" );
913
+
914
+ final ArgumentsBuilder arguments = createBaselineArgumentsForFuncotator (
915
+ FILTER_TEST_VCF ,
916
+ outputFile ,
917
+ b37Reference ,
918
+ DS_FILTER_PARSE_TESTS ,
919
+ FuncotatorTestConstants .REFERENCE_VERSION_HG19 ,
920
+ FuncotatorArgumentDefinitions .OutputFormatType .VCF ,
921
+ false );
922
+
923
+ arguments .addBooleanArgument (FuncotatorArgumentDefinitions .FORCE_B37_TO_HG19_REFERENCE_CONTIG_CONVERSION , true );
924
+
925
+ runCommandLine (arguments );
926
+
927
+ final Pair <VCFHeader , List <VariantContext >> tempVcf = VariantContextTestUtils .readEntireVCFIntoMemory (outputFile .getAbsolutePath ());
928
+ Assert .assertEquals ( tempVcf .getRight ().size (), 1 );
929
+
930
+ final String [] funcotatorKeys = FuncotatorUtils .extractFuncotatorKeysFromHeaderDescription (tempVcf .getLeft ().getInfoHeaderLine (VcfOutputRenderer .FUNCOTATOR_VCF_FIELD_NAME ).getDescription ());
931
+
932
+ final VariantContext variantContext = tempVcf .getRight ().get (0 );
933
+ final Map <Allele , FuncotationMap > funcs = FuncotatorUtils .createAlleleToFuncotationMapFromFuncotationVcfAttribute (
934
+ funcotatorKeys , variantContext , "Gencode_19_annotationTranscript" , "FAKE_SOURCE" );
935
+
936
+ final String txId = funcs .get (variantContext .getAlternateAllele (0 )).getTranscriptList ().get (0 );
937
+ Assert .assertEquals ( funcs .get (variantContext .getAlternateAllele (0 )).get (txId ).size (), 1 );
938
+
939
+ final Funcotation funcotation = funcs .get (variantContext .getAlternateAllele (0 )).get (txId ).get (0 );
940
+
941
+ Assert .assertEquals (funcotation .getField ("dbSnp_FILTER" ), "FILTER_8" );
942
+ }
943
+
906
944
@ Test
907
945
public void testExclusionFromDatasourceVcfToVcf () {
908
946
// Clinvar datasource did go through one round of preprocessing to make contig names "1" --> "chr1" (for example). This is an issue with ClinVar, not GATK.
0 commit comments