@@ -12,7 +12,7 @@ class PhenotypeDataMixin:
1212
1313 _fs : fsspec .AbstractFileSystem
1414 _phenotype_gcs_path_template : str
15- sample_metadata : pd .DataFrame
15+ sample_metadata : Callable [..., pd .DataFrame ]
1616 sample_sets : list [str ]
1717 snp_calls : Callable [..., Any ]
1818 haplotypes : Callable [..., Any ]
@@ -267,19 +267,19 @@ def phenotype_data(
267267
268268 # 4. Get metadata for those samples
269269 sample_ids_with_phenotypes = df_phenotypes ["sample_id" ].unique ().tolist ()
270- df_sample_metadata : pd . DataFrame = self .sample_metadata (
270+ df_sample_metadata = self .sample_metadata (
271271 sample_sets = sample_sets ,
272272 sample_query = f"sample_id in { sample_ids_with_phenotypes } " ,
273273 )
274274
275275 # 5. Merge phenotype + metadata
276- df_merged = self ._merge_phenotype_with_metadata (
276+ df_merged : pd . DataFrame = self ._merge_phenotype_with_metadata (
277277 df_phenotypes , df_sample_metadata
278278 )
279279
280280 # 6. Apply sample_query if provided
281281 if sample_query is not None :
282- df_merged : pd . DataFrame = self .sample_metadata (
282+ df_merged = self .sample_metadata (
283283 sample_query = sample_query ,
284284 sample_query_options = sample_query_options ,
285285 df = df_merged ,
0 commit comments