Skip to content

Fix: add sample_indices parameter to count_samples, plot_samples_interactive_map, plot_samples_bar, plot_sample_location_geo - #1127

Merged
jonbrenas merged 3 commits into
malariagen:masterfrom
noir4201:fix/sample-indices-missing-methods
Mar 20, 2026
Merged

Fix: add sample_indices parameter to count_samples, plot_samples_interactive_map, plot_samples_bar, plot_sample_location_geo#1127
jonbrenas merged 3 commits into
malariagen:masterfrom
noir4201:fix/sample-indices-missing-methods

Conversation

@noir4201

Copy link
Copy Markdown
Contributor

Closes #1126

## What this fixes
Four public methods that call sample_metadata() internally were missing
the sample_indices parameter that sample_metadata() exposes. This meant
users could not select samples by index when using these methods.

## Changes
Added sample_indices: Optional[base_params.sample_indices] = None to
the signatures of:

  • count_samples()
  • plot_samples_interactive_map()
  • plot_samples_bar()
  • plot_sample_location_geo()

And passed sample_indices=sample_indices through to the internal
sample_metadata() call in each method.

## Pattern followed
wgs_data_catalog() already correctly implements this pattern —
this PR applies the same approach to the four affected methods.

## Testing

  1. All 1006 unit tests pass
  2. ruff linting passes with no issues

…ractive_map, plot_samples_bar, plot_sample_location_geo
@jonbrenas
jonbrenas merged commit a062eb8 into malariagen:master Mar 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sample_indices parameter missing from multiple methods that internally call sample_metadata

2 participants