File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ def import_callset(
121
121
callset_path : str ,
122
122
reference_genome : ReferenceGenome ,
123
123
dataset_type : DatasetType ,
124
- filters_path : str | None = None ,
125
124
) -> hl .MatrixTable :
126
125
if dataset_type == DatasetType .GCNV :
127
126
mt = import_gcnv_bed_file (callset_path )
@@ -131,9 +130,6 @@ def import_callset(
131
130
mt = hl .read_matrix_table (callset_path )
132
131
if dataset_type == DatasetType .SV :
133
132
mt = mt .annotate_rows (variant_id = mt .rsid )
134
- if filters_path :
135
- filters_ht = import_vcf (filters_path , reference_genome ).rows ()
136
- mt = mt .annotate_rows (filters = filters_ht [mt .row_key ].filters )
137
133
return mt .key_rows_by (* dataset_type .table_key_type (reference_genome ).fields )
138
134
139
135
Original file line number Diff line number Diff line change 4
4
5
5
from v03_pipeline .lib .misc .io import (
6
6
import_callset ,
7
+ import_vcf ,
7
8
select_relevant_fields ,
8
9
split_multi_hts ,
9
10
)
@@ -117,17 +118,22 @@ def additional_row_fields(self, mt):
117
118
}
118
119
119
120
def create_table (self ) -> hl .MatrixTable :
120
- filters_path = valid_filters_path (
121
- self .dataset_type ,
122
- self .sample_type ,
123
- self .callset_path ,
124
- )
125
121
mt = import_callset (
126
122
self .callset_path ,
127
123
self .reference_genome ,
128
124
self .dataset_type ,
129
- filters_path ,
130
125
)
126
+ filters_path = None
127
+ if not self .skip_expect_filters and self .dataset_type .expect_filters (
128
+ self .sample_type ,
129
+ ):
130
+ filters_path = valid_filters_path (
131
+ self .dataset_type ,
132
+ self .sample_type ,
133
+ self .callset_path ,
134
+ )
135
+ filters_ht = import_vcf (filters_path , self .reference_genome ).rows ()
136
+ mt = mt .annotate_rows (filters = filters_ht [mt .row_key ].filters )
131
137
mt = select_relevant_fields (
132
138
mt ,
133
139
self .dataset_type ,
You can’t perform that action at this time.
0 commit comments