File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,16 +23,15 @@ def _prep_samples_for_cohort_grouping(
2323 df_samples = df_samples .copy ()
2424
2525 # Determine whether to filter "intermediate"/"unassigned" taxon values.
26- # When filter_unassigned is None (default), auto-apply filtering only
27- # when using the default "taxon" column. Users can explicitly override
28- # with True/False.
2926 # See: https://github.com/malariagen/malariagen-data-python/issues/806
3027 if filter_unassigned is None :
28+ # Auto-apply filtering only when using the default "taxon" column.
29+ # Users can explicitly override with True/False.
3130 filter_unassigned = taxon_by == "taxon"
3231
33- # Filter out samples with "intermediate" or "unassigned" taxon values
34- # by setting them to None, so they are excluded from cohort grouping.
3532 if filter_unassigned :
33+ # Remove samples with "intermediate" or "unassigned" taxon values,
34+ # as we only want cohorts with clean taxon calls.
3635 loc_intermediate_taxon = (
3736 df_samples [taxon_by ].str .startswith ("intermediate" ).fillna (False )
3837 )
You can’t perform that action at this time.
0 commit comments