Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set theme fix #1886

Merged
merged 3 commits into from
Jun 18, 2021
Merged

Set theme fix #1886

merged 3 commits into from
Jun 18, 2021

Conversation

ivirshup
Copy link
Member

If you call sns.set_palette, seaborn sets the default color palette as rgb tuples. matplotlib sometimes complains about this, and something this causes errors with our other code. We were putting these tuples into adata.uns[f"{key}_colors"] without validation. Now we validate this.

Fixes #1885.

@ivirshup ivirshup enabled auto-merge (squash) June 18, 2021 05:13
@codecov
Copy link

codecov bot commented Jun 18, 2021

Codecov Report

Merging #1886 (9862821) into master (4dd8de9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1886   +/-   ##
=======================================
  Coverage   71.22%   71.22%           
=======================================
  Files          92       92           
  Lines       11181    11181           
=======================================
  Hits         7964     7964           
  Misses       3217     3217           
Impacted Files Coverage Δ
scanpy/plotting/_utils.py 54.61% <100.00%> (ø)

@ivirshup ivirshup merged commit 825d910 into scverse:master Jun 18, 2021
giovp pushed a commit that referenced this pull request Aug 1, 2021
…, explicit typing of output, adding theta input check
ivirshup added a commit that referenced this pull request Mar 29, 2022
* adding core functions and documentation for pearson residual normalization and hvg selection

* adding Pearson residual+PCA bundles, minor bug fixes

* some style cleanup, minor fixes

* adapting _normalize_pearson_residuals() to cleaned-up _normalized_total() from #1667

* updating layer management as in #1667 for _highly_variable_pearson_residuals() as well

* slight performance improvement for sparse input

* style cleanup

* fixing import issue, fixing docstring style, adding check_values param and warning as in #1642

* fixed small NameError, simplified clip argument

* remove pd.categorical()

* adding check_values to docstrings and remaining pearson residual functions

* np.empty instead of np.nan

* add references to docstrings, add HVG details to docstring

* exposing pca keyword arguments to the user for the bundle/recipe functions

* removed unneeded reversal in hvg, fix kwargs_pca bug, consistent defaults across files

* fixing handling of `inplace` and `subset` arguments (see issue #1886), explicit typing of output, adding theta input check

* renaming output fields for consistency, fixing minor bug

* renaming output fields for consistency

* adding function that prepares testdata (used for pearson residual tests)

* adding tests for all pearson residual functions

* fix precommit high_var_genes

* try to get precommit to work

* try to get precommit to work

* fix recipes

* fix normalization

* remove relative imports

* fix docstrings

* retry to build docs

* fix highvar docstring

* more fixing docstrings

* docs build locally ? 🔨

* minor cleanup test normalization

* more minor cleanups

* final cleanup normalization

* fixes high var

* init experimental module

* fix column ordering for batch case

* moving to experimental, minor fix for experimental version of hvg selection

* linking tests to new experimental submodule, style cleanup

* adapt input arguments and docstring for experimental version of hvg selection function

* add recipes

* fix docs

* add correct module docs

* fix recipe docstrings

* try fix indentation

* fix indentation

* fix

* new indentation

* add space

* fixing typo in docstring

* renaming pca output fields

* adapting tests to new output fieldname

* fix docs 🔨

* update docs

* fix test 🔨

* ensure argument and docstring consistency

* update citation year

* cleaning imports in `preprocessing` functions

* making inputcheck tests specific to error/warning messages

* making inputcheck tests specific to error/warning messages

* resolve HVGs across batches more cleanly, fix dtype issue

* renaming pca input arguments

* renaming pca input arguments

* _pca bundle: more efficient copy handling, added input check. both _pca and _recipe: varm field for PCs, adapted tests and docs

* move repeated inputcheck code to helpers

* merging tests *_values and *_general

* condense code in pearson hvg selection test, smaller test data for speedup

* condensing code in normalization tests

* add asteriks for keyword

* updating refs to Genome Biology publication

* cleanup helpers.py

* cleanup main files as requested by @ivirshup

* revert unneeded settingWithCopy fix

* cache data

* use doc_params for doc

* fix doc_params var

* finalize docs

* fix param doc

* wrong var still

* add cached datasets module and test on high_var_genes tests

* use new cache dataset module for tests

* fix precommit

* fix docs

* fix reference and add notebook to tutorials

* add release note

* add release note

* fix release note

* typo

* remove duplicate reference

* fixing black flake etc requirements

* add _pca function to release note

* last edits to docs

* fix release and tutorial image

* try fix pre-commit

* minor docs

* Remove accidentally included files from merge

Co-authored-by: giovp <[email protected]>
Co-authored-by: Isaac Virshup <[email protected]>
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.

seaborn.set_theme causing issues with color mapping
1 participant