Repository navigation
0.1.1b3: cn_palette option with a cnamaste (a, b) palette - #2
Merged
Merged
Conversation
- New "cnamaste" palette for (a, b) states, from cnamaste.palette.COPY_STATES:
hue by minor-allele fraction, darker for more copies. The existing palette
is named "hatchet" and stays the default.
- cn_palette= on get_cn_cmap, get_mixcn_cmap and plot_cnv_profile (passed on
to its key); the figure helpers forward it through profile_kwargs.
- CN_PALETTES lists the names, for an argparse choices; an unknown name
raises ValueError.
- The key's overflow box is labelled from the palette: >7 under hatchet,
>6 under cnamaste.
- examples/plot_gallery.py takes --cn_palette {hatchet,cnamaste} and --outdir.
- Version 0.1.1b3.
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.
Summary
"cnamaste", taken fromcnamaste.palette.COPY_STATES: hue by minor-allele fraction, darker for more copies. The existing palette is now named"hatchet"and remains the default, so current calls and output are unchanged.cn_palette=is accepted byget_cn_cmap,get_mixcn_cmapandplot_cnv_profile(which passes it to its key).plot_scatter_1d_multisampleandplot_heatmap_cnpforward it through their profile kwargs.CN_PALETTES = ("hatchet", "cnamaste")is exported for use as argparsechoices. An unknown name raisesValueError.>7under"hatchet",>6under"cnamaste".examples/plot_gallery.pytakes--cn_palette {hatchet,cnamaste}and--outdir.Usage
Pass the same palette to the scatter colors and the profile so points, profile and key agree:
Not included
cnamaste's
FLIP_OPACITY(B > A drawn at half opacity) andTRACK_NORMAL((1, 1) shown as steelblue on scatter tracks) are not ported. (a, b) and (b, a) still share one color, and mixed phase is still marked by the "/" hatch.Test plan
ruff format --checkandruff checkare cleanpytest: new tests cover the default palette, the cnamaste colors and coverage, the unknown-name error,get_mixcn_cmapunder cnamaste, and the profile and key under cnamasteexamples/*.png