add sample-level plotting and name filtering to aniso_magic#849
Merged
Conversation
Extends aniso_magic with `samples` / `isample` / `group_samples` parameters that mirror the existing site-level options, plus a `sites` parameter and `group_sites` flag that let callers pass an explicit list of sites/samples and choose between per-group iteration (one plot each) or pooled plotting (one combined plot). Adds validation that rejects conflicting combinations (e.g. isite with isample, or isite with group_sites). Refactors the per-site loop into a shared per-group loop that dispatches on either 'site' or 'sample', tags server-mode filenames with SI:_ or SA:_ accordingly, and looks up the location field from the sites table when grouping by site and from the propagated specimens column when grouping by sample. Names not present in the data are skipped with a verbose message rather than raising. Collapses aniso_magic_nb to an alias of aniso_magic so the notebook- facing name and the canonical implementation cannot drift apart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends aniso_magic with
samples/isample/group_samplesparameters that mirror the existing site-level options, plus asitesparameter andgroup_sitesflag that let callers pass an explicit list of sites/samples and choose between per-group iteration (one plot each) or pooled plotting (one combined plot). Adds validation that rejects conflicting combinations (e.g. isite with isample, or isite with group_sites).Refactors the per-site loop into a shared per-group loop that dispatches on either 'site' or 'sample', tags server-mode filenames with SI:_ or SA:_ accordingly, and looks up the location field from the sites table when grouping by site and from the propagated specimens column when grouping by sample. Names not present in the data are skipped with a verbose message rather than raising.
Collapses aniso_magic_nb to an alias of aniso_magic so the notebook- facing name and the canonical implementation cannot drift apart.
This should be tested more before merging into main.