55from v03_pipeline .lib .misc .callsets import get_additional_row_fields
66from v03_pipeline .lib .misc .io import (
77 import_callset ,
8- import_vcf ,
98 select_relevant_fields ,
109 split_multi_hts ,
1110)
1413 validate_imported_field_types ,
1514)
1615from v03_pipeline .lib .misc .vets import annotate_vets
17- from v03_pipeline .lib .model .feature_flag import FeatureFlag
1816from v03_pipeline .lib .paths import (
1917 imported_callset_path ,
20- valid_filters_path ,
2118 variant_annotations_table_path ,
2219)
2320from v03_pipeline .lib .tasks .base .base_loading_run_params import BaseLoadingRunParams
@@ -43,26 +40,7 @@ def output(self) -> luigi.Target:
4340 )
4441
4542 def requires (self ) -> list [luigi .Task ]:
46- requirements = []
47- if (
48- FeatureFlag .EXPECT_WES_FILTERS
49- and not self .skip_expect_filters
50- and self .dataset_type .expect_filters (
51- self .sample_type ,
52- )
53- ):
54- requirements = [
55- * requirements ,
56- CallsetTask (
57- valid_filters_path (
58- self .dataset_type ,
59- self .sample_type ,
60- self .callset_path ,
61- ),
62- ),
63- ]
6443 return [
65- * requirements ,
6644 CallsetTask (self .callset_path ),
6745 ]
6846
@@ -74,21 +52,6 @@ def create_table(self) -> hl.MatrixTable:
7452 self .reference_genome ,
7553 self .dataset_type ,
7654 )
77- filters_path = None
78- if (
79- FeatureFlag .EXPECT_WES_FILTERS
80- and not self .skip_expect_filters
81- and self .dataset_type .expect_filters (
82- self .sample_type ,
83- )
84- ):
85- filters_path = valid_filters_path (
86- self .dataset_type ,
87- self .sample_type ,
88- self .callset_path ,
89- )
90- filters_ht = import_vcf (filters_path , self .reference_genome ).rows ()
91- mt = mt .annotate_rows (filters = filters_ht [mt .row_key ].filters )
9255 additional_row_fields = get_additional_row_fields (
9356 mt ,
9457 self .reference_genome ,
@@ -139,5 +102,4 @@ def create_table(self) -> hl.MatrixTable:
139102 mt = annotate_vets (mt )
140103 return mt .select_globals (
141104 callset_path = self .callset_path ,
142- filters_path = filters_path or hl .missing (hl .tstr ),
143105 )
0 commit comments