Skip to content

Commit 949a12c

Browse files
committed
Update frq_base.py
1 parent 00656ed commit 949a12c

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

malariagen_data/anoph/frq_base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)