diff --git a/docs/_build/.buildinfo b/docs/.buildinfo similarity index 82% rename from docs/_build/.buildinfo rename to docs/.buildinfo index 2ee6bc0..6156fea 100644 --- a/docs/_build/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 4792b90aaabe1bc12f6c363042ea2904 +config: eccfebbc014599d7fc95e4d18dc2318f tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/.doctrees/API.doctree b/docs/.doctrees/API.doctree new file mode 100644 index 0000000..a0e4d1b Binary files /dev/null and b/docs/.doctrees/API.doctree differ diff --git a/docs/_build/.doctrees/_templates/autoapi/python/module.doctree b/docs/.doctrees/_templates/autoapi/python/module.doctree similarity index 95% rename from docs/_build/.doctrees/_templates/autoapi/python/module.doctree rename to docs/.doctrees/_templates/autoapi/python/module.doctree index d81f6cc..e67b1f2 100644 Binary files a/docs/_build/.doctrees/_templates/autoapi/python/module.doctree and b/docs/.doctrees/_templates/autoapi/python/module.doctree differ diff --git a/docs/_build/.doctrees/_templates/autosummary/table.doctree b/docs/.doctrees/_templates/autosummary/table.doctree similarity index 94% rename from docs/_build/.doctrees/_templates/autosummary/table.doctree rename to docs/.doctrees/_templates/autosummary/table.doctree index 852fd49..a600845 100644 Binary files a/docs/_build/.doctrees/_templates/autosummary/table.doctree and b/docs/.doctrees/_templates/autosummary/table.doctree differ diff --git a/docs/_build/.doctrees/environment.pickle b/docs/.doctrees/environment.pickle similarity index 73% rename from docs/_build/.doctrees/environment.pickle rename to docs/.doctrees/environment.pickle index e967acb..fead930 100644 Binary files a/docs/_build/.doctrees/environment.pickle and b/docs/.doctrees/environment.pickle differ diff --git a/docs/_build/.doctrees/generated/cellestial.bar.doctree b/docs/.doctrees/generated/cellestial.bar.doctree similarity index 94% rename from docs/_build/.doctrees/generated/cellestial.bar.doctree rename to docs/.doctrees/generated/cellestial.bar.doctree index ef021c6..7cf0f32 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.bar.doctree and b/docs/.doctrees/generated/cellestial.bar.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.boxplot.doctree b/docs/.doctrees/generated/cellestial.boxplot.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.boxplot.doctree rename to docs/.doctrees/generated/cellestial.boxplot.doctree index 3d16e8a..3259262 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.boxplot.doctree and b/docs/.doctrees/generated/cellestial.boxplot.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.boxplots.doctree b/docs/.doctrees/generated/cellestial.boxplots.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.boxplots.doctree rename to docs/.doctrees/generated/cellestial.boxplots.doctree index 892b826..96fb5de 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.boxplots.doctree and b/docs/.doctrees/generated/cellestial.boxplots.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.build_frame.doctree b/docs/.doctrees/generated/cellestial.build_frame.doctree similarity index 91% rename from docs/_build/.doctrees/generated/cellestial.build_frame.doctree rename to docs/.doctrees/generated/cellestial.build_frame.doctree index c017071..96fb684 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.build_frame.doctree and b/docs/.doctrees/generated/cellestial.build_frame.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.cluster_outlines.doctree b/docs/.doctrees/generated/cellestial.cluster_outlines.doctree similarity index 96% rename from docs/_build/.doctrees/generated/cellestial.cluster_outlines.doctree rename to docs/.doctrees/generated/cellestial.cluster_outlines.doctree index 764a98c..48e12ab 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.cluster_outlines.doctree and b/docs/.doctrees/generated/cellestial.cluster_outlines.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.dimensional.doctree b/docs/.doctrees/generated/cellestial.dimensional.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.dimensional.doctree rename to docs/.doctrees/generated/cellestial.dimensional.doctree index 021f828..10e4366 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.dimensional.doctree and b/docs/.doctrees/generated/cellestial.dimensional.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.dimensionals.doctree b/docs/.doctrees/generated/cellestial.dimensionals.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.dimensionals.doctree rename to docs/.doctrees/generated/cellestial.dimensionals.doctree index 26b0435..c04425f 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.dimensionals.doctree and b/docs/.doctrees/generated/cellestial.dimensionals.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.dotplot.doctree b/docs/.doctrees/generated/cellestial.dotplot.doctree similarity index 96% rename from docs/_build/.doctrees/generated/cellestial.dotplot.doctree rename to docs/.doctrees/generated/cellestial.dotplot.doctree index 7661eda..42e0e13 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.dotplot.doctree and b/docs/.doctrees/generated/cellestial.dotplot.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.expression.doctree b/docs/.doctrees/generated/cellestial.expression.doctree similarity index 98% rename from docs/_build/.doctrees/generated/cellestial.expression.doctree rename to docs/.doctrees/generated/cellestial.expression.doctree index a91c887..421a191 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.expression.doctree and b/docs/.doctrees/generated/cellestial.expression.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.expressions.doctree b/docs/.doctrees/generated/cellestial.expressions.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.expressions.doctree rename to docs/.doctrees/generated/cellestial.expressions.doctree index 4a0b17b..b5045d8 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.expressions.doctree and b/docs/.doctrees/generated/cellestial.expressions.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.get_mapping.doctree b/docs/.doctrees/generated/cellestial.get_mapping.doctree similarity index 79% rename from docs/_build/.doctrees/generated/cellestial.get_mapping.doctree rename to docs/.doctrees/generated/cellestial.get_mapping.doctree index 152d9f3..393962a 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.get_mapping.doctree and b/docs/.doctrees/generated/cellestial.get_mapping.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.heatmap.doctree b/docs/.doctrees/generated/cellestial.heatmap.doctree similarity index 93% rename from docs/_build/.doctrees/generated/cellestial.heatmap.doctree rename to docs/.doctrees/generated/cellestial.heatmap.doctree index 31f7a99..5449d1c 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.heatmap.doctree and b/docs/.doctrees/generated/cellestial.heatmap.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.pca.doctree b/docs/.doctrees/generated/cellestial.pca.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.pca.doctree rename to docs/.doctrees/generated/cellestial.pca.doctree index f91557b..afd6914 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.pca.doctree and b/docs/.doctrees/generated/cellestial.pca.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.pcas.doctree b/docs/.doctrees/generated/cellestial.pcas.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.pcas.doctree rename to docs/.doctrees/generated/cellestial.pcas.doctree index ce3121a..ec48889 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.pcas.doctree and b/docs/.doctrees/generated/cellestial.pcas.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.plot.doctree b/docs/.doctrees/generated/cellestial.plot.doctree similarity index 98% rename from docs/_build/.doctrees/generated/cellestial.plot.doctree rename to docs/.doctrees/generated/cellestial.plot.doctree index 73b4a95..07dd447 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.plot.doctree and b/docs/.doctrees/generated/cellestial.plot.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.retrieve.doctree b/docs/.doctrees/generated/cellestial.retrieve.doctree similarity index 87% rename from docs/_build/.doctrees/generated/cellestial.retrieve.doctree rename to docs/.doctrees/generated/cellestial.retrieve.doctree index d687a60..34fed38 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.retrieve.doctree and b/docs/.doctrees/generated/cellestial.retrieve.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.scatter.doctree b/docs/.doctrees/generated/cellestial.scatter.doctree similarity index 93% rename from docs/_build/.doctrees/generated/cellestial.scatter.doctree rename to docs/.doctrees/generated/cellestial.scatter.doctree index 36239e1..c83892f 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.scatter.doctree and b/docs/.doctrees/generated/cellestial.scatter.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.show_colors.doctree b/docs/.doctrees/generated/cellestial.show_colors.doctree similarity index 78% rename from docs/_build/.doctrees/generated/cellestial.show_colors.doctree rename to docs/.doctrees/generated/cellestial.show_colors.doctree index ff06c63..3348395 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.show_colors.doctree and b/docs/.doctrees/generated/cellestial.show_colors.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.slice.doctree b/docs/.doctrees/generated/cellestial.slice.doctree similarity index 92% rename from docs/_build/.doctrees/generated/cellestial.slice.doctree rename to docs/.doctrees/generated/cellestial.slice.doctree index 89e3180..d2f5248 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.slice.doctree and b/docs/.doctrees/generated/cellestial.slice.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.tsne.doctree b/docs/.doctrees/generated/cellestial.tsne.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.tsne.doctree rename to docs/.doctrees/generated/cellestial.tsne.doctree index 01af837..c19f908 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.tsne.doctree and b/docs/.doctrees/generated/cellestial.tsne.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.tsnes.doctree b/docs/.doctrees/generated/cellestial.tsnes.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.tsnes.doctree rename to docs/.doctrees/generated/cellestial.tsnes.doctree index bd352b9..0fa84da 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.tsnes.doctree and b/docs/.doctrees/generated/cellestial.tsnes.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.umap.doctree b/docs/.doctrees/generated/cellestial.umap.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.umap.doctree rename to docs/.doctrees/generated/cellestial.umap.doctree index 22e2f4d..f06d0d0 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.umap.doctree and b/docs/.doctrees/generated/cellestial.umap.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.umaps.doctree b/docs/.doctrees/generated/cellestial.umaps.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.umaps.doctree rename to docs/.doctrees/generated/cellestial.umaps.doctree index 04b600c..dd3e992 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.umaps.doctree and b/docs/.doctrees/generated/cellestial.umaps.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.violin.doctree b/docs/.doctrees/generated/cellestial.violin.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.violin.doctree rename to docs/.doctrees/generated/cellestial.violin.doctree index 48e51fe..0f48542 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.violin.doctree and b/docs/.doctrees/generated/cellestial.violin.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.violins.doctree b/docs/.doctrees/generated/cellestial.violins.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.violins.doctree rename to docs/.doctrees/generated/cellestial.violins.doctree index 14edfb4..10beb73 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.violins.doctree and b/docs/.doctrees/generated/cellestial.violins.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.xyplot.doctree b/docs/.doctrees/generated/cellestial.xyplot.doctree similarity index 95% rename from docs/_build/.doctrees/generated/cellestial.xyplot.doctree rename to docs/.doctrees/generated/cellestial.xyplot.doctree index ad4de67..1170aa4 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.xyplot.doctree and b/docs/.doctrees/generated/cellestial.xyplot.doctree differ diff --git a/docs/_build/.doctrees/generated/cellestial.xyplots.doctree b/docs/.doctrees/generated/cellestial.xyplots.doctree similarity index 97% rename from docs/_build/.doctrees/generated/cellestial.xyplots.doctree rename to docs/.doctrees/generated/cellestial.xyplots.doctree index 2583739..97d9ede 100644 Binary files a/docs/_build/.doctrees/generated/cellestial.xyplots.doctree and b/docs/.doctrees/generated/cellestial.xyplots.doctree differ diff --git a/docs/_build/.doctrees/index.doctree b/docs/.doctrees/index.doctree similarity index 99% rename from docs/_build/.doctrees/index.doctree rename to docs/.doctrees/index.doctree index f5e0cc9..f895221 100644 Binary files a/docs/_build/.doctrees/index.doctree and b/docs/.doctrees/index.doctree differ diff --git a/docs/_build/.doctrees/performance.doctree b/docs/.doctrees/performance.doctree similarity index 94% rename from docs/_build/.doctrees/performance.doctree rename to docs/.doctrees/performance.doctree index 27b52fe..639026f 100644 Binary files a/docs/_build/.doctrees/performance.doctree and b/docs/.doctrees/performance.doctree differ diff --git a/docs/_build/.doctrees/philosophy.doctree b/docs/.doctrees/philosophy.doctree similarity index 96% rename from docs/_build/.doctrees/philosophy.doctree rename to docs/.doctrees/philosophy.doctree index caff885..fd24e8d 100644 Binary files a/docs/_build/.doctrees/philosophy.doctree and b/docs/.doctrees/philosophy.doctree differ diff --git a/docs/_build/API.html b/docs/API.html similarity index 99% rename from docs/_build/API.html rename to docs/API.html index 4b3a8d2..3de6c7c 100644 --- a/docs/_build/API.html +++ b/docs/API.html @@ -31,7 +31,7 @@ - + diff --git a/docs/_build/.doctrees/API.doctree b/docs/_build/.doctrees/API.doctree deleted file mode 100644 index ccc006d..0000000 Binary files a/docs/_build/.doctrees/API.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.basic.heatmap.heatmap.doctree b/docs/_build/.doctrees/generated/cellestial.single.basic.heatmap.heatmap.doctree deleted file mode 100644 index 90d10c9..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.basic.heatmap.heatmap.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.basic.scatter.scatter.doctree b/docs/_build/.doctrees/generated/cellestial.single.basic.scatter.scatter.doctree deleted file mode 100644 index 75a887d..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.basic.scatter.scatter.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.common.xyplot.xyplot.doctree b/docs/_build/.doctrees/generated/cellestial.single.common.xyplot.xyplot.doctree deleted file mode 100644 index cb51714..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.common.xyplot.xyplot.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.common.xyplots.xyplots.doctree b/docs/_build/.doctrees/generated/cellestial.single.common.xyplots.xyplots.doctree deleted file mode 100644 index 67fc403..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.common.xyplots.xyplots.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.dimensional.dimensional.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.dimensional.dimensional.doctree deleted file mode 100644 index 27e09a3..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.dimensional.dimensional.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.distribution.boxplot.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.distribution.boxplot.doctree deleted file mode 100644 index ffdf3e5..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.distribution.boxplot.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.distribution.violin.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.distribution.violin.doctree deleted file mode 100644 index f4db1f7..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.distribution.violin.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.distributions.boxplots.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.distributions.boxplots.doctree deleted file mode 100644 index 6ecad37..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.distributions.boxplots.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.distributions.violins.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.distributions.violins.doctree deleted file mode 100644 index 2b0e50e..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.distributions.violins.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.expression.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.expression.doctree deleted file mode 100644 index 25ef864..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.expression.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.pca.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.pca.doctree deleted file mode 100644 index 31ca93a..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.pca.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.tsne.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.tsne.doctree deleted file mode 100644 index 5aa8fac..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.tsne.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.umap.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.umap.doctree deleted file mode 100644 index 0786faf..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensional.umap.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.dimensionals.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.dimensionals.doctree deleted file mode 100644 index b01e869..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.dimensionals.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.expressions.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.expressions.doctree deleted file mode 100644 index 80d966c..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.expressions.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.pcas.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.pcas.doctree deleted file mode 100644 index d058a3b..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.pcas.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.tsnes.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.tsnes.doctree deleted file mode 100644 index 1497def..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.tsnes.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.umaps.doctree b/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.umaps.doctree deleted file mode 100644 index 8b0cc41..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.core.subdimensionals.umaps.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.single.special.dotplot.dotplot.doctree b/docs/_build/.doctrees/generated/cellestial.single.special.dotplot.dotplot.doctree deleted file mode 100644 index 0068d53..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.single.special.dotplot.dotplot.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.util.colors.show_colors.doctree b/docs/_build/.doctrees/generated/cellestial.util.colors.show_colors.doctree deleted file mode 100644 index a6c2aac..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.util.colors.show_colors.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.util.get_mapping.doctree b/docs/_build/.doctrees/generated/cellestial.util.get_mapping.doctree deleted file mode 100644 index f9df2d8..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.util.get_mapping.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.util.utilities.get_mapping.doctree b/docs/_build/.doctrees/generated/cellestial.util.utilities.get_mapping.doctree deleted file mode 100644 index 73fc256..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.util.utilities.get_mapping.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.util.utilities.retrieve.doctree b/docs/_build/.doctrees/generated/cellestial.util.utilities.retrieve.doctree deleted file mode 100644 index 5aa3b91..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.util.utilities.retrieve.doctree and /dev/null differ diff --git a/docs/_build/.doctrees/generated/cellestial.util.utilities.slice.doctree b/docs/_build/.doctrees/generated/cellestial.util.utilities.slice.doctree deleted file mode 100644 index 87f37dc..0000000 Binary files a/docs/_build/.doctrees/generated/cellestial.util.utilities.slice.doctree and /dev/null differ diff --git a/docs/_build/_modules/cellestial/frames/build.html b/docs/_build/_modules/cellestial/frames/build.html deleted file mode 100644 index 283e546..0000000 --- a/docs/_build/_modules/cellestial/frames/build.html +++ /dev/null @@ -1,679 +0,0 @@ - - - - - - - - - - cellestial.frames.build - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.frames.build

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-import pandas as pd
-import polars as pl
-from anndata import AnnData
-
-from cellestial.util.errors import KeyNotFoundError
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-
-def _anndata_variable_columns(
-    data: AnnData, column_names: list[str], keys: str | Sequence[str]
-) -> list[pl.Series]:
-    """Return a list of variable columns as Polars `Series`."""
-    columns = []
-    if isinstance(keys, str):
-        keys = [keys]
-    for key in keys:
-        if key in column_names:  # check for repeats
-            continue
-        elif key in data.var_names:
-            values = data.obs_vector(key)
-            # add the variable column to the list of columns
-            columns.append(pl.Series(key, values).cast(pl.Float32))
-            column_names.append(key)
-        else:
-            msg = f"Key `{key}` not found in data."
-            raise KeyNotFoundError(msg)
-
-    return columns
-
-
-def anndata_observations_frame(
-    data: AnnData,
-    /,
-    variable_keys: str | Sequence[str] | None = None,
-    *,
-    observations_name="barcode",
-    include_dimensions: bool | int = False,
-) -> pl.DataFrame:
-    """
-    Build an Observations DataFrame from an AnnData object.
-
-    Parameters
-    ----------
-    data : AnnData
-        The AnnData object containing the observations.
-    variable_keys : str | Sequence[str] | None
-        Variable keys to add to the DataFrame. If None, no additional keys are added.
-    observations_name : str, optional
-        The name of the observations column, default is 'barcode'.
-    include_dimensions : bool | int
-        Whether to include dimensions from `obsm` in the DataFrame, default is False.
-        Providing an integer will limit the number of dimensions to given number.
-
-    Returns
-    -------
-    DataFrame
-        A DataFrame containing the observations, with optional variable keys and dimensions.
-    """
-    # Check if data is an AnnData object
-    if not isinstance(data, AnnData):
-        msg = "data must be an `AnnData` object"
-        raise TypeError(msg)
-    if not isinstance(data.obs, pd.DataFrame):  # in case of Dataset2D
-        part = data.obs.to_memory()
-    else:
-        part = data.obs
-    partm = data.obsm
-    # PART 1: INITIALIZE
-    columns = [pl.Series(observations_name, data.obs_names)]
-    # PART 2: ADD AnnData.obs
-    for key in part.columns:
-        # handle categorical integer data
-        if part.dtypes[key] == "category" and part[key].cat.categories.dtype.kind in "iuf":
-            # Check if the categories are numeric (integer 'i','u' or float 'f' kinds)
-            # Only convert if the category dtype is numeric ('i', 'u', 'f')
-            # Convert to string (str) and then back to categorical
-            columns.append(pl.Series(part[key].astype(str)).cast(pl.Categorical))
-        else:
-            columns.append(pl.Series(part[key]))
-
-    # PART 3: ADD dimensions if needed
-    if include_dimensions:
-        for X in partm:
-            total_cols = partm[X].shape[1]  # Number of dimensions (columns)
-            if isinstance(include_dimensions, int) and not isinstance(include_dimensions, bool):
-                if include_dimensions >= 0:
-                    col_count = min(include_dimensions, total_cols)
-                else:
-                    msg = "Number of dimensions cannot be a negative number."
-                    raise ValueError(msg)
-            elif isinstance(include_dimensions, bool):
-                col_count = total_cols
-            else:
-                msg = "Argument for `include_dimensions` MUST be either a `bool` or an `int` type."
-                msg += f" You provided type {type(include_dimensions)}"
-                raise TypeError(msg)
-
-            for col in range(col_count):
-                columns.append(pl.Series(f"{X.upper()}{col + 1}", partm[X][:, col]))
-
-    # PART 4: ADD keys if provided
-    if variable_keys is not None:
-        column_names = [column.name for column in columns]
-        columns.extend(
-            _anndata_variable_columns(data=data, column_names=column_names, keys=variable_keys)
-        )
-
-    return pl.DataFrame(columns)
-
-
-def anndata_variables_frame(
-    data: AnnData,
-    *,
-    variables_name: str = "variable",
-    include_dimensions: bool | int = False,
-) -> pl.DataFrame:
-    """
-    Build a Variables DataFrame from an AnnData object.
-
-    Parameters
-    ----------
-    data : AnnData
-        The AnnData object containing the variables.
-    variables_name : str
-        Name for the variables index column, default is 'variable'
-    include_dimensions : bool | int
-        Whether to include dimensions from `varm` in the DataFrame, default is False.
-        Providing an integer will limit the number of dimensions to given number.
-
-    Returns
-    -------
-    DataFrame
-        A DataFrame containing the variables.
-    """
-    # PART 1: INITIALIZE
-    if not isinstance(data, AnnData):
-        msg = "data must be an `AnnData` object"
-        raise TypeError(msg)
-    if not isinstance(data.var, pd.DataFrame):  # in case of Dataset2D
-        part = data.var.to_memory()
-    else:
-        part = data.var
-    partm = data.varm
-    # PART1: initalize columns
-    columns = [pl.Series(variables_name, data.var_names)]
-    # PART 3: ADD AnnData.var
-    for key in part.columns:
-        # handle categorical integer data
-        if part.dtypes[key] == "category" and part[key].cat.categories.dtype.kind in "iuf":
-            # Check if the categories are numeric (integer 'i','u' or float 'f' kinds)
-            # Only convert if the category dtype is numeric ('i', 'u', 'f')
-            # Convert to string (str) and then back to categorical
-            columns.append(pl.Series(part[key].astype(str)).cast(pl.Categorical))
-        else:
-            columns.append(pl.Series(part[key]))
-
-    # PART 4: ADD dimensions if needed
-    if include_dimensions:
-        for X in partm:
-            total_cols = partm[X].shape[1]  # Number of dimensions (columns)
-            if isinstance(include_dimensions, int) and not isinstance(include_dimensions, bool):
-                if include_dimensions >= 0:
-                    col_count = min(include_dimensions, total_cols)
-                else:
-                    msg = "Number of dimensions cannot be a negative number."
-                    raise ValueError(msg)
-            elif isinstance(include_dimensions, bool):
-                col_count = total_cols
-            else:
-                msg = "Argument for `include_dimensions` MUST be either a `bool` or an `int` type."
-                msg += f" You provided type {type(include_dimensions)}"
-                raise TypeError(msg)
-
-            for col in range(col_count):
-                columns.append(pl.Series(f"{X.upper()}{col + 1}", partm[X][:, col]))
-
-    return pl.DataFrame(columns)
-
-
-
-[docs] -def build_frame( - data: AnnData, - *, - variable_keys: str | Sequence[str] | None = None, - axis: Literal[0, 1] | None = None, - observations_name: str = "barcode", - variables_name: str = "variable", - include_dimensions: bool | int = False, -) -> pl.DataFrame: - """ - Build a `polars.DataFrame` from an AnnData object. - - Parameters - ---------- - data : AnnData - The AnnData object containing the variables. - variable_keys : str | Sequence[str] | None - Variable keys to add to the DataFrame. If None, no additional keys are added. - axis : Literal[0,1] | None - The axis to build the frame for. 0 for observations, 1 for variables. - observations_name : str - The name of the observations column, default is 'barcode'. - variables_name : str - Name for the variables index column, default is 'variable' - include_dimensions : bool | int - Whether to include dimensions in the DataFrame, default is False. - Providing an integer will limit the number of dimensions to given number. - - - Returns - ------- - DataFrame - A polars DataFrame containing the variables. - """ - if isinstance(data, AnnData): - # infer the axis if not provided - if axis is None and variable_keys is not None: - axis = 0 - - if axis == 0: - frame = anndata_observations_frame( - data, - variable_keys=variable_keys, - observations_name=observations_name, - include_dimensions=include_dimensions, - ) - elif axis == 1: - frame = anndata_variables_frame( - data, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) - elif axis is None: - msg = "`axis` parameter must be specified, 0 for observations, 1 for variables." - raise ValueError(msg) - else: - msg = f"Unsupported data type: `{type(data)}`" - raise TypeError(msg) - - return frame
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/layers/outline.html b/docs/_build/_modules/cellestial/layers/outline.html deleted file mode 100644 index 6a93e94..0000000 --- a/docs/_build/_modules/cellestial/layers/outline.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - - - - - - - cellestial.layers.outline - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.layers.outline

-from collections.abc import Sequence
-from typing import Literal
-
-import numpy as np
-import polars as pl
-from lets_plot import aes, geom_path
-from lets_plot.plot.core import FeatureSpec, LayerSpec, PlotSpec
-from polars import DataFrame
-
-from cellestial.util import get_mapping
-
-
-def _get_density_boundaries(
-    frame: DataFrame,
-    x: str,
-    y: str,
-    group_by: str,
-    groups: str | Sequence[str | Sequence[str]],
-    padding: float = 1,
-    level: float = 0.1,
-    grid_size: int = 200,
-) -> pl.DataFrame:
-    """Creates and Returns a DataFrame to encircle the cluster via `geom_path`."""
-    from scipy.stats import gaussian_kde
-    from skimage import measure
-
-    # 1. Normalize input to a Sequence of Sequences: List[List[str]]
-    if isinstance(groups, str):
-        groups = [[groups]]
-    else:
-        groups = [
-            [g] if isinstance(g, str) else list(g)
-            for g in groups
-        ]
-
-    boundaries = []
-    for group in groups:
-        group_label = "+".join(group) if len(group) > 1 else group[0]
-        points = frame.filter(pl.col(group_by).is_in(group)).select([x, y]).to_numpy()
-        if len(points) < 5:
-            continue
-
-        # 2. KDE Calculation
-        kde = gaussian_kde(points.T)
-
-        # 3. Create Grid
-        x_min, y_min = points.min(axis=0) - padding
-        x_max, y_max = points.max(axis=0) + padding
-
-        x_range = np.linspace(x_min, x_max, grid_size)
-        y_range = np.linspace(y_min, y_max, grid_size)
-        xi, yi = np.meshgrid(x_range, y_range)
-
-        # 4. Evaluate Density
-        zi = kde(np.vstack([xi.flatten(), yi.flatten()])).reshape(xi.shape)
-
-        # 5. Extract Contours (The skimage magic)
-        threshold = zi.max() * level
-        # find_contours returns a list of [row, col] arrays
-        contours = measure.find_contours(zi, threshold)
-
-        for i, contour in enumerate(contours):
-            # Map grid indices back to DIM coordinates
-            # Note: skimage returns (row, col) which maps to (y_index, x_index)
-            actual_x = np.interp(contour[:, 1], np.arange(grid_size), x_range)
-            actual_y = np.interp(contour[:, 0], np.arange(grid_size), y_range)
-
-            boundaries.append(
-                pl.DataFrame(
-                    {
-                        x: actual_x,
-                        y: actual_y,
-                        group_by: [group_label] * len(actual_x),
-                        "path": [f"{group_label}_{i}"] * len(actual_x),
-                    }
-                )
-            )
-
-    return pl.concat(boundaries)
-
-
-
-[docs] -def cluster_outlines( - plot: PlotSpec, - groups: str | Sequence[str | Sequence[str]], - *, - padding: float = 1.5, - level: float = 0.04, - grid_size: int = 200, - color: str = "#1f1f1f", - linetype: Literal[ - "blank", "solid", "dashed", "dotted", "dotdash", "longdash", "twodash" - ] = "dashed", - mapping: FeatureSpec | None = None, - size: float = 1, - group_by: str | None = None, - x: str | None = None, - y: str | None = None, - **geom_kwargs, -) -> LayerSpec: - """ - Returns a Layer of `geom_path` that outlines the given clusters. - - Parameters - ---------- - plot : PlotSpec - The plot to which the layer will be added. Used to extract data and aesthetics. - groups : str | Sequence[str | Sequence[str]] - The group(s) to outline. Can be a single group name or a list of group - Providing string(s) will outline clusters with those group names. - Providing nested sequences of strings combines each sequence into a their own group. - E.g `groups=[['A', 'B']]` will outline groups A and B as if they were one cluster. - padding : float, default=1.5 - The spatial buffer added to the cluster's bounding box before calculating density. - Increasing this value allows the density 'cloud' to expand further from the outermost - points, ensuring the resulting curve is smooth and not truncated at the data edges. - level : float, default=0.04 - The density threshold for the outline, expressed as a fraction of the peak density - (0.0 to 1.0). A lower value creates a larger, more inclusive 'bubble' that captures - outliers, while a higher value creates a tighter boundary around the cluster's core. - grid_size : int, default=200 - The resolution of the internal sampling grid used for the Marching Squares algorithm. - A higher value produces a smoother, more 'curvy' path by increasing the number of - interpolation points, while a lower value improves calculation speed but may - result in a more jagged or 'pixelated' appearance. - color : str, default='#1f1f1f' - The color of the outline. - linetype : str, default='dashed' - The linetype of the outline. E.g 'dashed', 'dotted', - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - size : float, default=1 - The size of the outline. - group_by : str | None, default=None - The column name in the data used to group clusters by. e.g 'cell_type'. - If None, it will be inferred from the plot aesthetics. - x : str | None, default=None - The column name in the data used for x-axis coordinates. e.g 'X_UMAP1'. - If None, it will be inferred from the plot aesthetics. - y : str | None, default=None - The column name in the data used for y-axis coordinates. e.g 'X_UMAP2'. - If None, it will be inferred from the plot aesthetics. - **geom_kwargs - Additional parameters for the `geom_path` layer. - For more information on geom_path parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_path.html - - """ - # get mapping - _mapping = get_mapping(plot, index=0) - x = _mapping.get("x") if x is None else x - y = _mapping.get("y") if y is None else y - group_by = _mapping.get("color") if group_by is None else group_by - if x is None: - msg = "`x` is present neither as argument nor in the plot aesthetics." - raise ValueError(msg) - if y is None: - msg = "`y` is present neither as argument nor in the plot aesthetics." - raise ValueError(msg) - if group_by is None: - msg = "`group_by` is present neither as argument nor in the plot aesthetics." - raise ValueError(msg) - # get data - frame = plot.get_plot_shared_data() - # get boundaries - frame = _get_density_boundaries( - frame, - x=x, - y=y, - group_by=group_by, - groups=groups, - padding=padding, - level=level, - grid_size=grid_size, - ) - # create and return the plot - if mapping is None: - mapping = aes() - return geom_path( - data=frame, - mapping=aes(x=x, y=y, group="path", **mapping.as_dict()), - color=color, - linetype=linetype, - size=size, - **geom_kwargs, - )
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/base/base.html b/docs/_build/_modules/cellestial/single/base/base.html deleted file mode 100644 index 896074a..0000000 --- a/docs/_build/_modules/cellestial/single/base/base.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - - - - cellestial.single.base.base - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.base.base

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-from anndata import AnnData
-from lets_plot import ggplot
-
-from cellestial.frames import build_frame
-from cellestial.util import _determine_axis
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-
-
-[docs] -def plot( - data: AnnData, - mapping: FeatureSpec | None = None, - *, - axis: Literal[0, 1] | None = None, - variable_keys: Sequence[str] | None = None, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, -) -> PlotSpec: - """ - Base plot (for plots without data wrangling). - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - mapping : FeatureSpec | None, default=None - Aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - variable_keys : str | Sequence[str] | None - Variable keys to add to the DataFrame. If None, no additional keys are added. - observations_name : str - The name of the observations column, default is 'barcode'. - variables_name : str - Name for the variables index column, default is 'variable' - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - - Returns - ------- - PlotSpec - Base ggplot object. - - Examples - -------- - .. jupyter-execute:: - :linenos: - :emphasize-lines: 10 - - from lets_plot import * - LetsPlot.setup_html() - - import cellestial as cl - import scanpy as sc - - data = sc.read_h5ad('data/pbmc3k_pped.h5ad') - - p1 = ( - cl.plot(data, aes(x='cell_type_lvl1', y='n_genes')) - ) - p1 # plot object without layers - - - .. jupyter-execute:: - :linenos: - :emphasize-lines: 10-13 - - from lets_plot import * - LetsPlot.setup_html() - - import cellestial as cl - import scanpy as sc - - data = sc.read_h5ad('data/pbmc3k_pped.h5ad') - - p2 = ( - cl.plot(data, aes(x='cell_type_lvl1', y='n_genes')) - + geom_violin(aes(fill='cell_type_lvl1'), scale='width') - + geom_boxplot(width=0.2,outlier_size=0) - + scale_fill_viridis() - ) - p2 - - """ - # Handling Data types - if not isinstance(data, AnnData): - msg = "data must be an `AnnData` object" - raise TypeError(msg) - - # BUILD: the dataframe - if mapping is not None: - keys = [v for v in mapping.as_dict().values() if v is not None] - axis = _determine_axis(data=data, keys=keys) if axis is None else axis - frame = build_frame( - data=data, - variable_keys=variable_keys, - axis=axis, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) - - return ggplot(data=frame, mapping=mapping)
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/basic/bar.html b/docs/_build/_modules/cellestial/single/basic/bar.html deleted file mode 100644 index ef37ee6..0000000 --- a/docs/_build/_modules/cellestial/single/basic/bar.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - - - - - cellestial.single.basic.bar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.basic.bar

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-from lets_plot import geom_bar, ggtb
-
-from cellestial.single.base import plot as baseplot
-from cellestial.util import _determine_axis
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-
-
-[docs] -def bar( - data: AnnData, - mapping: FeatureSpec | None = None, - *, - axis: Literal[0, 1] | None = None, - variable_keys: Sequence[str] | None = None, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, - interactive: bool = False, - **geom_kwargs, -) -> PlotSpec: - """ - Bar Plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - mapping : FeatureSpec | None, default=None - Aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - axis : Literal[0,1] | None, default=None - The axis to build the frame for. 0 for observations, 1 for variables. - observations_name : str, default='Barcode' - The name of the observations column. - variables_name : str, default='Variable' - Name for the variables index column. - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - interactive : bool, default=False - Whether to make the plot interactive. - **geom_kwargs - Additional parameters for the `geom_bar` layer. - For more information on geom_bar parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_bar.html - - Returns - ------- - PlotSpec - Bar plot. - - Examples - -------- - .. jupyter-execute:: - :linenos: - :emphasize-lines: 10-11 - - from lets_plot import * - LetsPlot.setup_html() - - import cellestial as cl - import scanpy as sc - - data = sc.read_h5ad('data/pbmc3k_pped.h5ad') - - p1 = ( - cl.bar(data, mapping=aes('leiden', fill='predicted_doublet')) - + scale_fill_brewer(palette='Set2', direction=-1) - ) - p1 - - Example 2 - - .. jupyter-execute:: - :linenos: - :emphasize-lines: 10-11 - - from lets_plot import * - LetsPlot.setup_html() - - import cellestial as cl - import scanpy as sc - - data = sc.read_h5ad('data/pbmc3k_pped.h5ad') - - p2 = ( - cl.bar(data, mapping=aes('cell_type_lvl1', fill='leiden')) - + scale_fill_brewer(palette='Set2') - ) - p2 - - """ - if mapping is not None: - keys = [v for v in mapping.as_dict().values() if v is not None] - axis = _determine_axis(data=data, keys=keys) if axis is None else axis - br = baseplot( - data=data, - mapping=None, - axis=axis, - variable_keys=variable_keys, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) + geom_bar(mapping=mapping, **geom_kwargs) - - if interactive: - br += ggtb(size_zoomin=-1) - - return br
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/basic/heatmap.html b/docs/_build/_modules/cellestial/single/basic/heatmap.html deleted file mode 100644 index 6115ae3..0000000 --- a/docs/_build/_modules/cellestial/single/basic/heatmap.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - - - - - cellestial.single.basic.heatmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.basic.heatmap

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-from lets_plot import geom_tile, ggtb
-
-from cellestial.single.base import plot as baseplot
-from cellestial.themes import _THEME_HEATMAP
-from cellestial.util import _determine_axis
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-
-
-[docs] -def heatmap( - data: AnnData, - mapping: FeatureSpec | None = None, - *, - axis: Literal[0, 1] | None = None, - variable_keys: Sequence[str] | None = None, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, - interactive: bool = False, - **geom_kwargs, -) -> PlotSpec: - """ - Heatmap. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - mapping : FeatureSpec | None, default=None - Aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - observations_name : str, default='Barcode' - The name of the observations column. - variables_name : str, default='Variable' - Name for the variables index column. - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - interactive : bool, default=False - Whether to make the plot interactive. - **geom_kwargs - Additional parameters for the `geom_bar` layer. - For more information on geom_bar parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_bar.html - - Returns - ------- - PlotSpec - Heatmap. - """ - if mapping is not None: - keys = [v for v in mapping.as_dict().values() if v is not None] - axis = _determine_axis(data=data, keys=keys) if axis is None else axis - htmp = ( - baseplot( - data=data, - mapping=None, - axis=axis, - variable_keys=variable_keys, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) - + geom_tile(mapping=mapping, **geom_kwargs) - + _THEME_HEATMAP - ) - - if interactive: - htmp += ggtb(size_zoomin=-1) - - return htmp
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/basic/scatter.html b/docs/_build/_modules/cellestial/single/basic/scatter.html deleted file mode 100644 index 37812b8..0000000 --- a/docs/_build/_modules/cellestial/single/basic/scatter.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - - - - - cellestial.single.basic.scatter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.basic.scatter

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-# Data retrieval
-from lets_plot import (
-    geom_point,
-    ggtb,
-)
-
-from cellestial.single.base import plot as baseplot
-from cellestial.util import _determine_axis
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-
-
-[docs] -def scatter( - data: AnnData, - mapping: FeatureSpec | None = None, - *, - axis: Literal[0, 1] | None = None, - variable_keys: Sequence[str] | None = None, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, - interactive: bool = False, - **geom_kwargs, -) -> PlotSpec: - """ - Scatter Plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - mapping : FeatureSpec | None, default=None - Aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - axis : Literal[0,1] | None, default=None - The axis to build the frame for. 0 for observations, 1 for variables. - observations_name : str, default='Barcode' - The name of the observations column. - variables_name : str, default='Variable' - Name for the variables index column. - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - interactive : bool, default=False - Whether to make the plot interactive. - **geom_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Scatter plot. - - """ - if mapping is not None: - keys = [v for v in mapping.as_dict().values() if v is not None] - axis = _determine_axis(data=data, keys=keys) if axis is None else axis - # BUILD: the scatter plot - scttr = baseplot( - data=data, - mapping=None, - axis=axis, - variable_keys=variable_keys, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) + geom_point(mapping=mapping, **geom_kwargs) - - if interactive: - scttr += ggtb(size_zoomin=-1) - - return scttr
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/common/xyplot.html b/docs/_build/_modules/cellestial/single/common/xyplot.html deleted file mode 100644 index 0917399..0000000 --- a/docs/_build/_modules/cellestial/single/common/xyplot.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - - - - cellestial.single.common.xyplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.common.xyplot

-from __future__ import annotations
-
-from collections.abc import Sequence
-from typing import TYPE_CHECKING, Literal
-
-from anndata import AnnData
-from lets_plot import (
-    aes,
-    geom_point,
-    ggplot,
-    ggtb,
-    labs,
-    layer_tooltips,
-)
-from lets_plot.plot.core import FeatureSpec
-
-from cellestial.frames import build_frame
-from cellestial.themes import _THEME_SCATTER
-from cellestial.util import (
-    _determine_axis,
-    _select_variable_keys,
-)
-
-if TYPE_CHECKING:
-    from lets_plot.plot.core import PlotSpec
-
-
-
-[docs] -def xyplot( - data: AnnData, - x: str, - y: str, - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, - **point_kwargs, -) -> PlotSpec: - """ - Scatter Plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - x : str - The key for the x-axis. - y : str - The key for the y-axis. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Variable' - The name to give to variable index column in the dataframe. - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Scatter plot. - - """ - # Handling Data types - if not isinstance(data, AnnData): - msg = "data must be an `AnnData` object" - raise TypeError(msg) - - # HANDLE: mapping - _mapping = aes(x=x, y=y) - if mapping is None: - mapping = _mapping - elif isinstance(mapping, FeatureSpec): - merged = _mapping.as_dict() | mapping.as_dict() - mapping = aes(**merged) - - # Determine variable keys - keys = [key for key in mapping.as_dict().values() if key is not None] - variable_keys = _select_variable_keys(data=data, keys=keys) - # include dimensions if a dimensional key provided - if not include_dimensions: - _keys = keys.copy() - for key in keys: - if key.startswith("X_"): - include_dimensions = True - _keys.remove(key) - - # HANDLE: tooltips - if tooltips is None: - tooltips = keys - tooltips_spec = layer_tooltips(tooltips) - elif tooltips == "none" or isinstance(tooltips, str): - tooltips_spec = tooltips - elif isinstance(tooltips, Sequence): - tooltips = list(tooltips) - tooltips_spec = layer_tooltips(tooltips) - tooltips_variables = _select_variable_keys(data, tooltips) - if not set(tooltips_variables).issubset(variable_keys): - variable_keys.extend(tooltips_variables) - elif isinstance(tooltips, FeatureSpec): - tooltips_spec = tooltips - - # BUILD: the dataframe - axis = _determine_axis(data=data, keys=_keys) if axis is None else axis - frame = build_frame( - data=data, - variable_keys=variable_keys, - axis=axis, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - ) - - # BUILD: the scatterplot - scttr = ( - ggplot(data=frame) - + geom_point( - mapping=mapping, - tooltips=tooltips_spec, - **point_kwargs, - ) - + labs(x=x, y=y) - + _THEME_SCATTER - ) - if interactive: - scttr += ggtb(size_zoomin=-1) - - return scttr
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/common/xyplots.html b/docs/_build/_modules/cellestial/single/common/xyplots.html deleted file mode 100644 index 2b4d0aa..0000000 --- a/docs/_build/_modules/cellestial/single/common/xyplots.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - - - - cellestial.single.common.xyplots - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.common.xyplots

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-from lets_plot import gggrid
-from lets_plot.plot.core import FeatureSpec, LayerSpec
-
-from cellestial.single.common.xyplot import xyplot
-from cellestial.util.errors import ConfilictingLengthError
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.subplots import SupPlotsSpec
-
-
-
-[docs] -def xyplots( - data: AnnData, - x: str | Sequence[str], - y: str | Sequence[str], - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - variables_name: str = "Variable", - include_dimensions: bool | int = False, - # multi plot args - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Scatter Plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - x : str - The key(s) for the x-axis. - y : str - The key(s) for the y-axis. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Variable' - The name to give to variable index column in the dataframe. - include_dimensions : bool | int, default=False - Whether to include dimensions in the DataFrame. - Providing an integer will limit the number of dimensions to given number. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Scatter plot. - """ - # str to list for x and y - if isinstance(x, str): - x = [x] - if isinstance(y, str): - y = [y] - - # check for broadcasting - if len(x) != len(y): - if len(x) == 1: - x = list(x) * len(y) - elif len(y) == 1: - y = list(y) * len(x) - else: - msg = f"Length of x ({len(x)}) and y ({len(y)}) must be the same, or one of them must be of length 1." - raise ConfilictingLengthError(msg) - - # build plots - plots = [] - for xi, yi in zip(x, y, strict=True): - plot = xyplot( - data, - x=xi, - y=yi, - mapping=mapping, - axis=axis, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - variables_name=variables_name, - include_dimensions=include_dimensions, - **point_kwargs, - ) - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - plots.append(plot) - - scttrs = gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - ) - - return scttrs
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/core/dimensional.html b/docs/_build/_modules/cellestial/single/core/dimensional.html deleted file mode 100644 index b3e57ab..0000000 --- a/docs/_build/_modules/cellestial/single/core/dimensional.html +++ /dev/null @@ -1,744 +0,0 @@ - - - - - - - - - - cellestial.single.core.dimensional - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.core.dimensional

-from __future__ import annotations
-
-import warnings
-from collections.abc import Sequence
-from typing import TYPE_CHECKING, Literal
-
-# Core scverse libraries
-import polars as pl
-from anndata import AnnData
-
-# Data retrieval
-from lets_plot import (
-    aes,
-    geom_point,
-    ggplot,
-    ggtb,
-    labs,
-    layer_tooltips,
-    scale_color_brewer,
-)
-from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-from cellestial.frames import build_frame
-from cellestial.themes import _THEME_DIMENSION
-from cellestial.util import (
-    _add_arrow_axis,
-    _color_gradient,
-    _is_variable_key,
-    _legend_ondata,
-    _select_variable_keys,
-)
-
-if TYPE_CHECKING:
-    from lets_plot.plot.core import PlotSpec
-
-
-
-[docs] -def dimensional( - data: AnnData, - key: str | None = None, - *, - mapping : FeatureSpec | None = None, - dimensions: Literal["umap", "pca", "tsne"] = "umap", - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - **point_kwargs, -) -> PlotSpec: - """ - Dimensionality reduction plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str, default=None - The key (cell feature) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - dimensions : Literal['umap', 'pca', 'tsne'], default='umap' - The dimensional reduction method to use. - e.g., 'umap' or 'pca' or 'tsne'. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Dimensional reduction plot. - - """ - # HANDLE: Data types - if not isinstance(data, AnnData): - msg = "data must be an `AnnData` object" - raise TypeError(msg) - - # HANDLE: mapping - if mapping is None: - mapping = aes() - - # HANDLE: XY - if len(xy) != 2: - msg = f"xy MUST be of length 2, (len(xy)=={len(xy)})" - raise KeyError(msg) - if use_key is None: - x = f"X_{dimensions.upper()}{xy[0]}" # e.g. X_UMAP1 - y = f"X_{dimensions.upper()}{xy[1]}" # e.g. X_UMAP2 - else: - x = f"{use_key}{xy[0]}" # e.g. X_UMAP1 - y = f"{use_key}{xy[1]}" # e.g. X_UMAP2 - - # HANDLE: variable_keys - if variable_keys is None: - variable_keys = [] - elif isinstance(variable_keys, str): - variable_keys = [variable_keys] - elif isinstance(variable_keys, Sequence): - variable_keys = list(variable_keys) - - # Append the key if it is a variable key - if _is_variable_key(data, key): - variable_keys.append(key) # ty:ignore[invalid-argument-type] - - # HANDLE: tooltips - if tooltips is None: - tooltips = [observations_name] - if key is not None: - tooltips.append(key) - tooltips_spec = layer_tooltips(tooltips) - elif tooltips == "none" or isinstance(tooltips, str): - tooltips_spec = tooltips - elif isinstance(tooltips, Sequence): - tooltips = list(tooltips) - tooltips_spec = layer_tooltips(tooltips) - tooltips_variables = _select_variable_keys(data, tooltips) - if not set(tooltips_variables).issubset(variable_keys): - variable_keys.extend(tooltips_variables) - elif isinstance(tooltips, FeatureSpec): - tooltips_spec = tooltips - - # BUILD: dataframe - frame = build_frame( - data=data, - variable_keys=variable_keys, - axis=0, - observations_name=observations_name, - include_dimensions=max(xy), - ) - - # BUILD: scatter plot - scttr = ( - ggplot(data=frame) - + geom_point( - mapping=aes(x=x, y=y, color=key,**mapping.as_dict()), - size=size, - tooltips=tooltips_spec, - **point_kwargs, - ) - + _THEME_DIMENSION - ) - - if key is not None: - # CASE1 ---------------------- CATEGORICAL DATA ---------------------- - if frame[key].dtype == pl.Categorical: - scttr += scale_color_brewer(palette="Set2") - - # CASE2 ---------------------- CONTINUOUS DATA ---------------------- - elif frame[key].dtype.is_numeric(): - scttr += _color_gradient( - frame[key], - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - ) - # else: let letsplot handle it - - # HANDLE: tSNE label, a special case for labels - if dimensions == "tsne": - x_label = f"tSNE{xy[0]}" - y_label = f"tSNE{xy[1]}" - scttr += labs(x=x_label, y=y_label) - else: - # UMAP1 and UMAP2 rather than X_UMAP1 and X_UMAP2 etc., - scttr += labs( - x=x.replace("X_", ""), - y=y.replace("X_", ""), - ) - - # HANDLE: arrow axis - scttr += _add_arrow_axis( - frame=frame, - x=x, - y=y, - axis_type=axis_type, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - arrow_length=arrow_length, - ) - # HANDLE: interactive - if interactive: - scttr += ggtb(size_zoomin=-1) - - # HANDLE: legend on data - if key is not None and legend_ondata: - if frame[key].dtype == pl.Categorical: - scttr += _legend_ondata( - frame=frame, - x=x, - y=y, - group_by=key, - size=ondata_size, - color=ondata_color, - fontface=ondata_fontface, - family=ondata_family, - alpha=ondata_alpha, - weighted=ondata_weighted, - ) - elif frame[key].dtype != pl.Categorical: - msg = f"key `{key}` is not categorical, legend on data will not be added" - warnings.warn(msg, stacklevel=1) - - return scttr
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/core/distribution.html b/docs/_build/_modules/cellestial/single/core/distribution.html deleted file mode 100644 index a4c14d1..0000000 --- a/docs/_build/_modules/cellestial/single/core/distribution.html +++ /dev/null @@ -1,882 +0,0 @@ - - - - - - - - - - cellestial.single.core.distribution - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.core.distribution

-from __future__ import annotations
-
-from collections.abc import Sequence
-from typing import TYPE_CHECKING, Any, Literal
-
-from anndata import AnnData
-from lets_plot import (
-    aes,
-    geom_boxplot,
-    geom_jitter,
-    geom_point,
-    geom_sina,
-    geom_violin,
-    ggplot,
-    ggtb,
-    layer_tooltips,
-)
-from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-from cellestial.frames import build_frame
-from cellestial.themes import _THEME_DIST
-from cellestial.util import (
-    _determine_axis,
-    _select_variable_keys,
-)
-
-if TYPE_CHECKING:
-    from lets_plot.plot.core import PlotSpec
-
-
-def _distribution(
-    data: AnnData,
-    key: str | Sequence[str],
-    *,
-    mapping: FeatureSpec | None = None,
-    geom: Literal["violin", "boxplot"] = "violin",
-    axis: Literal[0, 1] | None = None,
-    color: str | None = None,
-    fill: str | None = None,
-    add_keys: Sequence[str] | str | None = None,
-    tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None,
-    geom_fill: str | None = "#FF00FF",
-    geom_color: str | None = "#2f2f2f",
-    point_color: str = "#1f1f1f",
-    point_alpha: float = 0.7,
-    point_size: float = 0.5,
-    point_geom: Literal["jitter", "point", "sina"] = "jitter",
-    observations_name: str = "Barcode",
-    variables_name: str = "Variable",
-    show_points: bool = True,
-    interactive: bool = False,
-    value_column: str = "value",
-    variable_column: str = "variable",
-    point_kwargs: dict[str, Any] | None = None,
-    **geom_kwargs,
-) -> PlotSpec:
-    # Handling Data types
-    if not isinstance(data, AnnData):
-        msg = "data must be an `AnnData` object"
-        raise TypeError(msg)
-
-    # HANDLE: mapping
-    if mapping is None:
-        mapping = aes()
-
-    # convert to list if single string
-    if isinstance(key, str):
-        keys = [key]
-    elif isinstance(key, Sequence):
-        keys = list(key)
-
-    # handle value_column if single key is provided
-    if len(keys) == 1:
-        value_column = keys[0]
-
-    # determine separator
-    separator = None
-    if fill is not None:
-        separator = fill
-    elif color is not None:
-        separator = color
-
-    if point_kwargs is None:
-        point_kwargs = {}
-
-    # determine index to unpivot
-    index = [x for x in [fill, color] if x is not None]
-    if add_keys is not None:
-        if isinstance(add_keys, str):
-            add_keys = [add_keys]
-        index.extend(add_keys)
-
-    # DETERMINE: axis if not provided
-    axis = _determine_axis(data=data, keys=keys) if axis is None else axis
-
-    # handle fill and color
-    geom_fill = None if fill is not None else geom_fill
-    geom_color = None if color is not None else geom_color
-
-    # BUILD: the DataFrame
-    variable_keys = _select_variable_keys(data=data, keys=keys)
-    variable_keys.extend(_select_variable_keys(data=data, keys=add_keys))
-    frame = build_frame(
-        data=data,
-        variable_keys=variable_keys,
-        axis=axis,
-        observations_name=observations_name,
-        variables_name=variables_name,
-    )
-
-    frame = frame.unpivot(
-        on=keys, index=index, value_name=value_column, variable_name=variable_column
-    )
-    if separator is None or len(keys) > 1:
-        separator = variable_column
-
-    # HANDLE: tooltips
-    if tooltips is None:
-        tooltips = [variable_column, value_column]
-        tooltips_spec = layer_tooltips(tooltips)
-    elif tooltips == "none" or isinstance(tooltips, str):
-        tooltips_spec = tooltips
-    elif isinstance(tooltips, Sequence):
-        tooltips = list(tooltips)
-        tooltips_spec = layer_tooltips(tooltips)
-    elif isinstance(tooltips, FeatureSpec):
-        tooltips_spec = tooltips
-
-    # BUILD: the plot
-    dst = ggplot(data=frame) + _THEME_DIST
-
-    # add the geom layer
-    if geom == "violin":
-        dst += geom_violin(
-            mapping=aes(
-                x=separator,
-                y=value_column,
-                color=color,
-                fill=fill,
-                **mapping.as_dict(),
-            ),
-            fill=geom_fill,
-            color=geom_color,
-            tooltips=layer_tooltips(frame.columns),
-            **geom_kwargs,
-        )
-    elif geom == "boxplot":
-        dst += geom_boxplot(
-            mapping=aes(
-                x=separator,
-                y=value_column,
-                color=color,
-                fill=fill,
-                **mapping.as_dict(),
-            ),
-            fill=geom_fill,
-            color=geom_color,
-            tooltips=layer_tooltips(frame.columns),
-            **geom_kwargs,
-        )
-
-    # handle the points (jitter,point,sina)
-    if show_points:
-        if point_geom in ["jitter", "point", "sina"]:
-            geom_functions = {
-                "jitter": geom_jitter,
-                "point": geom_point,
-                "sina": geom_sina,
-            }
-            geom_function = geom_functions.get(point_geom, geom_jitter)
-
-            dst += geom_function(
-                data=frame,
-                mapping=aes(x=separator, y=value_column),
-                color=point_color,
-                alpha=point_alpha,
-                size=point_size,
-                tooltips=tooltips_spec,
-                **point_kwargs,
-            )
-        else:
-            msg = "point_geom must be one of ['jitter','point','sina']."
-            raise KeyError(msg)
-
-    # handle interactive
-    if interactive:
-        dst += ggtb(size_zoomin=-1)
-
-    return dst
-
-
-
-[docs] -def violin( - data: AnnData, - key: str | Sequence[str], - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - color: str | None = None, - fill: str | None = None, - add_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - geom_fill: str | None = "#FF00FF", - geom_color: str | None = "#2f2f2f", - point_color: str = "#1f1f1f", - point_alpha: float = 0.7, - point_size: float = 0.5, - point_geom: Literal["jitter", "point", "sina"] = "jitter", - observations_name: str = "Barcode", - variables_name: str = "Variable", - show_points: bool = True, - interactive: bool = False, - value_column: str = "value", - variable_column: str = "variable", - point_kwargs: dict[str, Any] | None = None, - **geom_kwargs, -) -> PlotSpec: - """ - Violin Plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str | Sequence[str] - The key(s) to get the values (numerical). - e.g., 'total_counts' or a gene name. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - color : str | None, default=None - Color aesthetic to split the violin plot (categorical). - e,g., 'cell_type' or 'leiden'. - fill : str | None, default=None - Fill aesthetic to split the violin plot (categorical). - e,g., 'cell_type' or 'leiden'. - add_keys : Sequence[str] | str | None, default=None - Additional keys to include in the dataframe. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - geom_fill : str | None, default='#FF00FF' - Fill color for all violins in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - geom_color : str | None, default='#2f2f2f' - Border color for all violins in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_color : str, default='#1f1f1f' - Color for the points in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_alpha : float, default=0.7 - Alpha (transparency) for the points in the violin plot. - point_size : float, default=0.5 - Size for the points in the violin plot. - point_geom : Literal['jitter','point','sina'], default is 'jitter', - Geom type of the points, default is geom_jitter. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Variable' - The name to give to variable index column in the dataframe. - show_points : bool, default=True - Whether to show points. - interactive : bool, default=False - Whether to make the plot interactive. - variable_column : str, default='variable' - The name of the variable column in the dataframe. - value_column : str, default='value' - The name of the value column in the dataframe. - point_kwargs : dict[str, Any] | None, default=None - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - **geom_kwargs - Additional parameters for the `geom_violin` layer. - For more information on geom_violin parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_violin.html - - Returns - ------- - PlotSpec - Violin plot. - """ - return _distribution( - data=data, - key=key, - mapping=mapping, - geom="violin", - axis=axis, - color=color, - fill=fill, - add_keys=add_keys, - tooltips=tooltips, - geom_fill=geom_fill, - geom_color=geom_color, - point_color=point_color, - point_alpha=point_alpha, - point_size=point_size, - point_geom=point_geom, - observations_name=observations_name, - variables_name=variables_name, - show_points=show_points, - interactive=interactive, - value_column=value_column, - variable_column=variable_column, - point_kwargs=point_kwargs, - **geom_kwargs, - )
- - - -
-[docs] -def boxplot( - data: AnnData, - key: str | Sequence[str], - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - color: str | None = None, - fill: str | None = None, - add_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - geom_fill: str | None = "#FF00FF", - geom_color: str | None = "#2f2f2f", - point_color: str = "#1f1f1f", - point_alpha: float = 0.7, - point_size: float = 0.5, - point_geom: Literal["jitter", "point", "sina"] = "jitter", - observations_name: str = "Barcode", - variables_name: str = "Variable", - show_points: bool = True, - interactive: bool = False, - value_column: str = "value", - variable_column: str = "variable", - point_kwargs: dict[str, Any] | None = None, - **geom_kwargs, -) -> PlotSpec: - """ - Boxplot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str | Sequence[str] - The key(s) to get the values (numerical). - e.g., 'total_counts' or a gene name. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - color : str | None, default=None - Color aesthetic to split the boxplot (categorical). - e,g., 'cell_type' or 'leiden'. - fill : str | None, default=None - Fill aesthetic to split the boxplot (categorical). - e,g., 'cell_type' or 'leiden'. - add_keys : Sequence[str] | str | None, default=None - Additional keys to include in the dataframe. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - geom_fill : str | None, default='#FF00FF' - Fill color for all boxplots in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - geom_color : str | None, default='#2f2f2f' - Border color for all boxplots in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_color : str, default='#1f1f1f' - Color for the points in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_alpha : float, default=0.7 - Alpha (transparency) for the points in the boxplot. - point_size : float, default=0.5 - Size for the points in the boxplot. - point_geom : Literal['jitter','point','sina'], default is 'jitter', - Geom type of the points, default is geom_jitter. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Variable' - The name to give to variable index column in the dataframe. - show_points : bool, default=True - Whether to show points. - interactive : bool, default=False - Whether to make the plot interactive. - variable_column : str, default='variable' - The name of the variable column in the dataframe. - value_column : str, default='value' - The name of the value column in the dataframe. - point_kwargs : dict[str, Any] | None, default=None - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - **geom_kwargs - Additional parameters for the `geom_boxplot` layer. - For more information on geom_boxplot parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_boxplot.html - - Returns - ------- - PlotSpec - Boxplot. - """ - return _distribution( - data=data, - key=key, - mapping=mapping, - geom="boxplot", - axis=axis, - color=color, - fill=fill, - add_keys=add_keys, - tooltips=tooltips, - geom_fill=geom_fill, - geom_color=geom_color, - point_color=point_color, - point_alpha=point_alpha, - point_size=point_size, - point_geom=point_geom, - observations_name=observations_name, - variables_name=variables_name, - show_points=show_points, - interactive=interactive, - value_column=value_column, - variable_column=variable_column, - point_kwargs=point_kwargs, - **geom_kwargs, - )
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/core/distributions.html b/docs/_build/_modules/cellestial/single/core/distributions.html deleted file mode 100644 index ea5f83f..0000000 --- a/docs/_build/_modules/cellestial/single/core/distributions.html +++ /dev/null @@ -1,885 +0,0 @@ - - - - - - - - - - cellestial.single.core.distributions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.core.distributions

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Any, Literal
-
-from lets_plot import gggrid
-from lets_plot.plot.core import FeatureSpec, LayerSpec
-
-from cellestial.single.core.distribution import boxplot, violin
-from cellestial.util import _share_axis, _share_ticks
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.subplots import SupPlotsSpec
-
-
-
-[docs] -def violins( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - color: str | None = None, - fill: str | None = None, - add_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - geom_fill: str = "#FF00FF", - geom_color: str = "#2f2f2f", - point_color: str = "#1f1f1f", - point_alpha: float = 0.7, - point_size: float = 0.5, - point_geom: Literal["jitter", "point", "sina"] = "jitter", - observations_name: str = "Barcode", - variables_name: str = "Variable", - show_points: bool = True, - interactive: bool = False, - value_column: str = "value", - variable_column: str = "variable", - # multi plot args - share_axis: bool = False, - share_ticks: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list | None = None, - heights: list | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - # other kwargs - point_kwargs: dict[str, Any] | None = None, - **geom_kwargs, -) -> SupPlotsSpec: - """ - Violin Plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys to get the values (numerical). - e.g., ['total_counts', 'pct_counts_in_top_50_genes'] or a list of gene names. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - color : str | None, default=None - Color aesthetic to split the violin plot (categorical). - e,g., 'cell_type' or 'leiden'. - fill : str | None, default=None - Fill aesthetic to split the violin plot (categorical). - e,g., 'cell_type' or 'leiden'. - add_keys : Sequence[str] | str | None, default=None - Additional keys to include in the dataframe. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - geom_fill : str, default='#FF00FF' - Fill color for all violins in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - geom_color : str, default='#2f2f2f' - Border color for all violins in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_color : str, default='#1f1f1f' - Color for the points in the violin plot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_alpha : float, default=0.7 - Alpha (transparency) for the points in the violin plot. - point_size : float, default=0.5 - Size for the points in the violin plot. - point_geom : Literal['jitter','point','sina'], default is 'jitter', - Geom type of the points, default is geom_jitter. - trim : bool, default=False - Whether to trim the violin plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Gene' - The name to give to variable index column in the dataframe. - show_points : bool, default=True - Whether to show points. - interactive : bool, default=False - Whether to make the plot interactive. - share_ticks : bool, default=True - Whether to share the labels across all plots. - If True, only X tick texts on bottom row and Y tick text on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Additional layers to add to the plot. - variable_column : str, default='variable' - The name of the variable column in the dataframe. - value_column : str, default='value' - The name of the value column in the dataframe. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - point_kwargs : dict[str, Any] | None, default=None - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - **geom_kwargs - Additional parameters for the `geom_violin` layer. - For more information on geom_violin parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_violin.html - - Returns - ------- - SupPlotsSpec - Violin Plots. - """ - plots = [] - for i,key in enumerate(keys): - plot = violin( - data=data, - key=key, - mapping=mapping, - axis=axis, - color=color, - fill=fill, - add_keys=add_keys, - tooltips=tooltips, - geom_fill=geom_fill, - geom_color=geom_color, - point_color=point_color, - point_alpha=point_alpha, - point_size=point_size, - point_geom=point_geom, - observations_name=observations_name, - variables_name=variables_name, - show_points=show_points, - interactive=interactive, - value_column=value_column, - variable_column=variable_column, - point_kwargs=point_kwargs, - **geom_kwargs, - ) - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_ticks: - plot = _share_ticks(plot, i, keys, ncol) - if share_axis: - plot = _share_axis(plot, i, keys, ncol, "axis") - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - -
-[docs] -def boxplots( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - axis: Literal[0, 1] | None = None, - color: str | None = None, - fill: str | None = None, - add_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - geom_fill: str = "#FF00FF", - geom_color: str = "#2f2f2f", - point_color: str = "#1f1f1f", - point_alpha: float = 0.7, - point_size: float = 0.5, - point_geom: Literal["jitter", "point", "sina"] = "jitter", - observations_name: str = "Barcode", - variables_name: str = "Variable", - show_points: bool = True, - interactive: bool = False, - value_column: str = "value", - variable_column: str = "variable", - # multi plot args - share_axis: bool = False, - share_ticks: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list | None = None, - heights: list | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - # other kwargs - point_kwargs: dict[str, Any] | None = None, - **geom_kwargs, -) -> SupPlotsSpec: - """ - Boxplots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys to get the values (numerical). - e.g., ['total_counts', 'pct_counts_in_top_50_genes'] or a list of gene names. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - axis : Literal[0,1] | None, default=None - axis of the data, 0 for observations and 1 for variables. - color : str | None, default=None - Color aesthetic to split the boxplot (categorical). - e,g., 'cell_type' or 'leiden'. - fill : str | None, default=None - Fill aesthetic to split the boxplot (categorical). - e,g., 'cell_type' or 'leiden'. - add_keys : Sequence[str] | str | None, default=None - Additional keys to include in the dataframe. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - geom_fill : str, default='#FF00FF' - Fill color for all boxplots in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - geom_color : str, default='#2f2f2f' - Border color for all boxplots in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_color : str, default='#1f1f1f' - Color for the points in the boxplot. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - point_alpha : float, default=0.7 - Alpha (transparency) for the points in the boxplot. - point_size : float, default=0.5 - Size for the points in the boxplot. - point_geom : Literal['jitter','point','sina'], default is 'jitter', - Geom type of the points, default is geom_jitter. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - variables_name : str, default='Gene' - The name to give to variable index column in the dataframe. - show_points : bool, default=True - Whether to show points. - interactive : bool, default=False - Whether to make the plot interactive. - share_ticks : bool, default=True - Whether to share the labels across all plots. - If True, only X tick texts on bottom row and Y tick text on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Additional layers to add to the plot. - variable_column : str, default='variable' - The name of the variable column in the dataframe. - value_column : str, default='value' - The name of the value column in the dataframe. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - point_kwargs : dict[str, Any] | None, default=None - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - **geom_kwargs - Additional parameters for the `geom_boxplot` layer. - For more information on geom_boxplot parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_boxplot.html - - Returns - ------- - SupPlotsSpec - Boxplots. - """ - plots = [] - for i,key in enumerate(keys): - plot = boxplot( - data=data, - key=key, - mapping=mapping, - axis=axis, - color=color, - fill=fill, - add_keys=add_keys, - tooltips=tooltips, - geom_fill=geom_fill, - geom_color=geom_color, - point_color=point_color, - point_alpha=point_alpha, - point_size=point_size, - point_geom=point_geom, - observations_name=observations_name, - variables_name=variables_name, - show_points=show_points, - interactive=interactive, - value_column=value_column, - variable_column=variable_column, - point_kwargs=point_kwargs, - **geom_kwargs, - ) - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_ticks: - plot = _share_ticks(plot, i, keys, ncol) - if share_axis: - plot = _share_axis(plot, i, keys, ncol, "axis") - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/core/subdimensional.html b/docs/_build/_modules/cellestial/single/core/subdimensional.html deleted file mode 100644 index 149974f..0000000 --- a/docs/_build/_modules/cellestial/single/core/subdimensional.html +++ /dev/null @@ -1,1137 +0,0 @@ - - - - - - - - - - cellestial.single.core.subdimensional - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.core.subdimensional

-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Literal
-
-from cellestial.single.core.dimensional import dimensional
-from cellestial.util import _is_variable_key
-
-if TYPE_CHECKING:
-    from collections.abc import Sequence
-
-    from anndata import AnnData
-    from lets_plot.plot.core import FeatureSpec, PlotSpec
-
-
-
-[docs] -def umap( - data: AnnData, - key: str | None = None, - *, - mapping : FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - **point_kwargs, -) -> PlotSpec: - """ - UMAP Dimensionality reduction plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str, default=None - The key (cell feature) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Dimensional reduction plot. - - """ - return dimensional( - data=data, - key=key, - mapping=mapping, - dimensions="umap", - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - )
- - - -
-[docs] -def tsne( - data: AnnData, - key: str | None = None, - *, - mapping : FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - **point_kwargs, -) -> PlotSpec: - """ - tSNE Dimensionality reduction plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str, default=None - The key (cell feature) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Dimensional reduction plot. - - """ # noqa: D403 - return dimensional( - data=data, - key=key, - mapping=mapping, - dimensions="tsne", - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - )
- - - -
-[docs] -def pca( - data: AnnData, - key: str | None = None, - *, - mapping : FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - **point_kwargs, -) -> PlotSpec: - """ - PCA Dimensionality reduction plot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str, default=None - The key (cell feature) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Dimensional reduction plot. - - """ - return dimensional( - data=data, - key=key, - mapping=mapping, - dimensions="pca", - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - )
- - - -
-[docs] -def expression( - data: AnnData, - key: str, - *, - mapping : FeatureSpec | None = None, - dimensions: Literal["umap", "pca", "tsne"] = "umap", - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = "arrow", - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - **point_kwargs, -) -> PlotSpec: - """ - Dimensionality reduction plot of expression data. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - key : str - The key (gene names) to color the points by. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - dimensions : Literal['umap', 'pca', 'tsne'], default='umap' - The dimensional reduction method to use. - e.g., 'umap' or 'pca' or 'tsne'. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - PlotSpec - Dimensional reduction plot. - - """ - if not _is_variable_key(data, key): - msg = f"'{key}' is not present in `variable` names" - raise ValueError(msg) - return dimensional( - data=data, - key=key, - mapping=mapping, - dimensions=dimensions, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - )
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/core/subdimensionals.html b/docs/_build/_modules/cellestial/single/core/subdimensionals.html deleted file mode 100644 index e1f6337..0000000 --- a/docs/_build/_modules/cellestial/single/core/subdimensionals.html +++ /dev/null @@ -1,1789 +0,0 @@ - - - - - - - - - - cellestial.single.core.subdimensionals - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.core.subdimensionals

-from __future__ import annotations
-
-from collections.abc import Sequence
-from typing import TYPE_CHECKING, Literal
-
-from lets_plot import gggrid
-from lets_plot.plot.core import FeatureSpec, LayerSpec
-
-from cellestial.single.core.dimensional import dimensional
-from cellestial.single.core.subdimensional import expression, pca, tsne, umap
-from cellestial.util import _share_axis, _share_labels
-
-if TYPE_CHECKING:
-    from anndata import AnnData
-    from lets_plot.plot.subplots import SupPlotsSpec
-
-
-
-[docs] -def dimensionals( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - dimensions: Literal["umap", "pca", "tsne"] = "umap", - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - # multi plot args - share_labels: bool = True, - share_axis: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Grid of dimensionality reduction plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys (cell features) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - dimensions : Literal['umap', 'pca', 'tsne'], default='umap' - The dimensional reduction method to use. - e.g., 'umap' or 'pca' or 'tsne'. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - cluster_name : str, default='Cluster' - The name to overwrite the clustering key in the dataframe and the plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - share_labels : bool, default=True - Whether to share the labels across all plots. - If True, only X labels on bottom row and Y labels on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - SupPlotsSpec - Grid of dimensionality reduction plots. - - """ - if not isinstance(keys, Sequence) or isinstance(keys, str): - msg = "keys must be an Sequence of strings" - raise TypeError(msg) - - plots = [] - for i, key in enumerate(keys): - plot = dimensional( - data=data, - key=key, - mapping=mapping, - dimensions=dimensions, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - ) - - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_labels: - plot = _share_labels(plot, i, keys, ncol) - if share_axis: - if axis_type is not None: - plot = _share_axis(plot, i, keys, ncol, axis_type) - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - - -
-[docs] -def umaps( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - # multi plot args - share_labels: bool = True, - share_axis: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Grid of dimensionality reduction plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys (cell features) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - cluster_name : str, default='Cluster' - The name to overwrite the clustering key in the dataframe and the plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - share_labels : bool, default=True - Whether to share the labels across all plots. - If True, only X labels on bottom row and Y labels on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - SupPlotsSpec - Grid of dimensionality reduction plots. - - """ - if not isinstance(keys, Sequence) or isinstance(keys, str): - msg = "keys must be an Sequence of strings" - raise TypeError(msg) - - plots = [] - for i, key in enumerate(keys): - plot = umap( - data=data, - key=key, - mapping=mapping, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - ) - - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_labels: - plot = _share_labels(plot, i, keys, ncol) - if share_axis: - if axis_type is not None: - plot = _share_axis(plot, i, keys, ncol, axis_type) - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - - -
-[docs] -def tsnes( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - # multi plot args - share_labels: bool = True, - share_axis: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Grid of dimensionality reduction plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys (cell features) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - cluster_name : str, default='Cluster' - The name to overwrite the clustering key in the dataframe and the plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - share_labels : bool, default=True - Whether to share the labels across all plots. - If True, only X labels on bottom row and Y labels on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - SupPlotsSpec - Grid of dimensionality reduction plots. - - """ - if not isinstance(keys, Sequence) or isinstance(keys, str): - msg = "keys must be an Sequence of strings" - raise TypeError(msg) - - plots = [] - for i, key in enumerate(keys): - plot = tsne( - data=data, - key=key, - mapping=mapping, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - ) - - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_labels: - plot = _share_labels(plot, i, keys, ncol) - if share_axis: - if axis_type is not None: - plot = _share_axis(plot, i, keys, ncol, axis_type) - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - - -
-[docs] -def pcas( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - # multi plot args - share_labels: bool = True, - share_axis: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Grid of dimensionality reduction plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys (cell features) to color the points by. - e.g., 'leiden' or 'louvain' to color by clusters or gene name for expression. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - cluster_name : str, default='Cluster' - The name to overwrite the clustering key in the dataframe and the plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - share_labels : bool, default=True - Whether to share the labels across all plots. - If True, only X labels on bottom row and Y labels on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - SupPlotsSpec - Grid of dimensionality reduction plots. - - """ - if not isinstance(keys, Sequence) or isinstance(keys, str): - msg = "keys must be an Sequence of strings" - raise TypeError(msg) - - plots = [] - for i, key in enumerate(keys): - plot = pca( - data=data, - key=key, - mapping=mapping, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - ) - - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_labels: - plot = _share_labels(plot, i, keys, ncol) - if share_axis: - if axis_type is not None: - plot = _share_axis(plot, i, keys, ncol, axis_type) - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- - - -
-[docs] -def expressions( - data: AnnData, - keys: Sequence[str], - *, - mapping: FeatureSpec | None = None, - dimensions: Literal["umap", "pca", "tsne"] = "umap", - use_key: str | None = None, - xy: tuple[int, int] | Sequence[int] = (1, 2), - size: float = 0.8, - variable_keys: Sequence[str] | str | None = None, - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - observations_name: str = "Barcode", - color_low: str = "#e6e6e6", - color_mid: str | None = None, - color_high: str = "#377eb8", - mid_point: Literal["mean", "median", "mid"] | float = "median", - axis_type: Literal["axis", "arrow"] | None = None, - arrow_length: float = 0.25, - arrow_size: float = 1, - arrow_color: str = "#3f3f3f", - arrow_angle: float = 10, - legend_ondata: bool = False, - ondata_size: float = 12, - ondata_color: str = "#3f3f3f", - ondata_fontface: str = "bold", - ondata_family: str = "sans", - ondata_alpha: float = 1, - ondata_weighted: bool = True, - # multi plot args - share_labels: bool = True, - share_axis: bool = False, - layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, - # grid args - ncol: int | None = None, - sharex: str | None = None, - sharey: str | None = None, - widths: list[float] | None = None, - heights: list[float] | None = None, - hspace: float | None = None, - vspace: float | None = None, - fit: bool | None = None, - align: bool | None = None, - guides: str = "auto", - **point_kwargs, -) -> SupPlotsSpec: - """ - Grid of dimensionality reduction plots. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : list[str] | tuple[str] | Sequence[str] - The keys (gene names) to color the points by. - mapping : FeatureSpec | None, default=None - Additional aesthetic mappings for the plot, the result of `aes()`. - dimensions : Literal['umap', 'pca', 'tsne'], default='umap' - The dimensional reduction method to use. - e.g., 'umap' or 'pca' or 'tsne'. - xy : tuple[int, int] | Sequence[int], default=(1, 2) - The x and y axes to use for the plot. - e.g., (1, 2) for UMAP1 and UMAP2. - use_key : str, default=None - The specific key to use for the desired dimensions. - e.g., 'X_umap_2d' or 'X_pca_2d'. - Otherwise, the function will decide on the key based on the dimensions. - size : float, default=0.8 - The size of the points. - variable_keys : str | Sequence[str] | None, default=None - Variable keys to add to the DataFrame. If None, no additional keys are added. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - cluster_name : str, default='Cluster' - The name to overwrite the clustering key in the dataframe and the plot. - observations_name : str, default='Barcode' - The name to give to barcode (or index) column in the dataframe. - color_low : str, default='#e6e6e6' - The color to use for the low end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_mid : str, default=None - The color to use for the middle part of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - color_high : str, default='#377EB8' - The color to use for the high end of the color gradient. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - mid_point : Literal['mean', 'median', 'mid'] | float, default='median' - The midpoint (in data value) of the color gradient. - Can be 'mean', 'median' and 'mid' or a number (float or int). - - If 'mean', the midpoint is the mean of the data. - - If 'median', the midpoint is the median of the data. - - If 'mid', the midpoint is the mean of 'min' and 'max' of the data. - - axis_type : Literal['axis', 'arrow'] | None - Whether to use regular axis or arrows as the axis. - arrow_length : float, default=0.25 - Length of the arrow head (px). - arrow_size : float, default=1 - Size of the arrow. - arrow_color : str, default='#3f3f3f' - Color of the arrows. - - Accepts: - - hex code e.g. '#f1f1f1' - - color name (of a limited set of colors). - - RGB/RGBA e.g. 'rgb(0, 0, 255)', 'rgba(0, 0, 255, 0.5)'. - - Applies to continuous (non-categorical) data. - - arrow_angle : float, default=10 - Angle of the arrow head in degrees. - legend_ondata: bool, default=False - whether to show legend on data - ondata_size: float, default=12 - size of the legend (text) on data. - ondata_color: str, default='#3f3f3f' - color of the legend (text) on data - ondata_fontface: str, default='bold' - fontface of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-face - ondata_family: str, default='sans' - family of the legend (text) on data. - https://lets-plot.org/python/pages/aesthetics.html#font-family - ondata_alpha: float, default=1 - alpha (transparency) of the legend on data. - ondata_weighted: bool, default=True - whether to use weighted mean for the legend on data. - If True, the weighted mean of the group means is used. - If False, the arithmetic mean of the group means is used. - share_labels : bool, default=True - Whether to share the labels across all plots. - If True, only X labels on bottom row and Y labels on left column are shown. - share_axis : bool, default=False - Whether to share the axis across all plots. - If True, only X axis on bottom row and Y axis on left column is shown. - layers : Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default=None - Layers to add to all the plots in the grid. - ncol : int, default=None - Number of columns in grid. If not specified, shows plots horizontally, in one row. - sharex, sharey : bool, default=None - Controls sharing of axis limits between subplots in the grid. - `all`/True - share limits between all subplots. - `none`/False - do not share limits between subplots. - `row` - share limits between subplots in the same row. - `col` - share limits between subplots in the same column. - widths : list[float], default=None - Relative width of each column of grid, left to right. - heights : list[float], default=None - Relative height of each row of grid, top-down. - hspace : float | None = None - Cell horizontal spacing in px. - vspace : float | None = None - Cell vertical spacing in px. - fit : bool, default=True - Whether to stretch each plot to match the aspect ratio of its cell (fit=True), - or to preserve the original aspect ratio of plots (fit=False). - align : bool, default=False - If True, align inner areas (i.e. “geom” bounds) of plots. - However, cells containing other (sub)grids are not participating - in the plot “inner areas” layouting. - guides : str, default='auto' - Specifies how guides (legends and colorbars) should be treated in the layout. - - 'collect' collect guides from all subplots, removing duplicates. - - 'keep' keep guides in their original subplots; do not collect at this level. - - 'auto' allow guides to be collected if an upper-level layout uses guides='collect'; - - otherwise, keep them in subplots. - Duplicates are identified by comparing visual properties: - For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). - For colorbars: title, domain limits, breaks, and color gradient. - - For more information on gggrid parameters: - https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - **point_kwargs - Additional parameters for the `geom_point` layer. - For more information on geom_point parameters, see: - https://lets-plot.org/python/pages/api/lets_plot.geom_point.html - - Returns - ------- - SupPlotsSpec - Grid of dimensionality reduction plots. - - """ - if not isinstance(keys, Sequence) or isinstance(keys, str): - msg = "keys must be an Sequence of strings" - raise TypeError(msg) - - plots = [] - for i, key in enumerate(keys): - plot = expression( - data=data, - key=key, - mapping=mapping, - dimensions=dimensions, - use_key=use_key, - xy=xy, - size=size, - variable_keys=variable_keys, - tooltips=tooltips, - interactive=interactive, - observations_name=observations_name, - color_low=color_low, - color_mid=color_mid, - color_high=color_high, - mid_point=mid_point, - axis_type=axis_type, - arrow_length=arrow_length, - arrow_size=arrow_size, - arrow_color=arrow_color, - arrow_angle=arrow_angle, - legend_ondata=legend_ondata, - ondata_size=ondata_size, - ondata_color=ondata_color, - ondata_fontface=ondata_fontface, - ondata_family=ondata_family, - ondata_alpha=ondata_alpha, - ondata_weighted=ondata_weighted, - **point_kwargs, - ) - - # handle the layers - if layers is not None: - if isinstance(layers, (FeatureSpec, LayerSpec)): - layers = [layers] - for layer in layers: - plot += layer - if share_labels: - plot = _share_labels(plot, i, keys, ncol) - if share_axis: - if axis_type is not None: - plot = _share_axis(plot, i, keys, ncol, axis_type) - - plots.append(plot) - - return gggrid( - plots, - ncol=ncol, - sharex=sharex, - sharey=sharey, - widths=widths, - heights=heights, - hspace=hspace, - vspace=vspace, - fit=fit, - align=align, - guides=guides, - )
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/single/special/dotplot.html b/docs/_build/_modules/cellestial/single/special/dotplot.html deleted file mode 100644 index 3812253..0000000 --- a/docs/_build/_modules/cellestial/single/special/dotplot.html +++ /dev/null @@ -1,613 +0,0 @@ - - - - - - - - - - cellestial.single.special.dotplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.single.special.dotplot

-from __future__ import annotations
-
-import contextlib
-from collections.abc import Sequence
-from typing import TYPE_CHECKING, Literal
-
-import polars as pl
-from anndata import AnnData
-from lets_plot import (
-    aes,
-    geom_point,
-    ggplot,
-    ggtb,
-    layer_tooltips,
-    scale_color_gradient,
-    scale_fill_gradient,
-)
-from lets_plot.plot.core import FeatureSpec
-
-from cellestial.frames import build_frame
-from cellestial.themes import _THEME_DOTPLOT
-
-if TYPE_CHECKING:
-    from lets_plot.plot.core import PlotSpec
-
-
-
-[docs] -def dotplot( - data: AnnData, - keys: Sequence[str], - group_by: str, - *, - threshold: float = 0, - variables_name: str = "gene", - value_name: str = "expression", - color_low: str = "#e6e6e6", - color_high: str = "#D2042D", - fill: bool = False, - sort_by: str | Sequence[str] | None = None, - sort_order: Literal["ascending", "descending"] = "descending", - percentage_key: str = "pct_exp", - mean_key: str = "avg_exp", - tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None, - interactive: bool = False, - **geom_kwargs, -) -> PlotSpec: - """ - Dotplot. - - Parameters - ---------- - data : AnnData - The AnnData object of the single cell data. - keys : Sequence[str] - The variable keys or names to include in the dotplot. - group_by : str - The key to group the data by. - threshold : float, default=0 - The expression threshold to consider a gene as expressed. - variables_name : str, default='gene' - The name of the variable column in the long format. - value_name : str, default='expression' - The name of the value column in the long format. - color_low : str, default='#e6e6e6' - The low color for the gradient. - color_high : str, default='#D2042D' - The high color for the gradient. - fill : bool, optional - Whether to use fill aesthetic instead of color, by default False. - sort_by : str | None - The column to sort the results by, by default None. - sort_order : str, default='descending' - The sort order, either 'ascending' or 'descending'. - percentage_key : str, default='pct_exp' - The name of the percentage column. - mean_key : str, default='avg_exp' - The name of the mean expression column. - tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None, default=None - Tooltips to show when hovering over the geom. - Accepts Sequence[str] or result of `layer_tooltips()` for more complex tooltips. - Use 'none' to disable tooltips. - show_tooltips : bool, default=True - Whether to show tooltips. - interactive : bool, default=False - Whether to make the plot interactive. - **geom_kwargs : Any - Additional keyword arguments for the geom_point layer. - - Returns - ------- - PlotSpec - Dotplot. - """ - # HANDLE: Data types - if not isinstance(data, AnnData): - msg = "data must be an `AnnData` object" - raise TypeError(msg) - # BUILD: dataframe - frame = build_frame(data=data, axis=0, variable_keys=keys) - index_columns = [x for x in frame.columns if x not in keys] - - # CRITICAL PARTS: Dataframe Operations - # 1. Unpivot frame - frame = frame.unpivot( - on=keys, - index=index_columns, - variable_name=variables_name, - value_name=value_name, - ) - # 2. Aggregate and compute stats - frame = frame.group_by([group_by, variables_name]).agg( - [ - pl.col(value_name).mean().alias(mean_key), - (pl.col(value_name) > threshold).mean().mul(100).alias(percentage_key), - ] - ) - - # HANDLE: Sorting - # In case of pseudo-categorical integer group_by temporarily cast to int for proper sorting - with contextlib.suppress(Exception): # supress errors if sorting fails - frame = ( - frame.with_columns(pl.col(group_by).cast(pl.String).cast(pl.Int64)).sort( - group_by, descending=True - ) - # .with_columns(pl.col(group_by).cast(pl.String).cast(pl.Categorical)) - ) - # perform sorting - if sort_by is not None: - frame = frame.sort( - by=sort_by, - descending=(sort_order == "descending"), - ) - # Cast back to categorical - if frame[group_by].dtype == pl.Int64: - frame = frame.with_columns( - pl.col(group_by).cast(pl.String).cast(pl.Categorical) - ) - - # HANDLE: tooltips - if tooltips is None: - tooltips = [variables_name, group_by] - tooltips_spec = layer_tooltips(tooltips) - elif tooltips == "none" or isinstance(tooltips, str): - tooltips_spec = tooltips - elif isinstance(tooltips, Sequence): - tooltips = list(tooltips) - tooltips_spec = layer_tooltips(tooltips) - if not set(tooltips).issubset(frame.columns): - missing = set(tooltips) - set(frame.columns) - msg = f"Some tooltip columns are not in the data: {missing}" - raise ValueError(msg) - elif isinstance(tooltips, FeatureSpec): - tooltips_spec = tooltips - - # BUILD: Dotplot - if not fill: # use color aesthetic - dtplt = ( - ggplot(frame, aes(x=variables_name, y=group_by)) - + geom_point( - aes(size=percentage_key, color=mean_key), tooltips=tooltips_spec, **geom_kwargs - ) - + scale_color_gradient(low=color_low, high=color_high) - ) - else: # elif fill: use fill aesthetic - dtplt = ( - ggplot(frame, aes(x=variables_name, y=group_by)) - + geom_point( - aes(size=percentage_key, fill=mean_key), tooltips=tooltips_spec, **geom_kwargs - ) - + scale_fill_gradient(low=color_low, high=color_high) - ) - - # ADD: layers - dtplt += _THEME_DOTPLOT - - # HANDLE: interactive - if interactive: - dtplt += ggtb(size_zoomin=-1) - - return dtplt
- -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/util/colors.html b/docs/_build/_modules/cellestial/util/colors.html deleted file mode 100644 index 0825d58..0000000 --- a/docs/_build/_modules/cellestial/util/colors.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - - - - - - cellestial.util.colors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.util.colors

-from lets_plot import (
-    LetsPlot,
-    aes,
-    element_rect,
-    geom_point,
-    geom_text,
-    gggrid,
-    ggplot,
-    ggsize,
-    theme,
-    theme_void,
-)
-
-# Hand-picked colors for cellestial
-TEAL = "#219B9D"
-BLUE = "#377EB8"
-RED = "#D2042D"
-CHERRY = "#AF1740"
-LIGHT_GRAY = "#E6E6E6"
-SNOW = "#F9F9F9"
-PURPLE = "#640D5F"
-PINK = "#E73879"
-ORANGE = "#F14A00"
-TEAL = "#219B9D"
-RED = "#D2042D"
-CHERRY = "#AF1740"
-BLUE = "#377EB8"
-LIGHT_GRAY = "#E6E6E6"
-
-
-
-[docs] -def show_colors(): - """Show a grid of hand-picked colors.""" - colors = { - "TEAL": TEAL, - "RED": RED, - "LIGHT_GRAY": LIGHT_GRAY, - "BLUE": BLUE, - "CHERRY": CHERRY, - "SNOW": SNOW, - "PURPLE": PURPLE, - "PINK": PINK, - "ORANGE": ORANGE, - } - - plots = [] - for color in colors: - text_color = "white" if color != "LIGHT_GRAY" and color != "SNOW" else "black" - - plot = ( - ggplot({"x": [1], "y": [1]}) - + geom_point(aes(x="x", y="y"), fill=colors[color], shape=22, size=90, color="#1f1f1f") - + geom_text( - aes(x="x", y="y"), - label=f"{color}\n", - color=text_color, - size=14, - fontface="bold", - family="Arial", - ) - + geom_text( - aes(x="x", y="y"), - label=f"\n{colors[color]}", - color=text_color, - size=10, - fontface="regular", - family="sans-serif", - ) - + theme_void() - + theme(panel_background=element_rect(color=colors[color], size=13)) - ) - plots.append(plot) - - ncol = 3 - nrow = len(colors) // ncol - if len(colors) % ncol != 0: - nrow += 1 - - return gggrid(plots, ncol=3, hspace=0, vspace=0) + ggsize(ncol * 200, nrow * 200)
- - - -if __name__ == "__main__": - LetsPlot.setup_html() - show_colors().to_html("colors.html") -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/cellestial/util/utilities.html b/docs/_build/_modules/cellestial/util/utilities.html deleted file mode 100644 index b854ff9..0000000 --- a/docs/_build/_modules/cellestial/util/utilities.html +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - - - - cellestial.util.utilities - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -

Source code for cellestial.util.utilities

-from __future__ import annotations
-
-from collections.abc import Sequence
-from math import ceil, log10
-from typing import TYPE_CHECKING, Literal
-
-from anndata import AnnData
-from lets_plot import (
-    arrow,
-    element_blank,
-    element_text,
-    geom_blank,
-    geom_segment,
-    gggrid,
-    guide_legend,
-    guides,
-    layer_tooltips,
-    scale_color_continuous,
-    scale_color_gradient2,
-    theme,
-)
-from lets_plot.plot.core import PlotSpec
-from lets_plot.plot.subplots import SupPlotsSpec
-
-if TYPE_CHECKING:
-    import polars as pl
-    from lets_plot.plot.core import FeatureSpec
-
-
-def _add_arrow_axis(
-    frame: pl.DataFrame,
-    *,
-    x: str,
-    y: str,
-    axis_type: Literal["axis", "arrow"] | None,
-    arrow_size: float,
-    arrow_color: str,
-    arrow_angle: float,
-    arrow_length: float,
-):
-    """
-    Adds arrows as the X and Y axis to the plot.
-
-    Parameters
-    ----------
-    frame : `polars.DataFrame`
-        DataFrame copied from the single cell data.
-    x : str
-        Name of the x axis column.
-    y : str
-        Name of the y axis column.
-    axis_type : Literal['axis', 'arrow'] | None
-        Whether to use regular axis or arrows as the axis.
-    arrow_size : float
-        Size of the arrow.
-    arrow_color : str
-        Color of the arrow.
-    arrow_angle : float
-        Angle of the arrow head in degrees.
-    arrow_length : float
-        Length of the arrow head (px).
-
-    Returns
-    -------
-    `FeatureSpec` or `FeatureSpecArray`
-        Theme feature specification.
-
-    for more information on the arrow parameters, see:
-    https://lets-plot.org/python/pages/api/lets_plot.arrow.html
-    """
-    if axis_type is None:
-        return theme(
-            # remove axis elements
-            axis_text_x=element_blank(),
-            axis_text_y=element_blank(),
-            axis_ticks_y=element_blank(),
-            axis_ticks_x=element_blank(),
-            axis_line=element_blank(),
-        )
-
-    elif axis_type == "axis":
-        return geom_blank()
-
-    elif axis_type == "arrow":
-        new_layer = theme(
-            # remove axis elements
-            axis_text_x=element_blank(),
-            axis_text_y=element_blank(),
-            axis_ticks_y=element_blank(),
-            axis_ticks_x=element_blank(),
-            axis_line=element_blank(),
-            # position axis titles according to arrow size
-            axis_title_x=element_text(hjust=arrow_length / 2.5),  # better than 2
-            axis_title_y=element_text(hjust=arrow_length / 2.5),
-        )
-        x_max = frame[x].max()
-        x_min = frame[x].min()
-        y_max = frame[y].max()
-        y_min = frame[y].min()
-
-        # find total difference between the max and min for both axis
-        x_diff = x_max - x_min  # ty:ignore[unsupported-operator]
-        y_diff = y_max - y_min  # ty:ignore[unsupported-operator]
-
-        # find the ends of the arrows
-        # ensure the arrow length is the same for both axis
-        xend = x_min + arrow_length * min(y_diff, x_diff)
-        yend = y_min + arrow_length * min(y_diff, x_diff)
-
-        # adjust bottom ends of arrows
-        adjust_rate = 0.025
-        x0 = x_min - x_diff * adjust_rate
-        y0 = y_min - y_diff * adjust_rate
-
-        # X axis
-        new_layer += geom_segment(
-            x=x0,
-            y=y0,
-            xend=xend,
-            yend=y0,
-            color=arrow_color,
-            size=arrow_size,
-            arrow=arrow(arrow_angle),
-        )
-        # Y axis
-        new_layer += geom_segment(
-            x=x0,
-            y=y0,
-            xend=x0,
-            yend=yend,
-            color=arrow_color,
-            size=arrow_size,
-            arrow=arrow(arrow_angle),
-        )
-    else:
-        msg = f"expected 'axis' or 'arrow' for 'axis_type' argument, but received {axis_type}"
-        raise ValueError(msg)
-
-    return new_layer
-
-
-# TODO: Deprecate
-def _decide_tooltips(
-    base_tooltips: Sequence[str] | str | None,
-    add_tooltips: Sequence[str] | str | None,
-    custom_tooltips: Sequence[str] | str | None,
-    *,
-    show_tooltips: bool,
-) -> list[str] | Literal["none"]:
-    """
-    Decide on the tooltips.
-
-    Parameters
-    ----------
-    base_tooltips : list[str] | str
-        Base tooltips, default ones by the function.
-    add_tooltips : list[str] | str
-        Additional tooltips, will be appended to the base_tooltips.
-    custom_tooltips : list[str] | str
-        Custom tooltips, will overwrite the base_tooltips.
-    show_tooltips : bool
-        Whether to show tooltips at all.
-        Set tooltip to the Literal 'none' if False.
-
-    Returns
-    -------
-    list[str]
-        Tooltips.
-    """
-    # PART 1: CONVERT str TO list
-    if isinstance(base_tooltips, str):
-        base_tooltips = [base_tooltips]
-    elif base_tooltips is None:
-        base_tooltips = []
-    if isinstance(add_tooltips, str):
-        add_tooltips = [add_tooltips]
-    if isinstance(custom_tooltips, str):
-        custom_tooltips = [custom_tooltips]
-
-    # PART 2: HANDLE TOOLTIP LOGIC
-    if not show_tooltips:
-        tooltips = "none"  # for letsplot, this removes the tooltips
-    else:
-        if isinstance(custom_tooltips, Sequence):
-            tooltips = list(custom_tooltips)
-        elif isinstance(add_tooltips, Sequence):
-            tooltips = list(base_tooltips) + list(add_tooltips)
-        else:
-            tooltips = list(base_tooltips)
-
-    return tooltips
-
-
-def _build_tooltips(
-    *,
-    tooltips: list[str] | str,
-    cluster_name: str,
-    key: str | None = None,
-    title: str | None = None,
-    clustering: bool = False,
-) -> FeatureSpec | Literal["none"]:
-    """Crete the tooltips for the plot."""
-    if tooltips == "none":
-        return "none"
-
-    tooltips_object = layer_tooltips()
-    for tooltip in tooltips:
-        if clustering:
-            if tooltip != key:
-                tooltips_object.line(f"{tooltip}|@{tooltip}")
-            else:
-                tooltips_object.line(f"{cluster_name}|@{key}")
-        else:
-            tooltips_object.line(f"{tooltip}|@{tooltip}")
-    if title is not None:
-        tooltips_object.title(title)
-
-    return tooltips_object
-
-
-def _range_inclusive(start: float, stop: float, step: int) -> list[float]:
-    """Return a list of rounded numbers between start and stop, inclusive."""
-    decimals = 0
-    if stop - start < 1:
-        if stop - start == 0:
-            return [start]
-        decimals = -round(log10(stop - start)) + 1
-
-    diff = round(stop - start, decimals)
-    increment = round(diff / (step - 1), decimals + 1)
-    inc_list = []
-
-    for i in range(step):
-        inc_list.append(round(start + increment * i, decimals + 2))
-    # make unique
-    inc_list = list(set(inc_list))
-    return sorted(inc_list)
-
-
-def _color_gradient(
-    series,
-    color_low=None,
-    color_mid=None,
-    color_high=None,
-    mid_point: Literal["mean", "median", "mid"] | float = "median",
-) -> FeatureSpec:
-    """
-    Create a gradient color feature.
-
-    Parameters
-    ----------
-    series : polars.Series
-        Series to find the mid point of.
-    color_low : str
-        The color to use for the low end of the color gradient.
-    color_mid : str
-       The color to use for the mid part of the color gradient.
-    color_high : str
-        The color to use for the high end of the color gradient.
-    mid_point : float, default='median'
-        The midpoint (in data value) of the color gradient.
-        Can be 'mean', 'median' and 'mid' or a number (float or int).
-        If 'mean', the midpoint is the mean of the data.
-        If 'median', the midpoint is the median of the data.
-        If 'mid', the midpoint is the mean of 'min' and 'max' of the data.
-
-    Returns
-    -------
-    FeatureSpec
-        FeatureSpec object with the gradient color feature.
-    """
-    if color_mid is None:
-        return scale_color_continuous(low=color_low, high=color_high)
-    else:
-        if isinstance(mid_point, (float, int)):
-            mid_value = mid_point
-        elif mid_point == "mean":
-            mid_value = series.mean()
-        elif mid_point == "median":
-            mid_value = series.median()
-        elif mid_point == "mid":
-            mid_value = (series.max() + series.min()) / 2
-
-        return scale_color_gradient2(
-            low=color_low,
-            mid=color_mid,
-            high=color_high,
-            midpoint=mid_value,
-        )
-
-
-
-[docs] -def get_mapping(plot: PlotSpec, *, index=0) -> dict: - """Returns the mapping of the plot.""" - return { - **plot.as_dict().get("mapping"), # from the global mapping, - **plot.as_dict().get("layers")[index].get("mapping"), # from a layer. - }
- - - -
-[docs] -def retrieve(plot: PlotSpec | SupPlotsSpec, index: int = 0) -> pl.DataFrame: - """ - Retrieves the dataframe from a PlotSpec or SupPlotsSpec using the index. - - plot : PlotSpec | SupPlotsSpec - The plot to retrieve the dataframe from. - index : int, optional - The index of the figure to retrieve the dataframe from, by default 0 - - Returns - ------- - pl.DataFrame - The dataframe utilized in the plot. - - Raises - ------ - TypeError - If the plot is not a PlotSpec or SupPlotsSpec object. - """ - if isinstance(plot, PlotSpec): - frame = plot.as_dict().get("data") - elif isinstance(plot, SupPlotsSpec): - frame = plot.as_dict().get("figures")[index].get("data") - else: - msg = f"Plot MUST be a `PlotSpec` or `SupPlotsSpec` object, type={type(plot)}" - raise TypeError(msg) - - if frame is None: - msg = "Could not retrieve the dataframe from the plot." - raise ValueError(msg) - - return frame
- - - -
-[docs] -def slice( - grid: SupPlotsSpec, index: int | Sequence[int], **kwargs -) -> PlotSpec | SupPlotsSpec | None: - """ - Slice a ggrid (SupPlotsSpec) objects with given index. - - Parameters - ---------- - grid : SupPlotsSpec - The grid to slice. - index : int | Sequence[int] - The index or indices of the plots to slice. - **kwargs : dict[str, Any] - Additional arguments for the `gggrid` function. - see: https://lets-plot.org/python/pages/api/lets_plot.gggrid.html - - Returns - ------- - PlotSpec | SupPlotsSpec - The sliced grid. - - Raises - ------ - TypeError - If the grid is not a SupPlotsSpec object. - If the index is not an int or Sequence[int]. - """ - if isinstance(grid, SupPlotsSpec): - figures = grid.as_dict().get("figures") - - if figures is not None: - if isinstance(index, int): - plot = figures[index] - return plot - elif isinstance(index, Sequence): - list_plots = [figures[i] for i in index] - return gggrid(list_plots, **kwargs) - else: - msg = f"Expected int or Sequence for index, but received {type(index)}" - raise TypeError(msg) - else: - msg = f"Expected `SupPlotsSpec`, but received {type(grid)}" - raise TypeError(msg)
- - - -def _share_labels(plot, i: int, keys: Sequence[str], ncol: int | None) -> SupPlotsSpec: - if ncol is None: - ncol = len(keys) - total = len(keys) - nrow = ceil(total / ncol) - left_places = [i for i in range(total) if i % ncol == 0] - bottom_places = [i for i in range(total) if i >= ncol * (nrow - 1)] - if len(bottom_places) < ncol: - penultimate_row = list(range((nrow - 2) * ncol, (nrow - 1) * ncol)) - bottom_places.extend(penultimate_row) - if i not in bottom_places: # remove x axis title except for bottom row - plot = plot + theme(axis_title_x=element_blank()) - if i not in left_places: # remove y axis title except for left column - plot = plot + theme(axis_title_y=element_blank()) - - return plot - - -def _share_axis( - plot, i: int, keys: Sequence[str], ncol: int | None, axis_type: Literal["axis", "arrow"] -) -> SupPlotsSpec: - total = len(keys) - if ncol is None: - ncol = len(keys) - nrow = ceil(total / ncol) - left_places = [i for i in range(total) if i % ncol == 0] - bottom_places = [i for i in range(total) if i >= ncol * (nrow - 1)] - if len(bottom_places) < ncol: - penultimate_row = list(range((nrow - 2) * ncol, (nrow - 1) * ncol)) - bottom_places.extend(penultimate_row) - - if axis_type == "axis": - if i not in bottom_places: # remove x axis title except for bottom row - plot = plot + theme( - # remove x axis elements - axis_text_x=element_blank(), - axis_ticks_x=element_blank(), - axis_line_x=element_blank(), - ) - if i not in left_places: # remove y axis title except for left column - plot = plot + theme( - # remove y axis elements - axis_text_y=element_blank(), - axis_ticks_y=element_blank(), - axis_line_y=element_blank(), - ) - elif axis_type == "arrow": - pass - else: - msg = f"expected 'axis' or 'arrow' for 'axis_type' argument, but received {axis_type}" - raise ValueError(msg) - - return plot - - -def _share_ticks(plot, i: int, keys: Sequence[str], ncol: int | None) -> SupPlotsSpec: - if ncol is None: - ncol = len(keys) - total = len(keys) - nrow = ceil(total / ncol) - left_places = [i for i in range(total) if i % ncol == 0] - bottom_places = [i for i in range(total) if i >= ncol * (nrow - 1)] - if len(bottom_places) < ncol: - penultimate_row = list(range((nrow - 2) * ncol, (nrow - 1) * ncol)) - bottom_places.extend(penultimate_row) - if i not in bottom_places: # remove x axis title except for bottom row - plot = plot + theme(axis_text_x=element_blank()) - if i not in left_places: # remove y axis title except for left column - plot = plot + theme(axis_text_y=element_blank()) - - return plot - - -''' -def _key_style(data: AnnData, key: str) -> str: - """Find the layers with the given key.""" - if key in data.obs.columns: - origin = "obs" - elif key in data.var_names: - origin = "obs" - elif key in data.var.columns: - origin = "var" -''' - - -def _wrap_legend( - frame: pl.DataFrame, fill: str | None, color: str | None, nrow: int = 5 -) -> FeatureSpec: - legend = guides() - # CASE1: LEGEND IS SEPARATED BY FILL - if fill is not None: - n_distinct = frame.select(fill).unique().height - if n_distinct > 10: - ncol = ceil(n_distinct / 10) - legend = guides(fill=guide_legend(ncol=ncol)) - # CASE2: LEGEND IS SEPARATED BY COLOR - if color is not None: - n_distinct = frame.select(color).unique().height - if n_distinct > 10: - ncol = ceil(n_distinct / 10) - legend = guides(color=guide_legend(ncol=ncol)) - - return legend - - -def _is_variable_key(data: AnnData, key: str | None) -> bool: - if key is None: - return False - - if isinstance(data, AnnData): - if key in data.var_names: - result = True - else: - result = False - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _are_variables(data: AnnData, keys: Sequence[str] | None) -> bool: - if keys is None: - return False - - if isinstance(data, AnnData): - result = all(key in data.var_names for key in keys) - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _is_observation_key(data: AnnData, key: str | None) -> bool: - if key is None: - return False - - if isinstance(data, AnnData): - if key in data.obs.columns: - result = True - else: - result = False - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _are_observations(data: AnnData, keys: Sequence[str] | None) -> bool: - if keys is None: - return False - - if isinstance(data, AnnData): - result = all(key in data.obs.columns for key in keys) - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _select_variable_keys( - data: AnnData, - keys: Sequence[str] | None, -) -> list[str]: - """From given keys, select only those that are variable keys.""" - if keys is None: - return [] - - if isinstance(data, AnnData): - variable_keys = [key for key in keys if key in data.var_names] - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - return variable_keys - - -def _is_observation_feature(data: AnnData, key: str | None) -> bool: - """Check whether the key is in observations axis (axis=0).""" - if key is None: - return False - - if isinstance(data, AnnData): - if key in data.obs.columns or key in data.var_names: - result = True - else: - result = False - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _are_observation_features(data: AnnData, keys: Sequence[str] | None) -> bool: - """Check whether all the keys are in observations axis (axis=0).""" - if keys is None: - return False - - if isinstance(data, AnnData): - result = all((key in data.obs.columns or key in data.var_names) for key in keys) - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _is_variable_feature(data: AnnData, key: str | None) -> bool: - """Check whether the key is in variable axis (axis=1).""" - if key is None: - return False - - if isinstance(data, AnnData): - if key in data.var.columns: - result = True - else: - result = False - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _are_variable_features(data: AnnData, keys: Sequence[str] | None) -> bool: - """Check whether all the keys are in variable axis (axis=1).""" - if keys is None: - return False - - if isinstance(data, AnnData): - result = all(key in data.var.columns for key in keys) - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return result - - -def _determine_axis( - data: AnnData, - keys: str | Sequence[str], -) -> Literal[0, 1]: - """Determine the axis based on the given key or keys.""" - if isinstance(keys, str): - keys = [keys] - if isinstance(data, AnnData): - if _are_variable_features(data, keys): - axis = 1 - elif _are_observation_features(data, keys): - axis = 0 - else: - msg = f"Could not determine the axis with given keys ({keys})." - raise ValueError(msg) - else: - msg = f"Unknown data type: {type(data)}." - raise TypeError(msg) - - return axis -
- -
- - - - - -
- - - - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_modules/index.html b/docs/_build/_modules/index.html deleted file mode 100644 index cedb9c3..0000000 --- a/docs/_build/_modules/index.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - - - Overview: module code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.basic.heatmap.heatmap.rst.txt b/docs/_build/_sources/generated/cellestial.single.basic.heatmap.heatmap.rst.txt deleted file mode 100644 index f703d75..0000000 --- a/docs/_build/_sources/generated/cellestial.single.basic.heatmap.heatmap.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.basic.heatmap.heatmap -======================================= - -.. currentmodule:: cellestial.single.basic.heatmap - -.. autofunction:: heatmap \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.basic.scatter.scatter.rst.txt b/docs/_build/_sources/generated/cellestial.single.basic.scatter.scatter.rst.txt deleted file mode 100644 index e17b011..0000000 --- a/docs/_build/_sources/generated/cellestial.single.basic.scatter.scatter.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.basic.scatter.scatter -======================================= - -.. currentmodule:: cellestial.single.basic.scatter - -.. autofunction:: scatter \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.common.xyplot.xyplot.rst.txt b/docs/_build/_sources/generated/cellestial.single.common.xyplot.xyplot.rst.txt deleted file mode 100644 index bcc077c..0000000 --- a/docs/_build/_sources/generated/cellestial.single.common.xyplot.xyplot.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.common.xyplot.xyplot -====================================== - -.. currentmodule:: cellestial.single.common.xyplot - -.. autofunction:: xyplot \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.common.xyplots.xyplots.rst.txt b/docs/_build/_sources/generated/cellestial.single.common.xyplots.xyplots.rst.txt deleted file mode 100644 index 6bff72d..0000000 --- a/docs/_build/_sources/generated/cellestial.single.common.xyplots.xyplots.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.common.xyplots.xyplots -======================================== - -.. currentmodule:: cellestial.single.common.xyplots - -.. autofunction:: xyplots \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.dimensional.dimensional.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.dimensional.dimensional.rst.txt deleted file mode 100644 index 4fb9f1f..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.dimensional.dimensional.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.dimensional.dimensional -============================================== - -.. currentmodule:: cellestial.single.core.dimensional - -.. autofunction:: dimensional \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.distribution.boxplot.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.distribution.boxplot.rst.txt deleted file mode 100644 index ffca415..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.distribution.boxplot.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.distribution.boxplot -=========================================== - -.. currentmodule:: cellestial.single.core.distribution - -.. autofunction:: boxplot \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.distribution.violin.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.distribution.violin.rst.txt deleted file mode 100644 index 5d350f8..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.distribution.violin.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.distribution.violin -========================================== - -.. currentmodule:: cellestial.single.core.distribution - -.. autofunction:: violin \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.distributions.boxplots.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.distributions.boxplots.rst.txt deleted file mode 100644 index 028a10c..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.distributions.boxplots.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.distributions.boxplots -============================================= - -.. currentmodule:: cellestial.single.core.distributions - -.. autofunction:: boxplots \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.distributions.violins.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.distributions.violins.rst.txt deleted file mode 100644 index e7b065b..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.distributions.violins.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.distributions.violins -============================================ - -.. currentmodule:: cellestial.single.core.distributions - -.. autofunction:: violins \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.expression.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensional.expression.rst.txt deleted file mode 100644 index 82a2e56..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.expression.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensional.expression -================================================ - -.. currentmodule:: cellestial.single.core.subdimensional - -.. autofunction:: expression \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.pca.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensional.pca.rst.txt deleted file mode 100644 index 87886f0..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.pca.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensional.pca -========================================= - -.. currentmodule:: cellestial.single.core.subdimensional - -.. autofunction:: pca \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.tsne.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensional.tsne.rst.txt deleted file mode 100644 index a6772d8..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.tsne.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensional.tsne -========================================== - -.. currentmodule:: cellestial.single.core.subdimensional - -.. autofunction:: tsne \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.umap.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensional.umap.rst.txt deleted file mode 100644 index 13db6f5..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensional.umap.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensional.umap -========================================== - -.. currentmodule:: cellestial.single.core.subdimensional - -.. autofunction:: umap \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.dimensionals.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.dimensionals.rst.txt deleted file mode 100644 index 6b4a7ea..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.dimensionals.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensionals.dimensionals -=================================================== - -.. currentmodule:: cellestial.single.core.subdimensionals - -.. autofunction:: dimensionals \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.expressions.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.expressions.rst.txt deleted file mode 100644 index 7f482ae..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.expressions.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensionals.expressions -================================================== - -.. currentmodule:: cellestial.single.core.subdimensionals - -.. autofunction:: expressions \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.pcas.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.pcas.rst.txt deleted file mode 100644 index 5397440..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.pcas.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensionals.pcas -=========================================== - -.. currentmodule:: cellestial.single.core.subdimensionals - -.. autofunction:: pcas \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.tsnes.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.tsnes.rst.txt deleted file mode 100644 index aee9406..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.tsnes.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensionals.tsnes -============================================ - -.. currentmodule:: cellestial.single.core.subdimensionals - -.. autofunction:: tsnes \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.umaps.rst.txt b/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.umaps.rst.txt deleted file mode 100644 index c63d872..0000000 --- a/docs/_build/_sources/generated/cellestial.single.core.subdimensionals.umaps.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.core.subdimensionals.umaps -============================================ - -.. currentmodule:: cellestial.single.core.subdimensionals - -.. autofunction:: umaps \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.single.special.dotplot.dotplot.rst.txt b/docs/_build/_sources/generated/cellestial.single.special.dotplot.dotplot.rst.txt deleted file mode 100644 index 9b274df..0000000 --- a/docs/_build/_sources/generated/cellestial.single.special.dotplot.dotplot.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.single.special.dotplot.dotplot -========================================= - -.. currentmodule:: cellestial.single.special.dotplot - -.. autofunction:: dotplot \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.util.colors.show_colors.rst.txt b/docs/_build/_sources/generated/cellestial.util.colors.show_colors.rst.txt deleted file mode 100644 index 8fe86bd..0000000 --- a/docs/_build/_sources/generated/cellestial.util.colors.show_colors.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.util.colors.show\_colors -=================================== - -.. currentmodule:: cellestial.util.colors - -.. autofunction:: show_colors \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.util.get_mapping.rst.txt b/docs/_build/_sources/generated/cellestial.util.get_mapping.rst.txt deleted file mode 100644 index a0d37cd..0000000 --- a/docs/_build/_sources/generated/cellestial.util.get_mapping.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.util.get\_mapping -============================ - -.. currentmodule:: cellestial.util - -.. autofunction:: get_mapping \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.util.utilities.get_mapping.rst.txt b/docs/_build/_sources/generated/cellestial.util.utilities.get_mapping.rst.txt deleted file mode 100644 index c02bc5e..0000000 --- a/docs/_build/_sources/generated/cellestial.util.utilities.get_mapping.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.util.utilities.get\_mapping -====================================== - -.. currentmodule:: cellestial.util.utilities - -.. autofunction:: get_mapping \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.util.utilities.retrieve.rst.txt b/docs/_build/_sources/generated/cellestial.util.utilities.retrieve.rst.txt deleted file mode 100644 index 7616294..0000000 --- a/docs/_build/_sources/generated/cellestial.util.utilities.retrieve.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.util.utilities.retrieve -================================== - -.. currentmodule:: cellestial.util.utilities - -.. autofunction:: retrieve \ No newline at end of file diff --git a/docs/_build/_sources/generated/cellestial.util.utilities.slice.rst.txt b/docs/_build/_sources/generated/cellestial.util.utilities.slice.rst.txt deleted file mode 100644 index 37d2d1f..0000000 --- a/docs/_build/_sources/generated/cellestial.util.utilities.slice.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -cellestial.util.utilities.slice -=============================== - -.. currentmodule:: cellestial.util.utilities - -.. autofunction:: slice \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.basic.heatmap.heatmap.html b/docs/_build/generated/cellestial.single.basic.heatmap.heatmap.html deleted file mode 100644 index ec7c0e7..0000000 --- a/docs/_build/generated/cellestial.single.basic.heatmap.heatmap.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - cellestial.single.basic.heatmap.heatmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.basic.heatmap.heatmap#

-
-
-heatmap(data: AnnData, mapping: FeatureSpec | None = None, *, axis: Literal[0, 1] | None = None, variable_keys: Sequence[str] | None = None, observations_name: str = 'Barcode', variables_name: str = 'Variable', include_dimensions: bool | int = False, interactive: bool = False, **geom_kwargs) PlotSpec[source]#
-

Heatmap.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • mapping (FeatureSpec | None, default None) – Aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • observations_name (str, default 'Barcode') – The name of the observations column.

  • -
  • variables_name (str, default 'Variable') – Name for the variables index column.

  • -
  • include_dimensions (bool | int, default False) – Whether to include dimensions in the DataFrame. -Providing an integer will limit the number of dimensions to given number.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • **geom_kwargs – Additional parameters for the geom_bar layer. -For more information on geom_bar parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_bar.html

  • -
-
-
Returns:
-

PlotSpec – Heatmap.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.basic.scatter.scatter.html b/docs/_build/generated/cellestial.single.basic.scatter.scatter.html deleted file mode 100644 index e43f9c4..0000000 --- a/docs/_build/generated/cellestial.single.basic.scatter.scatter.html +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - - - - - - cellestial.single.basic.scatter.scatter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.basic.scatter.scatter#

-
-
-scatter(data: AnnData, mapping: FeatureSpec | None = None, *, axis: Literal[0, 1] | None = None, variable_keys: Sequence[str] | None = None, observations_name: str = 'Barcode', variables_name: str = 'Variable', include_dimensions: bool | int = False, interactive: bool = False, **geom_kwargs) PlotSpec[source]#
-

Scatter Plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • mapping (FeatureSpec | None, default None) – Aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • axis – The axis to build the frame for. 0 for observations, 1 for variables.

  • -
  • observations_name (str, default 'Barcode') – The name of the observations column.

  • -
  • variables_name (str, default 'Variable') – Name for the variables index column.

  • -
  • include_dimensions (bool | int, default False) – Whether to include dimensions in the DataFrame. -Providing an integer will limit the number of dimensions to given number.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • **geom_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Scatter plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.common.xyplot.xyplot.html b/docs/_build/generated/cellestial.single.common.xyplot.xyplot.html deleted file mode 100644 index 16647f5..0000000 --- a/docs/_build/generated/cellestial.single.common.xyplot.xyplot.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - cellestial.single.common.xyplot.xyplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.common.xyplot.xyplot#

-
-
-xyplot(data: AnnData, x: str, y: str, *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', variables_name: str = 'Variable', include_dimensions: bool | int = False, **point_kwargs) PlotSpec[source]#
-

Scatter Plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • x (str) – The key for the x-axis.

  • -
  • y (str) – The key for the y-axis.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Variable') – The name to give to variable index column in the dataframe.

  • -
  • include_dimensions (bool | int, default False) – Whether to include dimensions in the DataFrame. -Providing an integer will limit the number of dimensions to given number.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Scatter plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.common.xyplots.xyplots.html b/docs/_build/generated/cellestial.single.common.xyplots.xyplots.html deleted file mode 100644 index fb580dd..0000000 --- a/docs/_build/generated/cellestial.single.common.xyplots.xyplots.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - - - - - cellestial.single.common.xyplots.xyplots - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.common.xyplots.xyplots#

-
-
-xyplots(data: AnnData, x: str | Sequence[str], y: str | Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', variables_name: str = 'Variable', include_dimensions: bool | int = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Scatter Plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • x (str) – The key(s) for the x-axis.

  • -
  • y (str) – The key(s) for the y-axis.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Variable') – The name to give to variable index column in the dataframe.

  • -
  • include_dimensions (bool | int, default False) – Whether to include dimensions in the DataFrame. -Providing an integer will limit the number of dimensions to given number.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Scatter plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.dimensional.dimensional.html b/docs/_build/generated/cellestial.single.core.dimensional.dimensional.html deleted file mode 100644 index 63177e6..0000000 --- a/docs/_build/generated/cellestial.single.core.dimensional.dimensional.html +++ /dev/null @@ -1,575 +0,0 @@ - - - - - - - - - - - cellestial.single.core.dimensional.dimensional - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.dimensional.dimensional#

-
-
-dimensional(data: AnnData, key: str | None = None, *, mapping: FeatureSpec | None = None, dimensions: Literal['umap', 'pca', 'tsne'] = 'umap', use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, **point_kwargs) PlotSpec[source]#
-

Dimensionality reduction plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str, default None) – The key (cell feature) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • dimensions (Literal[``’umap’, ``'pca', 'tsne'], default 'umap') – The dimensional reduction method to use. -e.g., ‘umap’ or ‘pca’ or ‘tsne’.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Dimensional reduction plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.distribution.boxplot.html b/docs/_build/generated/cellestial.single.core.distribution.boxplot.html deleted file mode 100644 index c71c47f..0000000 --- a/docs/_build/generated/cellestial.single.core.distribution.boxplot.html +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - - - - - - cellestial.single.core.distribution.boxplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.distribution.boxplot#

-
-
-boxplot(data: AnnData, key: str | Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, color: str | None = None, fill: str | None = None, add_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, geom_fill: str | None = '#FF00FF', geom_color: str | None = '#2f2f2f', point_color: str = '#1f1f1f', point_alpha: float = 0.7, point_size: float = 0.5, point_geom: Literal['jitter', 'point', 'sina'] = 'jitter', observations_name: str = 'Barcode', variables_name: str = 'Variable', show_points: bool = True, interactive: bool = False, value_column: str = 'value', variable_column: str = 'variable', point_kwargs: dict[str, Any] | None = None, **geom_kwargs) PlotSpec[source]#
-

Boxplot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str | Sequence[str]) – The key(s) to get the values (numerical). -e.g., ‘total_counts’ or a gene name.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • color (str | None, default None) – Color aesthetic to split the boxplot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • fill (str | None, default None) – Fill aesthetic to split the boxplot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • add_keys (Sequence[str] | str | None, default None) – Additional keys to include in the dataframe.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • geom_fill (str | None, default '#FF00FF') –

    Fill color for all boxplots in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • geom_color (str | None, default '#2f2f2f') –

    Border color for all boxplots in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_color (str, default '#1f1f1f') –

    Color for the points in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_alpha (float, default 0.7) – Alpha (transparency) for the points in the boxplot.

  • -
  • point_size (float, default 0.5) – Size for the points in the boxplot.

  • -
  • point_geom (Literal[``’jitter’:py:class:`,`’point’:py:class:`,`’sina’:py:class:`]`, *default* is ``'jitter',) – Geom type of the points, default is geom_jitter.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Variable') – The name to give to variable index column in the dataframe.

  • -
  • show_points (bool, default True) – Whether to show points.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • variable_column (str, default 'variable') – The name of the variable column in the dataframe.

  • -
  • value_column (str, default 'value') – The name of the value column in the dataframe.

  • -
  • point_kwargs (dict[str, Any] | None, default None) – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
  • **geom_kwargs – Additional parameters for the geom_boxplot layer. -For more information on geom_boxplot parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_boxplot.html

  • -
-
-
Returns:
-

PlotSpec – Boxplot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.distribution.violin.html b/docs/_build/generated/cellestial.single.core.distribution.violin.html deleted file mode 100644 index 298b0f2..0000000 --- a/docs/_build/generated/cellestial.single.core.distribution.violin.html +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - - - - - - cellestial.single.core.distribution.violin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.distribution.violin#

-
-
-violin(data: AnnData, key: str | Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, color: str | None = None, fill: str | None = None, add_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, geom_fill: str | None = '#FF00FF', geom_color: str | None = '#2f2f2f', point_color: str = '#1f1f1f', point_alpha: float = 0.7, point_size: float = 0.5, point_geom: Literal['jitter', 'point', 'sina'] = 'jitter', observations_name: str = 'Barcode', variables_name: str = 'Variable', show_points: bool = True, interactive: bool = False, value_column: str = 'value', variable_column: str = 'variable', point_kwargs: dict[str, Any] | None = None, **geom_kwargs) PlotSpec[source]#
-

Violin Plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str | Sequence[str]) – The key(s) to get the values (numerical). -e.g., ‘total_counts’ or a gene name.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • color (str | None, default None) – Color aesthetic to split the violin plot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • fill (str | None, default None) – Fill aesthetic to split the violin plot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • add_keys (Sequence[str] | str | None, default None) – Additional keys to include in the dataframe.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • geom_fill (str | None, default '#FF00FF') –

    Fill color for all violins in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • geom_color (str | None, default '#2f2f2f') –

    Border color for all violins in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_color (str, default '#1f1f1f') –

    Color for the points in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_alpha (float, default 0.7) – Alpha (transparency) for the points in the violin plot.

  • -
  • point_size (float, default 0.5) – Size for the points in the violin plot.

  • -
  • point_geom (Literal[``’jitter’:py:class:`,`’point’:py:class:`,`’sina’:py:class:`]`, *default* is ``'jitter',) – Geom type of the points, default is geom_jitter.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Variable') – The name to give to variable index column in the dataframe.

  • -
  • show_points (bool, default True) – Whether to show points.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • variable_column (str, default 'variable') – The name of the variable column in the dataframe.

  • -
  • value_column (str, default 'value') – The name of the value column in the dataframe.

  • -
  • point_kwargs (dict[str, Any] | None, default None) – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
  • **geom_kwargs – Additional parameters for the geom_violin layer. -For more information on geom_violin parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_violin.html

  • -
-
-
Returns:
-

PlotSpec – Violin plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.distributions.boxplots.html b/docs/_build/generated/cellestial.single.core.distributions.boxplots.html deleted file mode 100644 index 387e879..0000000 --- a/docs/_build/generated/cellestial.single.core.distributions.boxplots.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - - - - - - cellestial.single.core.distributions.boxplots - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.distributions.boxplots#

-
-
-boxplots(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, color: str | None = None, fill: str | None = None, add_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, geom_fill: str = '#FF00FF', geom_color: str = '#2f2f2f', point_color: str = '#1f1f1f', point_alpha: float = 0.7, point_size: float = 0.5, point_geom: Literal['jitter', 'point', 'sina'] = 'jitter', observations_name: str = 'Barcode', variables_name: str = 'Variable', show_points: bool = True, interactive: bool = False, value_column: str = 'value', variable_column: str = 'variable', share_axis: bool = False, share_ticks: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list | None = None, heights: list | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', point_kwargs: dict[str, Any] | None = None, **geom_kwargs) SupPlotsSpec[source]#
-

Boxplots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys to get the values (numerical). -e.g., [‘total_counts’, ‘pct_counts_in_top_50_genes’] or a list of gene names.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • color (str | None, default None) – Color aesthetic to split the boxplot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • fill (str | None, default None) – Fill aesthetic to split the boxplot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • add_keys (Sequence[str] | str | None, default None) – Additional keys to include in the dataframe.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • geom_fill (str, default '#FF00FF') –

    Fill color for all boxplots in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • geom_color (str, default '#2f2f2f') –

    Border color for all boxplots in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_color (str, default '#1f1f1f') –

    Color for the points in the boxplot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_alpha (float, default 0.7) – Alpha (transparency) for the points in the boxplot.

  • -
  • point_size (float, default 0.5) – Size for the points in the boxplot.

  • -
  • point_geom (Literal[``’jitter’:py:class:`,`’point’:py:class:`,`’sina’:py:class:`]`, *default* is ``'jitter',) – Geom type of the points, default is geom_jitter.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Gene') – The name to give to variable index column in the dataframe.

  • -
  • show_points (bool, default True) – Whether to show points.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • share_ticks (bool, default True) – Whether to share the labels across all plots. -If True, only X tick texts on bottom row and Y tick text on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Additional layers to add to the plot.

  • -
  • variable_column (str, default 'variable') – The name of the variable column in the dataframe.

  • -
  • value_column (str, default 'value') – The name of the value column in the dataframe.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • point_kwargs (dict[str, Any] | None, default None) – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
  • **geom_kwargs – Additional parameters for the geom_boxplot layer. -For more information on geom_boxplot parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_boxplot.html

  • -
-
-
Returns:
-

SupPlotsSpec – Boxplots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.distributions.violins.html b/docs/_build/generated/cellestial.single.core.distributions.violins.html deleted file mode 100644 index b0b7ae3..0000000 --- a/docs/_build/generated/cellestial.single.core.distributions.violins.html +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - - - - - - cellestial.single.core.distributions.violins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.distributions.violins#

-
-
-violins(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, color: str | None = None, fill: str | None = None, add_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, geom_fill: str = '#FF00FF', geom_color: str = '#2f2f2f', point_color: str = '#1f1f1f', point_alpha: float = 0.7, point_size: float = 0.5, point_geom: Literal['jitter', 'point', 'sina'] = 'jitter', observations_name: str = 'Barcode', variables_name: str = 'Variable', show_points: bool = True, interactive: bool = False, value_column: str = 'value', variable_column: str = 'variable', share_axis: bool = False, share_ticks: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list | None = None, heights: list | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', point_kwargs: dict[str, Any] | None = None, **geom_kwargs) SupPlotsSpec[source]#
-

Violin Plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys to get the values (numerical). -e.g., [‘total_counts’, ‘pct_counts_in_top_50_genes’] or a list of gene names.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • axis (Literal[0,1] | None, default None) – axis of the data, 0 for observations and 1 for variables.

  • -
  • color (str | None, default None) – Color aesthetic to split the violin plot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • fill (str | None, default None) – Fill aesthetic to split the violin plot (categorical). -e,g., ‘cell_type’ or ‘leiden’.

  • -
  • add_keys (Sequence[str] | str | None, default None) – Additional keys to include in the dataframe.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • geom_fill (str, default '#FF00FF') –

    Fill color for all violins in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • geom_color (str, default '#2f2f2f') –

    Border color for all violins in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_color (str, default '#1f1f1f') –

    Color for the points in the violin plot. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -

  • -
  • point_alpha (float, default 0.7) – Alpha (transparency) for the points in the violin plot.

  • -
  • point_size (float, default 0.5) – Size for the points in the violin plot.

  • -
  • point_geom (Literal[``’jitter’:py:class:`,`’point’:py:class:`,`’sina’:py:class:`]`, *default* is ``'jitter',) – Geom type of the points, default is geom_jitter.

  • -
  • trim (bool, default False) – Whether to trim the violin plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • variables_name (str, default 'Gene') – The name to give to variable index column in the dataframe.

  • -
  • show_points (bool, default True) – Whether to show points.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • share_ticks (bool, default True) – Whether to share the labels across all plots. -If True, only X tick texts on bottom row and Y tick text on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Additional layers to add to the plot.

  • -
  • variable_column (str, default 'variable') – The name of the variable column in the dataframe.

  • -
  • value_column (str, default 'value') – The name of the value column in the dataframe.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • point_kwargs (dict[str, Any] | None, default None) – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
  • **geom_kwargs – Additional parameters for the geom_violin layer. -For more information on geom_violin parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_violin.html

  • -
-
-
Returns:
-

SupPlotsSpec – Violin Plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensional.expression.html b/docs/_build/generated/cellestial.single.core.subdimensional.expression.html deleted file mode 100644 index 5691c59..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensional.expression.html +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensional.expression - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensional.expression#

-
-
-expression(data: AnnData, key: str, *, mapping: FeatureSpec | None = None, dimensions: Literal['umap', 'pca', 'tsne'] = 'umap', use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = 'arrow', arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, **point_kwargs) PlotSpec[source]#
-

Dimensionality reduction plot of expression data.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str) – The key (gene names) to color the points by.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • dimensions (Literal[``’umap’, ``'pca', 'tsne'], default 'umap') – The dimensional reduction method to use. -e.g., ‘umap’ or ‘pca’ or ‘tsne’.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Dimensional reduction plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensional.pca.html b/docs/_build/generated/cellestial.single.core.subdimensional.pca.html deleted file mode 100644 index 3ba844d..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensional.pca.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensional.pca - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensional.pca#

-
-
-pca(data: AnnData, key: str | None = None, *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, **point_kwargs) PlotSpec[source]#
-

PCA Dimensionality reduction plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str, default None) – The key (cell feature) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Dimensional reduction plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensional.tsne.html b/docs/_build/generated/cellestial.single.core.subdimensional.tsne.html deleted file mode 100644 index c6156de..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensional.tsne.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensional.tsne - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensional.tsne#

-
-
-tsne(data: AnnData, key: str | None = None, *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, **point_kwargs) PlotSpec[source]#
-

tSNE Dimensionality reduction plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str, default None) – The key (cell feature) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Dimensional reduction plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensional.umap.html b/docs/_build/generated/cellestial.single.core.subdimensional.umap.html deleted file mode 100644 index 18b32bd..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensional.umap.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensional.umap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensional.umap#

-
-
-umap(data: AnnData, key: str | None = None, *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, **point_kwargs) PlotSpec[source]#
-

UMAP Dimensionality reduction plot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • key (str, default None) – The key (cell feature) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

PlotSpec – Dimensional reduction plot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensionals.dimensionals.html b/docs/_build/generated/cellestial.single.core.subdimensionals.dimensionals.html deleted file mode 100644 index f721a75..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensionals.dimensionals.html +++ /dev/null @@ -1,616 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensionals.dimensionals - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensionals.dimensionals#

-
-
-dimensionals(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, dimensions: Literal['umap', 'pca', 'tsne'] = 'umap', use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, share_labels: bool = True, share_axis: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Grid of dimensionality reduction plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys (cell features) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • dimensions (Literal[``’umap’, ``'pca', 'tsne'], default 'umap') – The dimensional reduction method to use. -e.g., ‘umap’ or ‘pca’ or ‘tsne’.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • cluster_name (str, default 'Cluster') – The name to overwrite the clustering key in the dataframe and the plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • share_labels (bool, default True) – Whether to share the labels across all plots. -If True, only X labels on bottom row and Y labels on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

SupPlotsSpec – Grid of dimensionality reduction plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensionals.expressions.html b/docs/_build/generated/cellestial.single.core.subdimensionals.expressions.html deleted file mode 100644 index c086c80..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensionals.expressions.html +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensionals.expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensionals.expressions#

-
-
-expressions(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, dimensions: Literal['umap', 'pca', 'tsne'] = 'umap', use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, share_labels: bool = True, share_axis: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Grid of dimensionality reduction plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys (gene names) to color the points by.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • dimensions (Literal[``’umap’, ``'pca', 'tsne'], default 'umap') – The dimensional reduction method to use. -e.g., ‘umap’ or ‘pca’ or ‘tsne’.

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • cluster_name (str, default 'Cluster') – The name to overwrite the clustering key in the dataframe and the plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • share_labels (bool, default True) – Whether to share the labels across all plots. -If True, only X labels on bottom row and Y labels on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

SupPlotsSpec – Grid of dimensionality reduction plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensionals.pcas.html b/docs/_build/generated/cellestial.single.core.subdimensionals.pcas.html deleted file mode 100644 index ed06445..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensionals.pcas.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensionals.pcas - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensionals.pcas#

-
-
-pcas(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, share_labels: bool = True, share_axis: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Grid of dimensionality reduction plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys (cell features) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • cluster_name (str, default 'Cluster') – The name to overwrite the clustering key in the dataframe and the plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • share_labels (bool, default True) – Whether to share the labels across all plots. -If True, only X labels on bottom row and Y labels on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

SupPlotsSpec – Grid of dimensionality reduction plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensionals.tsnes.html b/docs/_build/generated/cellestial.single.core.subdimensionals.tsnes.html deleted file mode 100644 index f8b66eb..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensionals.tsnes.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensionals.tsnes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensionals.tsnes#

-
-
-tsnes(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, share_labels: bool = True, share_axis: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Grid of dimensionality reduction plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys (cell features) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • cluster_name (str, default 'Cluster') – The name to overwrite the clustering key in the dataframe and the plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • share_labels (bool, default True) – Whether to share the labels across all plots. -If True, only X labels on bottom row and Y labels on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

SupPlotsSpec – Grid of dimensionality reduction plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.core.subdimensionals.umaps.html b/docs/_build/generated/cellestial.single.core.subdimensionals.umaps.html deleted file mode 100644 index 5283c22..0000000 --- a/docs/_build/generated/cellestial.single.core.subdimensionals.umaps.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - - - - - - cellestial.single.core.subdimensionals.umaps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.core.subdimensionals.umaps#

-
-
-umaps(data: AnnData, keys: Sequence[str], *, mapping: FeatureSpec | None = None, use_key: str | None = None, xy: tuple[int, int] | Sequence[int] = (1, 2), size: float = 0.8, variable_keys: Sequence[str] | str | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', color_low: str = '#e6e6e6', color_mid: str | None = None, color_high: str = '#377eb8', mid_point: Literal['mean', 'median', 'mid'] | float = 'median', axis_type: Literal['axis', 'arrow'] | None = None, arrow_length: float = 0.25, arrow_size: float = 1, arrow_color: str = '#3f3f3f', arrow_angle: float = 10, legend_ondata: bool = False, ondata_size: float = 12, ondata_color: str = '#3f3f3f', ondata_fontface: str = 'bold', ondata_family: str = 'sans', ondata_alpha: float = 1, ondata_weighted: bool = True, share_labels: bool = True, share_axis: bool = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec[source]#
-

Grid of dimensionality reduction plots.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (list[str] | tuple[str] | Sequence[str]) – The keys (cell features) to color the points by. -e.g., ‘leiden’ or ‘louvain’ to color by clusters or gene name for expression.

  • -
  • mapping (FeatureSpec | None, default None) – Additional aesthetic mappings for the plot, the result of aes().

  • -
  • xy (tuple[int, int] | Sequence[int], default (1, 2)) – The x and y axes to use for the plot. -e.g., (1, 2) for UMAP1 and UMAP2.

  • -
  • use_key (str, default None) – The specific key to use for the desired dimensions. -e.g., ‘X_umap_2d’ or ‘X_pca_2d’. -Otherwise, the function will decide on the key based on the dimensions.

  • -
  • size (float, default 0.8) – The size of the points.

  • -
  • variable_keys (str | Sequence[str] | None, default None) – Variable keys to add to the DataFrame. If None, no additional keys are added.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • cluster_name (str, default 'Cluster') – The name to overwrite the clustering key in the dataframe and the plot.

  • -
  • observations_name (str, default 'Barcode') – The name to give to barcode (or index) column in the dataframe.

  • -
  • color_low (str, default '#e6e6e6') –

    The color to use for the low end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_mid (str, default None) –

    The color to use for the middle part of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • color_high (str, default '#377EB8') –

    The color to use for the high end of the color gradient. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • mid_point (Literal[``’mean’, ``'median', 'mid'] | float, default 'median') – The midpoint (in data value) of the color gradient. -Can be ‘mean’, ‘median’ and ‘mid’ or a number (float or int). -- If ‘mean’, the midpoint is the mean of the data. -- If ‘median’, the midpoint is the median of the data. -- If ‘mid’, the midpoint is the mean of ‘min’ and ‘max’ of the data.

  • -
  • axis_type (Literal[``’axis’, ``'arrow'] | None) – Whether to use regular axis or arrows as the axis.

  • -
  • arrow_length (float, default 0.25) – Length of the arrow head (px).

  • -
  • arrow_size (float, default 1) – Size of the arrow.

  • -
  • arrow_color (str, default '#3f3f3f') –

    Color of the arrows. -- Accepts:

    -
    -
      -
    • hex code e.g. ‘#f1f1f1’

    • -
    • color name (of a limited set of colors).

    • -
    • RGB/RGBA e.g. ‘rgb(0, 0, 255)’, ‘rgba(0, 0, 255, 0.5)’.

    • -
    -
    -
      -
    • Applies to continuous (non-categorical) data.

    • -
    -

  • -
  • arrow_angle (float, default 10) – Angle of the arrow head in degrees.

  • -
  • legend_ondata (bool, default False) – whether to show legend on data

  • -
  • ondata_size (float, default 12) – size of the legend (text) on data.

  • -
  • ondata_color (str, default '#3f3f3f') – color of the legend (text) on data

  • -
  • ondata_fontface (str, default 'bold') – fontface of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-face

  • -
  • ondata_family (str, default 'sans') – family of the legend (text) on data. -https://lets-plot.org/python/pages/aesthetics.html#font-family

  • -
  • ondata_alpha (float, default 1) – alpha (transparency) of the legend on data.

  • -
  • ondata_weighted (bool, default True) – whether to use weighted mean for the legend on data. -If True, the weighted mean of the group means is used. -If False, the arithmetic mean of the group means is used.

  • -
  • share_labels (bool, default True) – Whether to share the labels across all plots. -If True, only X labels on bottom row and Y labels on left column are shown.

  • -
  • share_axis (bool, default False) – Whether to share the axis across all plots. -If True, only X axis on bottom row and Y axis on left column is shown.

  • -
  • layers (Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, default None) – Layers to add to all the plots in the grid.

  • -
  • ncol (int, default None) – Number of columns in grid. If not specified, shows plots horizontally, in one row.

  • -
  • sharex (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • sharey (bool, default None) – Controls sharing of axis limits between subplots in the grid. -all/True - share limits between all subplots. -none/False - do not share limits between subplots. -row - share limits between subplots in the same row. -col - share limits between subplots in the same column.

  • -
  • widths (list[float], default None) – Relative width of each column of grid, left to right.

  • -
  • heights (list[float], default None) – Relative height of each row of grid, top-down.

  • -
  • hspace (float | None = None) – Cell horizontal spacing in px.

  • -
  • vspace (float | None = None) – Cell vertical spacing in px.

  • -
  • fit (bool, default True) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), -or to preserve the original aspect ratio of plots (fit=False).

  • -
  • align (bool, default False) – If True, align inner areas (i.e. “geom” bounds) of plots. -However, cells containing other (sub)grids are not participating -in the plot “inner areas” layouting.

  • -
  • guides (str, default 'auto') –

    -
    Specifies how guides (legends and colorbars) should be treated in the layout.
      -
    • ’collect’ collect guides from all subplots, removing duplicates.

    • -
    • ’keep’ keep guides in their original subplots; do not collect at this level.

    • -
    • ’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;

    • -
    -
    -
    -

    otherwise, keep them in subplots. -Duplicates are identified by comparing visual properties: -For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). -For colorbars: title, domain limits, breaks, and color gradient.

    -

    For more information on gggrid parameters: -https://lets-plot.org/python/pages/api/lets_plot.gggrid.html

    -

  • -
  • **point_kwargs – Additional parameters for the geom_point layer. -For more information on geom_point parameters, see: -https://lets-plot.org/python/pages/api/lets_plot.geom_point.html

  • -
-
-
Returns:
-

SupPlotsSpec – Grid of dimensionality reduction plots.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.single.special.dotplot.dotplot.html b/docs/_build/generated/cellestial.single.special.dotplot.dotplot.html deleted file mode 100644 index 041a9d3..0000000 --- a/docs/_build/generated/cellestial.single.special.dotplot.dotplot.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - - - - - cellestial.single.special.dotplot.dotplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.single.special.dotplot.dotplot#

-
-
-dotplot(data: AnnData, keys: Sequence[str], group_by: str, *, threshold: float = 0, variables_name: str = 'gene', value_name: str = 'expression', color_low: str = '#e6e6e6', color_high: str = '#D2042D', fill: bool = False, sort_by: str | Sequence[str] | None = None, sort_order: Literal['ascending', 'descending'] = 'descending', percentage_key: str = 'pct_exp', mean_key: str = 'avg_exp', tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, **geom_kwargs) PlotSpec[source]#
-

Dotplot.

-
-
Parameters:
-
    -
  • data (AnnData) – The AnnData object of the single cell data.

  • -
  • keys (Sequence[str]) – The variable keys or names to include in the dotplot.

  • -
  • group_by (str) – The key to group the data by.

  • -
  • threshold (float, default 0) – The expression threshold to consider a gene as expressed.

  • -
  • variables_name (str, default 'gene') – The name of the variable column in the long format.

  • -
  • value_name (str, default 'expression') – The name of the value column in the long format.

  • -
  • color_low (str, default '#e6e6e6') – The low color for the gradient.

  • -
  • color_high (str, default '#D2042D') – The high color for the gradient.

  • -
  • fill (bool, optional) – Whether to use fill aesthetic instead of color, by default False.

  • -
  • sort_by (str | None) – The column to sort the results by, by default None.

  • -
  • sort_order (str, default 'descending') – The sort order, either ‘ascending’ or ‘descending’.

  • -
  • percentage_key (str, default 'pct_exp') – The name of the percentage column.

  • -
  • mean_key (str, default 'avg_exp') – The name of the mean expression column.

  • -
  • tooltips (Literal[``’none’``] | Sequence[str] | FeatureSpec | None, default None) – Tooltips to show when hovering over the geom. -Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. -Use ‘none’ to disable tooltips.

  • -
  • show_tooltips (bool, default True) – Whether to show tooltips.

  • -
  • interactive (bool, default False) – Whether to make the plot interactive.

  • -
  • **geom_kwargs (Any) – Additional keyword arguments for the geom_point layer.

  • -
-
-
Returns:
-

PlotSpec – Dotplot.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.util.colors.show_colors.html b/docs/_build/generated/cellestial.util.colors.show_colors.html deleted file mode 100644 index 1135cf5..0000000 --- a/docs/_build/generated/cellestial.util.colors.show_colors.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - cellestial.util.colors.show_colors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.util.colors.show_colors#

-
-
-show_colors()[source]#
-

Show a grid of hand-picked colors.

-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.util.get_mapping.html b/docs/_build/generated/cellestial.util.get_mapping.html deleted file mode 100644 index 8793fa2..0000000 --- a/docs/_build/generated/cellestial.util.get_mapping.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - cellestial.util.get_mapping - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.util.get_mapping#

-
-
-get_mapping()#
-

Returns the mapping of the plot as a dict.

-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.util.utilities.get_mapping.html b/docs/_build/generated/cellestial.util.utilities.get_mapping.html deleted file mode 100644 index 01af23f..0000000 --- a/docs/_build/generated/cellestial.util.utilities.get_mapping.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - cellestial.util.utilities.get_mapping - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.util.utilities.get_mapping#

-
-
-get_mapping()#
-

Returns the mapping of the plot as a dict.

-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.util.utilities.retrieve.html b/docs/_build/generated/cellestial.util.utilities.retrieve.html deleted file mode 100644 index 2d3a9d9..0000000 --- a/docs/_build/generated/cellestial.util.utilities.retrieve.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - - - - cellestial.util.utilities.retrieve - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.util.utilities.retrieve#

-
-
-retrieve(plot: PlotSpec | SupPlotsSpec, index: int = 0) pl.DataFrame[source]#
-

Retrieves the dataframe from a PlotSpec or SupPlotsSpec using the index.

-
-
plotPlotSpec | SupPlotsSpec

The plot to retrieve the dataframe from.

-
-
indexint, optional

The index of the figure to retrieve the dataframe from, by default 0

-
-
-
-
Returns:
-

pl.DataFrame – The dataframe utilized in the plot.

-
-
Raises:
-

TypeError – If the plot is not a PlotSpec or SupPlotsSpec object.

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/generated/cellestial.util.utilities.slice.html b/docs/_build/generated/cellestial.util.utilities.slice.html deleted file mode 100644 index c76422c..0000000 --- a/docs/_build/generated/cellestial.util.utilities.slice.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - cellestial.util.utilities.slice - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - -
-
- - - - - - -
- - - - - - - - - -
- -
- - -
-
- -
-
- -
- -
- - -
- -
- - -
-
- - - - - -
- -
-

cellestial.util.utilities.slice#

-
-
-slice()[source]#
-

Slice a ggrid (SupPlotsSpec) objects with given index.

-
-
Parameters:
-
-
-
Returns:
-

PlotSpec | SupPlotsSpec – The sliced grid.

-
-
Raises:
-

TypeError – If the grid is not a SupPlotsSpec object. - If the index is not an int or Sequence[int].

-
-
-
- -
- - -
- - - - - -
- - - - -
- - -
- - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/docs/_build/searchindex.js b/docs/_build/searchindex.js deleted file mode 100644 index 6f93188..0000000 --- a/docs/_build/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({"alltitles":{"API Reference":[[0,null]],"About Lets-Plot":[[30,"about-lets-plot"]],"Base":[[0,"base"]],"Basic":[[0,"basic"]],"Cellestial":[[30,null]],"Common":[[0,"common"]],"Content":[[30,"content"]],"Data Frames":[[0,"data-frames"]],"Design Philosophy":[[32,null]],"Dimensionality Reduction":[[0,"dimensionality-reduction"]],"Distributions":[[0,"distributions"]],"Example":[[30,"example"]],"Example: 100k cells":[[31,"example-100k-cells"]],"Explicitness over implicitness":[[32,"explicitness-over-implicitness"]],"Installation":[[30,"installation"]],"Layers":[[0,"layers"]],"Modularity over abstraction":[[32,"modularity-over-abstraction"]],"Performance & Scalability":[[31,null]],"Predictability over flexibility":[[32,"predictability-over-flexibility"]],"Simplicity & Expressiveness":[[32,"simplicity-expressiveness"]],"Special":[[0,"special"]],"Utility":[[0,"utility"]],"cellestial.bar":[[3,null]],"cellestial.boxplot":[[4,null]],"cellestial.boxplots":[[5,null]],"cellestial.build_frame":[[6,null]],"cellestial.cluster_outlines":[[7,null]],"cellestial.dimensional":[[8,null]],"cellestial.dimensionals":[[9,null]],"cellestial.dotplot":[[10,null]],"cellestial.expression":[[11,null]],"cellestial.expressions":[[12,null]],"cellestial.get_mapping":[[13,null]],"cellestial.heatmap":[[14,null]],"cellestial.pca":[[15,null]],"cellestial.pcas":[[16,null]],"cellestial.plot":[[17,null]],"cellestial.retrieve":[[18,null]],"cellestial.scatter":[[19,null]],"cellestial.show_colors":[[20,null]],"cellestial.slice":[[21,null]],"cellestial.tsne":[[22,null]],"cellestial.tsnes":[[23,null]],"cellestial.umap":[[24,null]],"cellestial.umaps":[[25,null]],"cellestial.violin":[[26,null]],"cellestial.violins":[[27,null]],"cellestial.xyplot":[[28,null]],"cellestial.xyplots":[[29,null]]},"docnames":["API","_templates/autoapi/python/module","_templates/autosummary/table","generated/cellestial.bar","generated/cellestial.boxplot","generated/cellestial.boxplots","generated/cellestial.build_frame","generated/cellestial.cluster_outlines","generated/cellestial.dimensional","generated/cellestial.dimensionals","generated/cellestial.dotplot","generated/cellestial.expression","generated/cellestial.expressions","generated/cellestial.get_mapping","generated/cellestial.heatmap","generated/cellestial.pca","generated/cellestial.pcas","generated/cellestial.plot","generated/cellestial.retrieve","generated/cellestial.scatter","generated/cellestial.show_colors","generated/cellestial.slice","generated/cellestial.tsne","generated/cellestial.tsnes","generated/cellestial.umap","generated/cellestial.umaps","generated/cellestial.violin","generated/cellestial.violins","generated/cellestial.xyplot","generated/cellestial.xyplots","index","performance","philosophy"],"envversion":{"sphinx":66,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2},"filenames":["API.rst","_templates/autoapi/python/module.rst","_templates/autosummary/table.rst","generated/cellestial.bar.rst","generated/cellestial.boxplot.rst","generated/cellestial.boxplots.rst","generated/cellestial.build_frame.rst","generated/cellestial.cluster_outlines.rst","generated/cellestial.dimensional.rst","generated/cellestial.dimensionals.rst","generated/cellestial.dotplot.rst","generated/cellestial.expression.rst","generated/cellestial.expressions.rst","generated/cellestial.get_mapping.rst","generated/cellestial.heatmap.rst","generated/cellestial.pca.rst","generated/cellestial.pcas.rst","generated/cellestial.plot.rst","generated/cellestial.retrieve.rst","generated/cellestial.scatter.rst","generated/cellestial.show_colors.rst","generated/cellestial.slice.rst","generated/cellestial.tsne.rst","generated/cellestial.tsnes.rst","generated/cellestial.umap.rst","generated/cellestial.umaps.rst","generated/cellestial.violin.rst","generated/cellestial.violins.rst","generated/cellestial.xyplot.rst","generated/cellestial.xyplots.rst","index.rst","performance.rst","philosophy.rst"],"indexentries":{"bar() (in module cellestial)":[[3,"cellestial.bar",false]],"boxplot() (in module cellestial)":[[4,"cellestial.boxplot",false]],"boxplots() (in module cellestial)":[[5,"cellestial.boxplots",false]],"build_frame() (in module cellestial)":[[6,"cellestial.build_frame",false]],"cluster_outlines() (in module cellestial)":[[7,"cellestial.cluster_outlines",false]],"dimensional() (in module cellestial)":[[8,"cellestial.dimensional",false]],"dimensionals() (in module cellestial)":[[9,"cellestial.dimensionals",false]],"dotplot() (in module cellestial)":[[10,"cellestial.dotplot",false]],"expression() (in module cellestial)":[[11,"cellestial.expression",false]],"expressions() (in module cellestial)":[[12,"cellestial.expressions",false]],"get_mapping() (in module cellestial)":[[13,"cellestial.get_mapping",false]],"heatmap() (in module cellestial)":[[14,"cellestial.heatmap",false]],"pca() (in module cellestial)":[[15,"cellestial.pca",false]],"pcas() (in module cellestial)":[[16,"cellestial.pcas",false]],"plot() (in module cellestial)":[[17,"cellestial.plot",false]],"retrieve() (in module cellestial)":[[18,"cellestial.retrieve",false]],"scatter() (in module cellestial)":[[19,"cellestial.scatter",false]],"show_colors() (in module cellestial)":[[20,"cellestial.show_colors",false]],"slice() (in module cellestial)":[[21,"cellestial.slice",false]],"tsne() (in module cellestial)":[[22,"cellestial.tsne",false]],"tsnes() (in module cellestial)":[[23,"cellestial.tsnes",false]],"umap() (in module cellestial)":[[24,"cellestial.umap",false]],"umaps() (in module cellestial)":[[25,"cellestial.umaps",false]],"violin() (in module cellestial)":[[26,"cellestial.violin",false]],"violins() (in module cellestial)":[[27,"cellestial.violins",false]],"xyplot() (in module cellestial)":[[28,"cellestial.xyplot",false]],"xyplots() (in module cellestial)":[[29,"cellestial.xyplots",false]]},"objects":{"cellestial":[[3,0,1,"","bar"],[4,0,1,"","boxplot"],[5,0,1,"","boxplots"],[6,0,1,"","build_frame"],[7,0,1,"","cluster_outlines"],[8,0,1,"","dimensional"],[9,0,1,"","dimensionals"],[10,0,1,"","dotplot"],[11,0,1,"","expression"],[12,0,1,"","expressions"],[13,0,1,"","get_mapping"],[14,0,1,"","heatmap"],[15,0,1,"","pca"],[16,0,1,"","pcas"],[17,0,1,"","plot"],[18,0,1,"","retrieve"],[19,0,1,"","scatter"],[20,0,1,"","show_colors"],[21,0,1,"","slice"],[22,0,1,"","tsne"],[23,0,1,"","tsnes"],[24,0,1,"","umap"],[25,0,1,"","umaps"],[26,0,1,"","violin"],[27,0,1,"","violins"],[28,0,1,"","xyplot"],[29,0,1,"","xyplots"]]},"objnames":{"0":["py","function","Python function"]},"objtypes":{"0":"py:function"},"terms":{"0x120b72270":[],"0x120ba1f20":[],"0x120d9a270":[],"0x120dc5f20":[],"0x120e2a270":[],"0x120e59f20":[],"0x120f620d0":[],"0x120ffe270":[],"0x12102df20":[],"0x12102e0d0":[],"0x1211acef0":[],"0x121278ef0":[],"0x1213020d0":[],"0x12141e270":[],"0x12143e0d0":[],"0x12144df20":[],"0x121548ef0":[],"0x1215fa270":[],"0x121629f20":[],"0x121684ef0":[],"0x1218aa0d0":[],"0x121af4ef0":[],"0x122a460d0":[],"0x122b62270":[],"0x122b8df20":[],"0x122c8cef0":[],"0x122f46270":[],"0x122f75f20":[],"0x12324a270":[],"0x123279f20":[],"0x1235960d0":3,"0x1237b2270":[],"0x1237e0ef0":3,"0x1237e1f20":[],"0x124a360d0":[],"0x124dc60d0":[],"0x12500cef0":[],"0x1250ca0d0":[],"0x125152270":[],"0x125181f20":[],"0x1251c60d0":[],"0x125310ef0":[],"0x125410ef0":[],"0x1254e2270":[],"0x125511f20":[],"0x12577e270":[],"0x1257a9f20":[],"0x129d3a270":[],"0x129d6df20":[],"0x129e6a270":[],"0x129e95f20":[],"0x129e9e0d0":[],"0x129ec60d0":[],"0x129f4a0d0":[],"0x12a0720d0":[],"0x12a08e0d0":[],"0x12a0e8ef0":[],"0x12a10cef0":[],"0x12a194ef0":[],"0x12a2160d0":[],"0x12a24e270":[],"0x12a279f20":[],"0x12a2860d0":[],"0x12a2bcef0":[],"0x12a2d8ef0":[],"0x12a3ee0d0":[],"0x12a460ef0":[],"0x12a49e0d0":[],"0x12a4ccef0":[],"0x12a56a270":[],"0x12a595f20":[],"0x12a638ef0":[],"0x12a63e270":[],"0x12a64e0d0":[],"0x12a66df20":[],"0x12a6e4ef0":[],"0x12a73e270":[],"0x12a76df20":[],"0x12a7b60d0":[],"0x12a890ef0":[],"0x12a9960d0":[],"0x12a9fcef0":[],"0x12ab2e0d0":[],"0x12ab8e270":[],"0x12abbdf20":[],"0x12abe0ef0":[],"0x12ad78ef0":[],"0x12bd3e270":[],"0x12bd6df20":[],"0x12bd9e0d0":[],"0x12be3e270":[],"0x12be42270":[],"0x12be6df20":[],"0x12bec60d0":[],"0x12bf3e270":[],"0x12bf4a0d0":[],"0x12bf6df20":[],"0x12bfe8ef0":[],"0x12c09e0d0":[],"0x12c10cef0":[],"0x12c194ef0":[],"0x12c1a2270":[],"0x12c1ba270":[],"0x12c1d5f20":[],"0x12c1e5f20":[],"0x12c2e4ef0":[],"0x12c2ee0d0":[],"0x12c33e0d0":[],"0x12c43e270":[],"0x12c46df20":[],"0x12c530ef0":[],"0x12c588ef0":[],"0x12c74e0d0":[],"0x12c79e0d0":[],"0x12c81a270":[],"0x12c845f20":[],"0x12c88e0d0":[],"0x12c8ee270":[],"0x12c91df20":[],"0x12c94e0d0":[],"0x12c998ef0":[],"0x12c9e8ef0":[],"0x12ca42270":[],"0x12ca71f20":[],"0x12caaa0d0":[],"0x12cad4ef0":[],"0x12cb98ef0":[],"0x12cc7e0d0":[],"0x12ccf4ef0":[],"0x12cec8ef0":[],"0x12dd3e270":17,"0x12dd6df20":17,"0x12dee8ef0":[],"0x12df1a270":[],"0x12df45f20":[],"0x12df9e0d0":[],"0x12dff2270":[],"0x12e01df20":[],"0x12e1660d0":[],"0x12e172270":[],"0x12e1a5f20":[],"0x12e1b6270":[],"0x12e1e4ef0":[],"0x12e1e5f20":[],"0x12e1f2270":[],"0x12e21df20":[],"0x12e2ba270":[],"0x12e2e5f20":[],"0x12e3160d0":[],"0x12e32e0d0":[],"0x12e3acef0":[],"0x12e558ef0":[],"0x12e560ef0":[],"0x12e578ef0":[],"0x12e642270":[],"0x12e66df20":[],"0x12e6ee270":[],"0x12e71df20":[],"0x12e73e270":[],"0x12e771f20":[],"0x12e7e20d0":[],"0x12e9f2270":[],"0x12ea1df20":[],"0x12ea28ef0":[],"0x12eb92270":[],"0x12ebbdf20":[],"0x12ec760d0":[],"0x12eebcef0":[],"1f1f1f":[4,5,7,26,27],"2f2f2f":[4,5,26,27],"377eb8":[8,9,11,12,15,16,22,23,24,25],"3f3f3f":[8,9,11,12,15,16,22,23,24,25],"A":[6,7],"For":[3,4,5,7,8,9,11,12,14,15,16,19,22,23,24,25,26,27,28,29,32],"If":[3,5,6,7,8,9,11,12,14,15,16,17,18,19,21,22,23,24,25,27,29,32],"In":32,"It":30,"On":32,"The":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,30,31,32],"These":32,"This":32,"While":32,"abc":[],"abov":30,"accept":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29,32],"across":[5,9,12,16,23,25,27],"add":[3,5,6,7,8,9,11,12,14,15,16,17,19,22,23,24,25,27,29],"add_key":[4,5,26,27],"addit":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,21,22,23,24,25,26,27,28,29,30],"ae":[3,4,5,7,8,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"aesthet":[3,4,5,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,32],"algorithm":7,"align":[5,9,12,16,23,25,27,29],"allow":[5,7,9,12,16,23,25,27,29,31,32],"alpha":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"analysi":32,"angl":[8,9,11,12,15,16,22,23,24,25],"ani":[4,5,10,21,26,27,32],"anndata":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,31],"api":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29,30,32],"appear":7,"appli":[8,9,11,12,15,16,22,23,24,25,32],"approach":32,"area":[5,9,12,16,23,25,27,29],"argument":[10,21,32],"arithmet":[8,9,11,12,15,16,22,23,24,25],"around":7,"arrow":[8,9,11,12,15,16,22,23,24,25],"arrow_angl":[8,9,11,12,15,16,22,23,24,25],"arrow_color":[8,9,11,12,15,16,22,23,24,25],"arrow_length":[8,9,11,12,15,16,22,23,24,25],"arrow_s":[8,9,11,12,15,16,22,23,24,25],"ascend":10,"aspect":[5,9,12,16,23,25,27,29],"atlas":31,"auto":[5,9,12,16,23,25,27,29],"avail":32,"avg_exp":10,"avoid":31,"awar":32,"axe":[8,9,11,12,15,16,22,23,24,25],"axi":[3,4,5,6,7,8,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"axis_typ":[8,9,11,12,15,16,22,23,24,25],"b":7,"barcod":[3,4,5,6,8,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"base":[8,9,11,12,15,16,17,22,23,24,25],"befor":7,"best":30,"bettermock":[],"blank":[],"blaze":31,"bold":[8,9,11,12,15,16,22,23,24,25],"bool":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"border":[4,5,26,27],"borrow":32,"bottom":[5,9,12,16,23,25,27],"bound":[5,7,9,12,16,23,25,27,29],"boundari":7,"box":7,"boxplot":32,"break":[5,9,12,16,23,25,27,29],"breast":31,"bubbl":7,"buffer":7,"build":[3,6,19,31],"built":30,"calcul":7,"call":32,"can":[7,8,9,11,12,15,16,22,23,24,25,32],"cancer":31,"captur":7,"case":32,"categor":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"cell":[3,4,5,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,30],"cell_typ":[4,5,7,26,27],"cell_type_lvl1":[3,17],"cellesti":[31,32],"chang":32,"chose":32,"cl":[3,17,32],"class":[4,5,26,27],"cloud":7,"cluster":[7,8,9,12,15,16,22,23,24,25],"cluster_nam":[9,12,16,23,25],"code":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"col":[5,9,12,16,23,25,27,29],"collect":[5,9,12,16,23,25,27,29],"color":[4,5,7,8,9,10,11,12,15,16,20,22,23,24,25,26,27,29],"color_high":[8,9,10,11,12,15,16,22,23,24,25],"color_low":[8,9,10,11,12,15,16,22,23,24,25],"color_mid":[8,9,11,12,15,16,22,23,24,25],"colorbar":[5,9,12,16,23,25,27,29],"column":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,31],"combin":7,"compar":[5,9,12,16,23,25,27,29],"complex":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29,32],"conflict":32,"consid":10,"contain":[5,6,9,12,16,23,25,27,29],"continu":[8,9,11,12,15,16,22,23,24,25],"control":[5,9,12,16,23,25,27,29],"conveni":32,"convent":32,"coordin":7,"core":[3,7,17,31],"creat":7,"curv":7,"curvi":7,"custom":2,"customiz":32,"d2042d":10,"dash":7,"data":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,31,32],"datafram":[3,4,5,6,8,9,11,12,14,15,16,17,18,19,22,23,24,25,26,27,28,29,31],"decid":[8,9,11,12,15,16,22,23,24,25],"default":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,22,23,24,25,26,27,28,29],"degre":[8,9,11,12,15,16,22,23,24,25],"densiti":7,"descend":10,"design":30,"desir":[8,9,11,12,15,16,22,23,24,25],"dict":[4,5,13,21,26,27],"differ":32,"dimens":[3,6,8,9,11,12,14,15,16,17,19,22,23,24,25,28,29],"dimension":[11,12,15,16,22,23,24,25],"direct":[3,31],"disabl":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29],"display":1,"docstr":1,"domain":[5,9,12,16,23,25,27,29],"dot":7,"dotdash":[],"duplic":[5,9,12,16,23,25,27,29],"e":[4,5,7,8,9,11,12,15,16,22,23,24,25,26,27,29,31,32],"e6e6e6":[8,9,10,11,12,15,16,22,23,24,25],"easier":32,"eda":32,"edg":7,"either":[10,31],"elimin":32,"end":[8,9,11,12,15,16,22,23,24,25],"endfor":[1,2],"endif":1,"enough":32,"ensur":[7,31,32],"etc":[5,9,12,16,23,25,27,29],"exact":32,"exampl":[3,17],"expand":7,"exploratori":32,"express":[7,8,9,10,15,16,22,23,24,25],"extract":7,"f1f1f1":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"face":[8,9,11,12,15,16,22,23,24,25],"fals":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"famili":[8,9,11,12,15,16,22,23,24,25],"fast":31,"featur":[8,9,15,16,22,23,24,25,30],"featurespec":[3,4,5,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"ff00ff":[4,5,26,27],"figur":[18,32],"fill":[3,4,5,10,17,26,27],"fit":[5,9,12,16,23,25,27,29],"float":[4,5,7,8,9,10,11,12,15,16,22,23,24,25,26,27,29],"follow":32,"font":[8,9,11,12,15,16,22,23,24,25],"fontfac":[8,9,11,12,15,16,22,23,24,25],"format":10,"former":32,"fraction":7,"frame":[3,6,19],"fulli":32,"function":[1,8,9,11,12,15,16,21,22,23,24,25,32],"g":[4,5,7,8,9,11,12,15,16,22,23,24,25,26,27,31],"gene":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27],"geom":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29,30,32],"geom_bar":[3,14],"geom_boxplot":[4,5,17],"geom_color":[4,5,26,27],"geom_fil":[4,5,26,27],"geom_jitt":[4,5,26,27],"geom_kwarg":[3,4,5,7,10,14,19,26,27],"geom_path":7,"geom_point":[4,5,8,9,10,11,12,15,16,19,22,23,24,25,26,27,28,29],"geom_violin":[17,26,27],"get":[4,5,26,27],"gggrid":[5,9,12,16,21,23,25,27,29],"ggplot":[17,31,32],"ggplot2":30,"ggrid":21,"ggsize":32,"give":[4,5,8,9,11,12,15,16,22,23,24,25,26,27,28,29],"given":[3,6,7,14,17,19,21,28,29],"gradient":[5,8,9,10,11,12,15,16,22,23,24,25,27,29],"grammar":30,"graphic":30,"grid":[5,7,9,12,16,20,21,23,25,27,29,32],"grid_siz":7,"group":[7,8,9,10,11,12,15,16,22,23,24,25],"group_bi":[7,10],"guarante":32,"guid":[5,9,12,16,23,25,27,29],"h5ad":[3,17],"hand":20,"handl":31,"head":[8,9,11,12,15,16,22,23,24,25],"height":[5,9,12,16,23,25,27,29,32],"hex":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"high":[8,9,10,11,12,15,16,22,23,24,25],"higher":7,"horizont":[5,9,12,16,23,25,27,29],"hover":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29,30],"howev":[5,9,12,16,23,25,27,29,32],"hspace":[5,9,12,16,23,25,27,29],"html":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29],"https":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29],"identifi":[5,9,12,16,23,25,27,29],"implement":30,"import":[3,17],"improv":7,"inc_dim":32,"includ":[3,4,5,6,10,14,17,19,26,27,28,29,32],"include_dimens":[3,6,14,17,19,28,29,32],"inclus":7,"increas":7,"index":[3,4,5,6,8,9,11,12,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29],"indic":21,"infer":7,"inform":[3,4,5,7,8,9,11,12,14,15,16,19,22,23,24,25,26,27,28,29],"inner":[5,9,12,16,23,25,27,29],"instanc":32,"instead":[10,32],"int":[3,5,6,7,8,9,11,12,14,15,16,17,18,19,21,22,23,24,25,27,28,29],"integ":[3,6,14,17,19,28,29],"interact":[3,4,5,8,9,10,11,12,14,15,16,19,22,23,24,25,26,27,28,29],"intern":7,"interpol":7,"intuit":32,"item":2,"jag":7,"jitter":[4,5,26,27],"keep":[5,9,12,16,23,25,27,29],"key":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,32],"keyword":[10,32],"know":32,"kwarg":21,"label":[5,9,12,16,23,25,27,29],"larger":7,"layer":[3,4,5,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,32],"layer_tooltip":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29],"layerspec":[5,7,9,12,16,23,25,27,29],"layout":[5,9,12,16,23,25,27,29],"left":[5,9,12,16,23,25,27,29],"legend":[5,8,9,11,12,15,16,22,23,24,25,27,29],"legend_ondata":[8,9,11,12,15,16,22,23,24,25],"leiden":[3,4,5,8,9,15,16,22,23,24,25,26,27],"length":[1,8,9,11,12,15,16,22,23,24,25],"less":32,"let":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29,31],"lets_plot":[3,4,5,7,8,9,11,12,14,15,16,17,19,21,22,23,24,25,26,27,28,29],"letsplot":[3,17],"level":[5,7,9,12,16,23,25,27,29],"leverag":31,"librari":[30,32],"limit":[3,4,5,6,8,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"linetyp":7,"list":[5,7,9,12,16,23,25,27,29],"liter":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"long":10,"longdash":[],"louvain":[8,9,15,16,22,23,24,25],"low":[8,9,10,11,12,15,16,22,23,24,25],"lower":7,"main":32,"make":[3,4,5,8,9,10,11,12,14,15,16,19,22,23,24,25,26,27,28,29],"mani":32,"map":[3,4,5,7,8,9,11,12,13,14,15,16,17,19,22,23,24,25,26,27,28,29],"march":7,"match":[5,9,12,16,23,25,27,29],"max":[8,9,11,12,15,16,22,23,24,25],"may":7,"mean":[8,9,10,11,12,15,16,22,23,24,25],"mean_key":10,"median":[8,9,11,12,15,16,22,23,24,25],"member":1,"memori":31,"merg":32,"method":[8,9,11,12],"mid":[8,9,11,12,15,16,22,23,24,25],"mid_point":[8,9,11,12,15,16,22,23,24,25],"middl":[8,9,11,12,15,16,22,23,24,25],"midpoint":[8,9,11,12,15,16,22,23,24,25],"min":[8,9,11,12,15,16,22,23,24,25],"minim":31,"mostly":31,"multipl":32,"n_gene":17,"name":[1,3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,32],"namespac":32,"natur":31,"ncol":[5,9,12,16,23,25,27,29],"necessari":31,"need":32,"nest":7,"nice":32,"non":[8,9,11,12,15,16,22,23,24,25],"none":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"notebook":32,"number":[3,5,6,7,8,9,11,12,14,15,16,17,19,22,23,24,25,27,28,29],"numer":[4,5,26,27],"obj":1,"object":[3,4,5,6,8,9,10,11,12,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29],"observ":[3,4,5,6,14,17,19,26,27,28,29],"observations_nam":[3,4,5,6,8,9,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"omic":30,"ondata_alpha":[8,9,11,12,15,16,22,23,24,25],"ondata_color":[8,9,11,12,15,16,22,23,24,25],"ondata_famili":[8,9,11,12,15,16,22,23,24,25],"ondata_fontfac":[8,9,11,12,15,16,22,23,24,25],"ondata_s":[8,9,11,12,15,16,22,23,24,25],"ondata_weight":[8,9,11,12,15,16,22,23,24,25],"one":[5,7,9,12,16,23,25,27,29],"onli":[5,9,12,16,23,25,27,32],"option":[10,18,30],"order":10,"org":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29],"origin":[5,9,12,16,23,25,27,29],"otherwis":[5,8,9,11,12,15,16,22,23,24,25,27,29],"outermost":7,"outlier":7,"outlier_s":17,"outlin":7,"overwrit":[9,12,16,23,25],"p1":[3,17],"p2":[3,17],"pad":7,"page":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29],"palett":3,"pan":30,"paramet":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,32],"part":[8,9,11,12,15,16,22,23,24,25],"particip":[5,9,12,16,23,25,27,29],"particular":32,"pass":31,"path":7,"pbmc3k_pped":[3,17],"pca":[8,9,11,12],"pct_counts_in_top_50_gen":[5,27],"pct_exp":10,"peak":7,"percentag":10,"percentage_key":10,"perform":30,"philosophi":30,"pick":20,"pip":30,"pixel":7,"pl":[6,18],"plot":[3,4,5,7,8,9,10,11,12,13,14,15,16,18,19,21,22,23,24,25,26,27,28,29,31,32],"plotspec":[3,4,7,8,10,11,14,15,17,18,19,21,22,24,26,28,29,32],"plural":32,"point":[4,5,7,8,9,11,12,15,16,22,23,24,25,26,27,32],"point_alpha":[4,5,26,27],"point_color":[4,5,26,27],"point_geom":[4,5,26,27],"point_kwarg":[4,5,8,9,11,12,15,16,22,23,24,25,26,27,28,29],"point_siz":[4,5,26,27],"polar":[6,31],"possibl":32,"power":30,"predicted_doublet":3,"preserv":[5,9,12,16,23,25,27,29],"process":31,"produc":[7,32],"programm":32,"properti":[5,9,12,16,23,25,27,29],"provid":[3,6,7,14,17,19,28,29,32],"px":[5,8,9,11,12,15,16,22,23,24,25,27,29],"py":[4,5,26,27],"python":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29,30,32],"rais":[18,21],"ratio":[5,9,12,16,23,25,27,29],"read_h5ad":[3,17],"reduct":[8,9,11,12,15,16,22,23,24,25],"refer":30,"regular":[8,9,11,12,15,16,22,23,24,25],"relat":[5,9,12,16,23,25,27,29],"rememb":32,"remov":[5,9,12,16,23,25,27,29],"render":1,"reproduc":32,"requir":32,"resolut":7,"result":[3,4,5,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"return":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,32],"rgb":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"rgba":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"right":[5,9,12,16,23,25,27,29],"risk":32,"row":[5,9,12,16,23,25,27,29],"rust":32,"s":[4,7,26,29],"sacrific":32,"sampl":7,"san":[8,9,11,12,15,16,22,23,24,25],"sc":[3,17],"scalabl":30,"scale":17,"scale_fill_brew":3,"scale_fill_viridi":17,"scanpi":[3,17],"scatter":[28,29],"see":[3,4,5,7,8,9,11,12,14,15,16,19,21,22,23,24,25,26,27,28,29,30],"sequenc":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,21,22,23,24,25,26,27,28,29,32],"set":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"set2":3,"setup_html":[3,17],"shape":[5,9,12,16,23,25,27,29],"share":[5,9,12,16,23,25,27,29],"share_axi":[5,9,12,16,23,25,27],"share_label":[9,12,16,23,25],"share_tick":[5,27],"sharex":[5,9,12,16,23,25,27,29],"sharey":[5,9,12,16,23,25,27,29],"shorten":32,"show":[4,5,8,9,10,11,12,15,16,20,22,23,24,25,26,27,28,29],"show_point":[4,5,26,27],"show_tooltip":10,"shown":[5,9,12,16,23,25,27],"simpl":32,"simpli":32,"sina":[4,5,26,27],"singl":[3,4,5,7,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29,30,31,32],"size":[4,5,7,8,9,11,12,15,16,22,23,24,25,26,27,29,32],"smooth":7,"smoother":7,"solid":[],"sort":10,"sort_bi":10,"sort_ord":10,"space":[5,9,12,16,23,25,27,29],"spatial":7,"specif":[8,9,11,12,15,16,22,23,24,25],"specifi":[5,9,12,16,23,25,27,29],"speed":7,"split":[2,4,5,26,27],"squar":7,"step":31,"str":[3,4,5,6,7,8,9,10,11,12,14,15,16,17,19,21,22,23,24,25,26,27,28,29,32],"stretch":[5,9,12,16,23,25,27,29],"strict":32,"string":[7,32],"sub":[5,9,12,16,23,25,27,29],"subplot":[5,9,12,16,23,25,27,29],"supplotsspec":[5,9,12,16,18,21,23,25,27,29,32],"sure":32,"tabl":2,"text":[5,8,9,11,12,15,16,22,23,24,25,27],"therefor":32,"threshold":[7,10],"tick":[5,27],"tighter":7,"titl":[5,9,12,16,23,25,27,29],"toolbar":30,"tooltip":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,28,29,30],"top":[5,9,12,16,23,25,27,29,30,32],"total":32,"total_count":[4,5,26,27],"transpar":[4,5,8,9,11,12,15,16,22,23,24,25,26,27],"treat":[5,9,12,16,23,25,27,29],"trim":27,"true":[4,5,8,9,10,11,12,15,16,22,23,24,25,26,27,29],"truncat":7,"tsne":[8,9,11,12],"tupl":[5,8,9,11,12,15,16,22,23,24,25,27],"two":32,"twodash":[],"type":[1,4,5,26,27,31,32],"typealiasforwardref":[],"typeerror":[18,21],"umap":[8,9,11,12,32],"umap1":[8,9,11,12,15,16,22,23,24,25],"umap2":[8,9,11,12,15,16,22,23,24,25],"unnecessari":[31,32],"upper":[5,9,12,16,23,25,27,29],"usag":31,"use":[4,5,7,8,9,10,11,12,15,16,18,22,23,24,25,26,27,28,29,30,31,32],"use_key":[8,9,11,12,15,16,22,23,24,25],"user":32,"util":18,"valu":[4,5,7,8,9,10,11,12,15,16,22,23,24,25,26,27,29],"value_column":[4,5,26,27],"value_nam":10,"variabl":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"variable_column":[4,5,26,27],"variable_key":[3,6,8,9,11,12,14,15,16,17,19,22,23,24,25],"variables_nam":[3,4,5,6,10,14,17,19,26,27,28,29],"version":32,"vertic":[5,9,12,16,23,25,27,29],"violin":32,"visual":[5,9,12,16,23,25,27,29,32],"vln":32,"vs":32,"vspace":[5,9,12,16,23,25,27,29],"want":32,"weight":[8,9,11,12,15,16,22,23,24,25],"whether":[3,4,5,6,8,9,10,11,12,14,15,16,17,19,22,23,24,25,26,27,28,29],"width":[5,9,12,16,17,23,25,27,29,32],"will":[3,6,7,8,9,11,12,14,15,16,17,19,22,23,24,25,28,29],"without":17,"word":32,"workflow":32,"wrangl":17,"write":32,"x":[5,7,8,9,11,12,15,16,17,22,23,24,25,27,28,29],"x_pca_2d":[8,9,11,12,15,16,22,23,24,25],"x_umap1":7,"x_umap2":7,"x_umap_2d":[8,9,11,12,15,16,22,23,24,25],"xy":[8,9,11,12,15,16,22,23,24,25],"y":[5,7,8,9,11,12,15,16,17,22,23,24,25,27,28,29],"yet":32,"zen":32,"zoom":30},"titles":["API Reference","","","cellestial.bar","cellestial.boxplot","cellestial.boxplots","cellestial.build_frame","cellestial.cluster_outlines","cellestial.dimensional","cellestial.dimensionals","cellestial.dotplot","cellestial.expression","cellestial.expressions","cellestial.get_mapping","cellestial.heatmap","cellestial.pca","cellestial.pcas","cellestial.plot","cellestial.retrieve","cellestial.scatter","cellestial.show_colors","cellestial.slice","cellestial.tsne","cellestial.tsnes","cellestial.umap","cellestial.umaps","cellestial.violin","cellestial.violins","cellestial.xyplot","cellestial.xyplots","Cellestial","Performance & Scalability","Design Philosophy"],"titleterms":{"100k":31,"About":30,"abstract":32,"api":0,"bar":3,"base":0,"basic":0,"boxplot":[4,5],"build_fram":6,"cell":31,"cellesti":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"cluster_outlin":7,"common":0,"content":30,"data":0,"design":32,"dimension":[0,8,9],"distribut":0,"dotplot":10,"exampl":[30,31],"explicit":32,"express":[11,12,32],"flexibl":32,"frame":0,"get_map":13,"heatmap":14,"implicit":32,"instal":30,"layer":0,"let":30,"modular":32,"pca":15,"pcas":16,"perform":31,"philosophi":32,"plot":[17,30],"predict":32,"reduct":0,"refer":0,"retriev":18,"scalabl":31,"scatter":19,"show_color":20,"simplic":32,"slice":21,"special":0,"tsne":22,"tsnes":23,"umap":[24,25],"util":0,"violin":[26,27],"xyplot":[28,29]}}) \ No newline at end of file diff --git a/docs/_build/_images/breast_cancer_atlas_umap.png b/docs/_images/breast_cancer_atlas_umap.png similarity index 100% rename from docs/_build/_images/breast_cancer_atlas_umap.png rename to docs/_images/breast_cancer_atlas_umap.png diff --git a/docs/_build/_sources/API.rst.txt b/docs/_sources/API.rst.txt similarity index 100% rename from docs/_build/_sources/API.rst.txt rename to docs/_sources/API.rst.txt diff --git a/docs/_build/_sources/_templates/autoapi/python/module.rst.txt b/docs/_sources/_templates/autoapi/python/module.rst.txt similarity index 100% rename from docs/_build/_sources/_templates/autoapi/python/module.rst.txt rename to docs/_sources/_templates/autoapi/python/module.rst.txt diff --git a/docs/_build/_sources/_templates/autosummary/table.rst.txt b/docs/_sources/_templates/autosummary/table.rst.txt similarity index 100% rename from docs/_build/_sources/_templates/autosummary/table.rst.txt rename to docs/_sources/_templates/autosummary/table.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.bar.rst.txt b/docs/_sources/generated/cellestial.bar.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.bar.rst.txt rename to docs/_sources/generated/cellestial.bar.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.boxplot.rst.txt b/docs/_sources/generated/cellestial.boxplot.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.boxplot.rst.txt rename to docs/_sources/generated/cellestial.boxplot.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.boxplots.rst.txt b/docs/_sources/generated/cellestial.boxplots.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.boxplots.rst.txt rename to docs/_sources/generated/cellestial.boxplots.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.build_frame.rst.txt b/docs/_sources/generated/cellestial.build_frame.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.build_frame.rst.txt rename to docs/_sources/generated/cellestial.build_frame.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.cluster_outlines.rst.txt b/docs/_sources/generated/cellestial.cluster_outlines.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.cluster_outlines.rst.txt rename to docs/_sources/generated/cellestial.cluster_outlines.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.dimensional.rst.txt b/docs/_sources/generated/cellestial.dimensional.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.dimensional.rst.txt rename to docs/_sources/generated/cellestial.dimensional.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.dimensionals.rst.txt b/docs/_sources/generated/cellestial.dimensionals.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.dimensionals.rst.txt rename to docs/_sources/generated/cellestial.dimensionals.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.dotplot.rst.txt b/docs/_sources/generated/cellestial.dotplot.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.dotplot.rst.txt rename to docs/_sources/generated/cellestial.dotplot.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.expression.rst.txt b/docs/_sources/generated/cellestial.expression.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.expression.rst.txt rename to docs/_sources/generated/cellestial.expression.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.expressions.rst.txt b/docs/_sources/generated/cellestial.expressions.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.expressions.rst.txt rename to docs/_sources/generated/cellestial.expressions.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.get_mapping.rst.txt b/docs/_sources/generated/cellestial.get_mapping.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.get_mapping.rst.txt rename to docs/_sources/generated/cellestial.get_mapping.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.heatmap.rst.txt b/docs/_sources/generated/cellestial.heatmap.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.heatmap.rst.txt rename to docs/_sources/generated/cellestial.heatmap.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.pca.rst.txt b/docs/_sources/generated/cellestial.pca.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.pca.rst.txt rename to docs/_sources/generated/cellestial.pca.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.pcas.rst.txt b/docs/_sources/generated/cellestial.pcas.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.pcas.rst.txt rename to docs/_sources/generated/cellestial.pcas.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.plot.rst.txt b/docs/_sources/generated/cellestial.plot.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.plot.rst.txt rename to docs/_sources/generated/cellestial.plot.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.retrieve.rst.txt b/docs/_sources/generated/cellestial.retrieve.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.retrieve.rst.txt rename to docs/_sources/generated/cellestial.retrieve.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.scatter.rst.txt b/docs/_sources/generated/cellestial.scatter.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.scatter.rst.txt rename to docs/_sources/generated/cellestial.scatter.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.show_colors.rst.txt b/docs/_sources/generated/cellestial.show_colors.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.show_colors.rst.txt rename to docs/_sources/generated/cellestial.show_colors.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.slice.rst.txt b/docs/_sources/generated/cellestial.slice.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.slice.rst.txt rename to docs/_sources/generated/cellestial.slice.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.tsne.rst.txt b/docs/_sources/generated/cellestial.tsne.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.tsne.rst.txt rename to docs/_sources/generated/cellestial.tsne.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.tsnes.rst.txt b/docs/_sources/generated/cellestial.tsnes.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.tsnes.rst.txt rename to docs/_sources/generated/cellestial.tsnes.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.umap.rst.txt b/docs/_sources/generated/cellestial.umap.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.umap.rst.txt rename to docs/_sources/generated/cellestial.umap.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.umaps.rst.txt b/docs/_sources/generated/cellestial.umaps.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.umaps.rst.txt rename to docs/_sources/generated/cellestial.umaps.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.violin.rst.txt b/docs/_sources/generated/cellestial.violin.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.violin.rst.txt rename to docs/_sources/generated/cellestial.violin.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.violins.rst.txt b/docs/_sources/generated/cellestial.violins.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.violins.rst.txt rename to docs/_sources/generated/cellestial.violins.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.xyplot.rst.txt b/docs/_sources/generated/cellestial.xyplot.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.xyplot.rst.txt rename to docs/_sources/generated/cellestial.xyplot.rst.txt diff --git a/docs/_build/_sources/generated/cellestial.xyplots.rst.txt b/docs/_sources/generated/cellestial.xyplots.rst.txt similarity index 100% rename from docs/_build/_sources/generated/cellestial.xyplots.rst.txt rename to docs/_sources/generated/cellestial.xyplots.rst.txt diff --git a/docs/_build/_sources/index.rst.txt b/docs/_sources/index.rst.txt similarity index 100% rename from docs/_build/_sources/index.rst.txt rename to docs/_sources/index.rst.txt diff --git a/docs/_build/_sources/performance.rst.txt b/docs/_sources/performance.rst.txt similarity index 100% rename from docs/_build/_sources/performance.rst.txt rename to docs/_sources/performance.rst.txt diff --git a/docs/_build/_sources/philosophy.rst.txt b/docs/_sources/philosophy.rst.txt similarity index 100% rename from docs/_build/_sources/philosophy.rst.txt rename to docs/_sources/philosophy.rst.txt diff --git a/docs/_build/_static/base-stemmer.js b/docs/_static/base-stemmer.js similarity index 100% rename from docs/_build/_static/base-stemmer.js rename to docs/_static/base-stemmer.js diff --git a/docs/_build/_static/basic.css b/docs/_static/basic.css similarity index 100% rename from docs/_build/_static/basic.css rename to docs/_static/basic.css diff --git a/docs/_build/_static/doctools.js b/docs/_static/doctools.js similarity index 100% rename from docs/_build/_static/doctools.js rename to docs/_static/doctools.js diff --git a/docs/_build/_static/documentation_options.js b/docs/_static/documentation_options.js similarity index 100% rename from docs/_build/_static/documentation_options.js rename to docs/_static/documentation_options.js diff --git a/docs/_build/_static/english-stemmer.js b/docs/_static/english-stemmer.js similarity index 100% rename from docs/_build/_static/english-stemmer.js rename to docs/_static/english-stemmer.js diff --git a/docs/_build/_static/file.png b/docs/_static/file.png similarity index 100% rename from docs/_build/_static/file.png rename to docs/_static/file.png diff --git a/docs/_build/_static/jupyter-sphinx.css b/docs/_static/jupyter-sphinx.css similarity index 100% rename from docs/_build/_static/jupyter-sphinx.css rename to docs/_static/jupyter-sphinx.css diff --git a/docs/_build/_static/language_data.js b/docs/_static/language_data.js similarity index 100% rename from docs/_build/_static/language_data.js rename to docs/_static/language_data.js diff --git a/docs/_build/_static/minus.png b/docs/_static/minus.png similarity index 100% rename from docs/_build/_static/minus.png rename to docs/_static/minus.png diff --git a/docs/_build/_static/plus.png b/docs/_static/plus.png similarity index 100% rename from docs/_build/_static/plus.png rename to docs/_static/plus.png diff --git a/docs/_build/_static/pygments.css b/docs/_static/pygments.css similarity index 100% rename from docs/_build/_static/pygments.css rename to docs/_static/pygments.css diff --git a/docs/_build/_static/scripts/bootstrap.js b/docs/_static/scripts/bootstrap.js similarity index 100% rename from docs/_build/_static/scripts/bootstrap.js rename to docs/_static/scripts/bootstrap.js diff --git a/docs/_build/_static/scripts/bootstrap.js.LICENSE.txt b/docs/_static/scripts/bootstrap.js.LICENSE.txt similarity index 100% rename from docs/_build/_static/scripts/bootstrap.js.LICENSE.txt rename to docs/_static/scripts/bootstrap.js.LICENSE.txt diff --git a/docs/_build/_static/scripts/bootstrap.js.map b/docs/_static/scripts/bootstrap.js.map similarity index 100% rename from docs/_build/_static/scripts/bootstrap.js.map rename to docs/_static/scripts/bootstrap.js.map diff --git a/docs/_build/_static/scripts/fontawesome.js b/docs/_static/scripts/fontawesome.js similarity index 100% rename from docs/_build/_static/scripts/fontawesome.js rename to docs/_static/scripts/fontawesome.js diff --git a/docs/_build/_static/scripts/fontawesome.js.LICENSE.txt b/docs/_static/scripts/fontawesome.js.LICENSE.txt similarity index 100% rename from docs/_build/_static/scripts/fontawesome.js.LICENSE.txt rename to docs/_static/scripts/fontawesome.js.LICENSE.txt diff --git a/docs/_build/_static/scripts/fontawesome.js.map b/docs/_static/scripts/fontawesome.js.map similarity index 100% rename from docs/_build/_static/scripts/fontawesome.js.map rename to docs/_static/scripts/fontawesome.js.map diff --git a/docs/_build/_static/scripts/pydata-sphinx-theme.js b/docs/_static/scripts/pydata-sphinx-theme.js similarity index 100% rename from docs/_build/_static/scripts/pydata-sphinx-theme.js rename to docs/_static/scripts/pydata-sphinx-theme.js diff --git a/docs/_build/_static/scripts/pydata-sphinx-theme.js.map b/docs/_static/scripts/pydata-sphinx-theme.js.map similarity index 100% rename from docs/_build/_static/scripts/pydata-sphinx-theme.js.map rename to docs/_static/scripts/pydata-sphinx-theme.js.map diff --git a/docs/_build/_static/searchtools.js b/docs/_static/searchtools.js similarity index 100% rename from docs/_build/_static/searchtools.js rename to docs/_static/searchtools.js diff --git a/docs/_build/_static/sphinx_highlight.js b/docs/_static/sphinx_highlight.js similarity index 100% rename from docs/_build/_static/sphinx_highlight.js rename to docs/_static/sphinx_highlight.js diff --git a/docs/_build/_static/styles/pydata-sphinx-theme.css b/docs/_static/styles/pydata-sphinx-theme.css similarity index 100% rename from docs/_build/_static/styles/pydata-sphinx-theme.css rename to docs/_static/styles/pydata-sphinx-theme.css diff --git a/docs/_build/_static/styles/pydata-sphinx-theme.css.map b/docs/_static/styles/pydata-sphinx-theme.css.map similarity index 100% rename from docs/_build/_static/styles/pydata-sphinx-theme.css.map rename to docs/_static/styles/pydata-sphinx-theme.css.map diff --git a/docs/_build/_static/styles/theme.css b/docs/_static/styles/theme.css similarity index 100% rename from docs/_build/_static/styles/theme.css rename to docs/_static/styles/theme.css diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf b/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf rename to docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 b/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 rename to docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf b/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf rename to docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 b/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 rename to docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf b/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf rename to docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf diff --git a/docs/_build/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 b/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 similarity index 100% rename from docs/_build/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 rename to docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 diff --git a/docs/_build/_static/webpack-macros.html b/docs/_static/webpack-macros.html similarity index 100% rename from docs/_build/_static/webpack-macros.html rename to docs/_static/webpack-macros.html diff --git a/docs/_build/_templates/autoapi/python/module.html b/docs/_templates/autoapi/python/module.html similarity index 99% rename from docs/_build/_templates/autoapi/python/module.html rename to docs/_templates/autoapi/python/module.html index 99c7932..8f0ea04 100644 --- a/docs/_build/_templates/autoapi/python/module.html +++ b/docs/_templates/autoapi/python/module.html @@ -31,7 +31,7 @@ - + diff --git a/docs/_build/_templates/autosummary/table.html b/docs/_templates/autosummary/table.html similarity index 99% rename from docs/_build/_templates/autosummary/table.html rename to docs/_templates/autosummary/table.html index 2049bb6..c4113f3 100644 --- a/docs/_build/_templates/autosummary/table.html +++ b/docs/_templates/autosummary/table.html @@ -31,7 +31,7 @@ - + diff --git a/docs/_build/generated/cellestial.bar.html b/docs/generated/cellestial.bar.html similarity index 98% rename from docs/_build/generated/cellestial.bar.html rename to docs/generated/cellestial.bar.html index aef5856..f97a275 100644 --- a/docs/_build/generated/cellestial.bar.html +++ b/docs/generated/cellestial.bar.html @@ -31,7 +31,7 @@ - + @@ -424,7 +424,7 @@

cellestial.bar
-
+
-
+
-
+
-
+
-
+
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from lets_plot import *\n", + "LetsPlot.setup_html()\n", + "\n", + "import cellestial as cl\n", + "import scanpy as sc\n", + "\n", + "data = sc.read_h5ad('data/pbmc3k_pped.h5ad')\n", + "\n", + "p1 = (\n", + " cl.bar(data, mapping=aes('leiden', fill='predicted_doublet'))\n", + " + scale_fill_brewer(palette='Set2', direction=-1)\n", + ")\n", + "p1" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "fbe932ed", + "metadata": { + "execution": { + "iopub.execute_input": "2026-03-05T10:19:44.278907Z", + "iopub.status.busy": "2026-03-05T10:19:44.278767Z", + "iopub.status.idle": "2026-03-05T10:19:44.578700Z", + "shell.execute_reply": "2026-03-05T10:19:44.578306Z" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from lets_plot import *\n", + "LetsPlot.setup_html()\n", + "\n", + "import cellestial as cl\n", + "import scanpy as sc\n", + "\n", + "data = sc.read_h5ad('data/pbmc3k_pped.h5ad')\n", + "\n", + "p2 = (\n", + " cl.bar(data, mapping=aes('cell_type_lvl1', fill='leiden'))\n", + " + scale_fill_brewer(palette='Set2')\n", + ")\n", + "p2" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.14.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/docs/jupyter_execute/generated/cellestial.bar.py b/jupyter_execute/generated/cellestial.bar.py similarity index 100% rename from docs/jupyter_execute/generated/cellestial.bar.py rename to jupyter_execute/generated/cellestial.bar.py diff --git a/jupyter_execute/generated/cellestial.plot.ipynb b/jupyter_execute/generated/cellestial.plot.ipynb new file mode 100644 index 0000000..4dad547 --- /dev/null +++ b/jupyter_execute/generated/cellestial.plot.ipynb @@ -0,0 +1,574 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "f729552c", + "metadata": { + "execution": { + "iopub.execute_input": "2026-03-05T10:19:45.917850Z", + "iopub.status.busy": "2026-03-05T10:19:45.917602Z", + "iopub.status.idle": "2026-03-05T10:19:47.153791Z", + "shell.execute_reply": "2026-03-05T10:19:47.153433Z" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from lets_plot import *\n", + "LetsPlot.setup_html()\n", + "\n", + "import cellestial as cl\n", + "import scanpy as sc\n", + "\n", + "data = sc.read_h5ad('data/pbmc3k_pped.h5ad')\n", + "\n", + "p1 = (\n", + " cl.plot(data, aes(x='cell_type_lvl1', y='n_genes'))\n", + ")\n", + "p1 # plot object without layers" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "be37152f", + "metadata": { + "execution": { + "iopub.execute_input": "2026-03-05T10:19:47.154934Z", + "iopub.status.busy": "2026-03-05T10:19:47.154791Z", + "iopub.status.idle": "2026-03-05T10:19:47.613438Z", + "shell.execute_reply": "2026-03-05T10:19:47.613109Z" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from lets_plot import *\n", + "LetsPlot.setup_html()\n", + "\n", + "import cellestial as cl\n", + "import scanpy as sc\n", + "\n", + "data = sc.read_h5ad('data/pbmc3k_pped.h5ad')\n", + "\n", + "p2 = (\n", + " cl.plot(data, aes(x='cell_type_lvl1', y='n_genes'))\n", + " + geom_violin(aes(fill='cell_type_lvl1'), scale='width')\n", + " + geom_boxplot(width=0.2,outlier_size=0)\n", + " + scale_fill_viridis()\n", + ")\n", + "p2" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.14.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/docs/jupyter_execute/generated/cellestial.plot.py b/jupyter_execute/generated/cellestial.plot.py similarity index 100% rename from docs/jupyter_execute/generated/cellestial.plot.py rename to jupyter_execute/generated/cellestial.plot.py diff --git a/docs/API.rst b/sphinx/API.rst similarity index 100% rename from docs/API.rst rename to sphinx/API.rst diff --git a/docs/_build/_static/breast_cancer_atlas_umap.png b/sphinx/_static/breast_cancer_atlas_umap.png similarity index 100% rename from docs/_build/_static/breast_cancer_atlas_umap.png rename to sphinx/_static/breast_cancer_atlas_umap.png diff --git a/docs/_build/_static/custom.css b/sphinx/_static/custom.css similarity index 100% rename from docs/_build/_static/custom.css rename to sphinx/_static/custom.css diff --git a/docs/_build/_static/custom.js b/sphinx/_static/custom.js similarity index 100% rename from docs/_build/_static/custom.js rename to sphinx/_static/custom.js diff --git a/docs/_build/_static/overall.ggtb.html b/sphinx/_static/overall.ggtb.html similarity index 100% rename from docs/_build/_static/overall.ggtb.html rename to sphinx/_static/overall.ggtb.html diff --git a/docs/_build/_static/pypi.svg b/sphinx/_static/pypi.svg similarity index 100% rename from docs/_build/_static/pypi.svg rename to sphinx/_static/pypi.svg diff --git a/docs/_templates/autoapi/python/module.rst b/sphinx/_templates/autoapi/python/module.rst similarity index 100% rename from docs/_templates/autoapi/python/module.rst rename to sphinx/_templates/autoapi/python/module.rst diff --git a/docs/_templates/autosummary/table.rst b/sphinx/_templates/autosummary/table.rst similarity index 100% rename from docs/_templates/autosummary/table.rst rename to sphinx/_templates/autosummary/table.rst diff --git a/docs/conf.py b/sphinx/conf.py similarity index 100% rename from docs/conf.py rename to sphinx/conf.py diff --git a/docs/generated/cellestial.bar.rst b/sphinx/generated/cellestial.bar.rst similarity index 100% rename from docs/generated/cellestial.bar.rst rename to sphinx/generated/cellestial.bar.rst diff --git a/docs/generated/cellestial.boxplot.rst b/sphinx/generated/cellestial.boxplot.rst similarity index 100% rename from docs/generated/cellestial.boxplot.rst rename to sphinx/generated/cellestial.boxplot.rst diff --git a/docs/generated/cellestial.boxplots.rst b/sphinx/generated/cellestial.boxplots.rst similarity index 100% rename from docs/generated/cellestial.boxplots.rst rename to sphinx/generated/cellestial.boxplots.rst diff --git a/docs/generated/cellestial.build_frame.rst b/sphinx/generated/cellestial.build_frame.rst similarity index 100% rename from docs/generated/cellestial.build_frame.rst rename to sphinx/generated/cellestial.build_frame.rst diff --git a/docs/generated/cellestial.cluster_outlines.rst b/sphinx/generated/cellestial.cluster_outlines.rst similarity index 100% rename from docs/generated/cellestial.cluster_outlines.rst rename to sphinx/generated/cellestial.cluster_outlines.rst diff --git a/docs/generated/cellestial.dimensional.rst b/sphinx/generated/cellestial.dimensional.rst similarity index 100% rename from docs/generated/cellestial.dimensional.rst rename to sphinx/generated/cellestial.dimensional.rst diff --git a/docs/generated/cellestial.dimensionals.rst b/sphinx/generated/cellestial.dimensionals.rst similarity index 100% rename from docs/generated/cellestial.dimensionals.rst rename to sphinx/generated/cellestial.dimensionals.rst diff --git a/docs/generated/cellestial.dotplot.rst b/sphinx/generated/cellestial.dotplot.rst similarity index 100% rename from docs/generated/cellestial.dotplot.rst rename to sphinx/generated/cellestial.dotplot.rst diff --git a/docs/generated/cellestial.expression.rst b/sphinx/generated/cellestial.expression.rst similarity index 100% rename from docs/generated/cellestial.expression.rst rename to sphinx/generated/cellestial.expression.rst diff --git a/docs/generated/cellestial.expressions.rst b/sphinx/generated/cellestial.expressions.rst similarity index 100% rename from docs/generated/cellestial.expressions.rst rename to sphinx/generated/cellestial.expressions.rst diff --git a/docs/generated/cellestial.get_mapping.rst b/sphinx/generated/cellestial.get_mapping.rst similarity index 100% rename from docs/generated/cellestial.get_mapping.rst rename to sphinx/generated/cellestial.get_mapping.rst diff --git a/docs/generated/cellestial.heatmap.rst b/sphinx/generated/cellestial.heatmap.rst similarity index 100% rename from docs/generated/cellestial.heatmap.rst rename to sphinx/generated/cellestial.heatmap.rst diff --git a/docs/generated/cellestial.pca.rst b/sphinx/generated/cellestial.pca.rst similarity index 100% rename from docs/generated/cellestial.pca.rst rename to sphinx/generated/cellestial.pca.rst diff --git a/docs/generated/cellestial.pcas.rst b/sphinx/generated/cellestial.pcas.rst similarity index 100% rename from docs/generated/cellestial.pcas.rst rename to sphinx/generated/cellestial.pcas.rst diff --git a/docs/generated/cellestial.plot.rst b/sphinx/generated/cellestial.plot.rst similarity index 100% rename from docs/generated/cellestial.plot.rst rename to sphinx/generated/cellestial.plot.rst diff --git a/docs/generated/cellestial.retrieve.rst b/sphinx/generated/cellestial.retrieve.rst similarity index 100% rename from docs/generated/cellestial.retrieve.rst rename to sphinx/generated/cellestial.retrieve.rst diff --git a/docs/generated/cellestial.scatter.rst b/sphinx/generated/cellestial.scatter.rst similarity index 100% rename from docs/generated/cellestial.scatter.rst rename to sphinx/generated/cellestial.scatter.rst diff --git a/docs/generated/cellestial.show_colors.rst b/sphinx/generated/cellestial.show_colors.rst similarity index 100% rename from docs/generated/cellestial.show_colors.rst rename to sphinx/generated/cellestial.show_colors.rst diff --git a/docs/generated/cellestial.slice.rst b/sphinx/generated/cellestial.slice.rst similarity index 100% rename from docs/generated/cellestial.slice.rst rename to sphinx/generated/cellestial.slice.rst diff --git a/docs/generated/cellestial.tsne.rst b/sphinx/generated/cellestial.tsne.rst similarity index 100% rename from docs/generated/cellestial.tsne.rst rename to sphinx/generated/cellestial.tsne.rst diff --git a/docs/generated/cellestial.tsnes.rst b/sphinx/generated/cellestial.tsnes.rst similarity index 100% rename from docs/generated/cellestial.tsnes.rst rename to sphinx/generated/cellestial.tsnes.rst diff --git a/docs/generated/cellestial.umap.rst b/sphinx/generated/cellestial.umap.rst similarity index 100% rename from docs/generated/cellestial.umap.rst rename to sphinx/generated/cellestial.umap.rst diff --git a/docs/generated/cellestial.umaps.rst b/sphinx/generated/cellestial.umaps.rst similarity index 100% rename from docs/generated/cellestial.umaps.rst rename to sphinx/generated/cellestial.umaps.rst diff --git a/docs/generated/cellestial.violin.rst b/sphinx/generated/cellestial.violin.rst similarity index 100% rename from docs/generated/cellestial.violin.rst rename to sphinx/generated/cellestial.violin.rst diff --git a/docs/generated/cellestial.violins.rst b/sphinx/generated/cellestial.violins.rst similarity index 100% rename from docs/generated/cellestial.violins.rst rename to sphinx/generated/cellestial.violins.rst diff --git a/docs/generated/cellestial.xyplot.rst b/sphinx/generated/cellestial.xyplot.rst similarity index 100% rename from docs/generated/cellestial.xyplot.rst rename to sphinx/generated/cellestial.xyplot.rst diff --git a/docs/generated/cellestial.xyplots.rst b/sphinx/generated/cellestial.xyplots.rst similarity index 100% rename from docs/generated/cellestial.xyplots.rst rename to sphinx/generated/cellestial.xyplots.rst diff --git a/docs/index.rst b/sphinx/index.rst similarity index 100% rename from docs/index.rst rename to sphinx/index.rst diff --git a/docs/jupyter_execute/generated/bar.ipynb b/sphinx/jupyter_execute/generated/bar.ipynb similarity index 100% rename from docs/jupyter_execute/generated/bar.ipynb rename to sphinx/jupyter_execute/generated/bar.ipynb diff --git a/docs/jupyter_execute/generated/bar.py b/sphinx/jupyter_execute/generated/bar.py similarity index 100% rename from docs/jupyter_execute/generated/bar.py rename to sphinx/jupyter_execute/generated/bar.py diff --git a/docs/jupyter_execute/generated/cellestial.bar.ipynb b/sphinx/jupyter_execute/generated/cellestial.bar.ipynb similarity index 100% rename from docs/jupyter_execute/generated/cellestial.bar.ipynb rename to sphinx/jupyter_execute/generated/cellestial.bar.ipynb diff --git a/sphinx/jupyter_execute/generated/cellestial.bar.py b/sphinx/jupyter_execute/generated/cellestial.bar.py new file mode 100644 index 0000000..c6f9a41 --- /dev/null +++ b/sphinx/jupyter_execute/generated/cellestial.bar.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[1]: + + +from lets_plot import * +LetsPlot.setup_html() + +import cellestial as cl +import scanpy as sc + +data = sc.read_h5ad('data/pbmc3k_pped.h5ad') + +p1 = ( + cl.bar(data, mapping=aes('leiden', fill='predicted_doublet')) + + scale_fill_brewer(palette='Set2', direction=-1) +) +p1 + + +# In[2]: + + +from lets_plot import * +LetsPlot.setup_html() + +import cellestial as cl +import scanpy as sc + +data = sc.read_h5ad('data/pbmc3k_pped.h5ad') + +p2 = ( + cl.bar(data, mapping=aes('cell_type_lvl1', fill='leiden')) + + scale_fill_brewer(palette='Set2') +) +p2 + diff --git a/docs/jupyter_execute/generated/cellestial.plot.ipynb b/sphinx/jupyter_execute/generated/cellestial.plot.ipynb similarity index 100% rename from docs/jupyter_execute/generated/cellestial.plot.ipynb rename to sphinx/jupyter_execute/generated/cellestial.plot.ipynb diff --git a/sphinx/jupyter_execute/generated/cellestial.plot.py b/sphinx/jupyter_execute/generated/cellestial.plot.py new file mode 100644 index 0000000..ca0c759 --- /dev/null +++ b/sphinx/jupyter_execute/generated/cellestial.plot.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[1]: + + +from lets_plot import * +LetsPlot.setup_html() + +import cellestial as cl +import scanpy as sc + +data = sc.read_h5ad('data/pbmc3k_pped.h5ad') + +p1 = ( + cl.plot(data, aes(x='cell_type_lvl1', y='n_genes')) +) +p1 # plot object without layers + + +# In[2]: + + +from lets_plot import * +LetsPlot.setup_html() + +import cellestial as cl +import scanpy as sc + +data = sc.read_h5ad('data/pbmc3k_pped.h5ad') + +p2 = ( + cl.plot(data, aes(x='cell_type_lvl1', y='n_genes')) + + geom_violin(aes(fill='cell_type_lvl1'), scale='width') + + geom_boxplot(width=0.2,outlier_size=0) + + scale_fill_viridis() +) +p2 + diff --git a/docs/jupyter_execute/generated/cellestial.single.basic.bar.bar.ipynb b/sphinx/jupyter_execute/generated/cellestial.single.basic.bar.bar.ipynb similarity index 100% rename from docs/jupyter_execute/generated/cellestial.single.basic.bar.bar.ipynb rename to sphinx/jupyter_execute/generated/cellestial.single.basic.bar.bar.ipynb diff --git a/docs/jupyter_execute/generated/cellestial.single.basic.bar.bar.py b/sphinx/jupyter_execute/generated/cellestial.single.basic.bar.bar.py similarity index 100% rename from docs/jupyter_execute/generated/cellestial.single.basic.bar.bar.py rename to sphinx/jupyter_execute/generated/cellestial.single.basic.bar.bar.py diff --git a/docs/jupyter_execute/generated/plot.ipynb b/sphinx/jupyter_execute/generated/plot.ipynb similarity index 100% rename from docs/jupyter_execute/generated/plot.ipynb rename to sphinx/jupyter_execute/generated/plot.ipynb diff --git a/docs/jupyter_execute/generated/plot.py b/sphinx/jupyter_execute/generated/plot.py similarity index 100% rename from docs/jupyter_execute/generated/plot.py rename to sphinx/jupyter_execute/generated/plot.py diff --git a/docs/performance.rst b/sphinx/performance.rst similarity index 100% rename from docs/performance.rst rename to sphinx/performance.rst diff --git a/docs/philosophy.rst b/sphinx/philosophy.rst similarity index 100% rename from docs/philosophy.rst rename to sphinx/philosophy.rst diff --git a/docs/requirements.txt b/sphinx/requirements.txt similarity index 100% rename from docs/requirements.txt rename to sphinx/requirements.txt