DO NOT MERGE - set a default large component threshold#413
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dde93a6. Configure here.
| write_hive_partitioned_edgelist_without_out_of_size_bound_components( | ||
| input_edgelist_path=partitioned_edgelist_path, | ||
| min_component_size_to_prune=refinement_options.initial_stage_options.min_component_size_to_prune, | ||
| max_component_size_to_prune=upper_component_size_bound, |
There was a problem hiding this comment.
Max prune empty graph mishandled
Medium Severity
With the new default max component UMI bound, a graph where every hybrid component is above that limit can pass the pre-hive size check, then lose all edges in write_hive_partitioned_edgelist_without_out_of_size_bound_components. The pipeline keeps going instead of failing clearly: with multiplet recovery enabled, calculate_post_recovery_component_statistics can hit an empty component table when computing fraction_nodes_in_largest_component_post_recovery; otherwise the run fails later with a message that blames components being too small.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit dde93a6. Configure here.


Removing large components by default in the graph step. This should eventually be an option in the pipeline and not done by default.
Fixes: PNA-3188
Type of change
TEMP
Note
High Risk
Default graph behavior now hard-filters components by size (including dropping clusters >500k UMIs), which can materially change cell counts and downstream PXL output without explicit user configuration; marked TEMP in the PR description.
Overview
The graph CLI now defaults
--component-size-max-thresholdto 500,000 and--component-size-min-thresholdtoMIN_PNA_COMPONENT_SIZE, so runs use hard min/max bounds instead of dynamic size filtering unless callers change those flags.Early hive-partitioned edgelist writing was extended from minimum-only pruning to min and max UMI bounds:
write_hive_partitioned_edgelist_without_out_of_size_bound_componentsdrops components below the min or above the max (same UMI score as hybrid detection).find_componentspasses the upper bound fromcomponent_size_thresholdinto that step and logs the applied min/max; the default upper bound type usesnp.iinfo(np.uint64).maxinstead of2**32 - 1.Reviewed by Cursor Bugbot for commit 9375ec8. Bugbot is set up for automated code reviews on this repo. Configure here.