Developing Heart Atlas - comprehensive cardiac development analysis with spatial multi-omics integration
Comprehensive assistance with developing-heart-local-improved development, generated from official documentation.
This skill should be triggered when:
Pattern 1: In [13]: ?sc.pl.embedding Signature: sc.pl.embedding( adata: anndata._core.anndata.AnnData, basis: str, *, color: Union[str, Sequence[str], NoneType] = None, gene_symbols: Union[str, NoneType] = None, use_raw: Union[bool, NoneType] = None, sort_order: bool = True, edges: bool = False, edges_width: float = 0.1, edges_color: Union[str, Sequence[float], Sequence[str]] = 'grey', neighbors_key: Union[str, NoneType] = None, arrows: bool = False, arrows_kwds: Union[Mapping[str, Any], NoneType] = None, groups: Union[str, NoneType] = None, components: Union[str, Sequence[str]] = None, dimensions: Union[Tuple[int, int], Sequence[Tuple[int, int]], NoneType] = None, layer: Union[str, NoneType] = None, projection: Literal['2d', '3d'] = '2d', scale_factor: Union[float, NoneType] = None, color_map: Union[matplotlib.colors.Colormap, str, NoneType] = None, cmap: Union[matplotlib.colors.Colormap, str, NoneType] = None, palette: Union[str, Sequence[str], cycler.Cycler, NoneType] = None, na_color: Union[str, Tuple[float, ...]] = 'lightgray', na_in_legend: bool = True, size: Union[float, Sequence[float], NoneType] = None, frameon: Union[bool, NoneType] = None, legend_fontsize: Union[int, float, Literal['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'], NoneType] = None, legend_fontweight: Union[int, Literal['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']] = 'bold', legend_loc: str = 'right margin', legend_fontoutline: Union[int, NoneType] = None, colorbar_loc: Union[str, NoneType] = 'right', vmax: Union[str, float, Callable[[Sequence[float]], float], Sequence[Union[str, float, Callable[[Sequence[float]], float]]], NoneType] = None, vmin: Union[str, float, Callable[[Sequence[float]], float], Sequence[Union[str, float, Callable[[Sequence[float]], float]]], NoneType] = None, vcenter: Union[str, float, Callable[[Sequence[float]], float], Sequence[Union[str, float, Callable[[Sequence[float]], float]]], NoneType] = None, norm: Union[matplotlib.colors.Normalize, Sequence[matplotlib.colors.Normalize], NoneType] = None, add_outline: Union[bool, NoneType] = False, outline_width: Tuple[float, float] = (0.3, 0.05), outline_color: Tuple[str, str] = ('black', 'white'), ncols: int = 4, hspace: float = 0.25, wspace: Union[float, NoneType] = None, title: Union[str, Sequence[str], NoneType] = None, show: Union[bool, NoneType] = None, save: Union[bool, str, NoneType] = None, ax: Union[matplotlib.axes._axes.Axes, NoneType] = None, return_fig: Union[bool, NoneType] = None, **kwargs, ) -> Union[matplotlib.figure.Figure, matplotlib.axes._axes.Axes, NoneType] Docstring: Scatter plot for user specified embedding basis (e.g. umap, pca, etc) Parameters ---------- basis : str Name of the basis to use. adata : AnnData Annotated data matrix. color : typing.Union[str, typing.Sequence[str], NoneType], optional (default: None) Keys for annotations of observations/cells or variables/genes, e.g., or . gene_symbols : typing.Union[str, NoneType], optional (default: None) Column name in DataFrame that stores gene symbols. By default refer to the index column of the DataFrame. Setting this option allows alternative names to be used. use_raw : typing.Union[bool, NoneType], optional (default: None) Use attribute of for coloring with gene expression. If , defaults to if isn't provided and is present. layer : typing.Union[str, NoneType], optional (default: None) Name of the AnnData object layer that wants to be plotted. By default adata.raw.X is plotted. If is set, then is plotted. If is set to a valid layer name, then the layer is plotted. takes precedence over . edges : bool, optional (default: False) Show edges. edges_width : float, optional (default: 0.1) Width of edges. edges_color : typing.Union[str, typing.Sequence[float], typing.Sequence[str]], optional (default: 'grey') Color of edges. See :func:. neighbors_key : typing.Union[str, NoneType], optional (default: None) Where to look for neighbors connectivities. If not specified, this looks .obsp['connectivities'] for connectivities (default storage place for pp.neighbors). If specified, this looks .obsp[.uns[neighbors_key]['connectivities_key']] for connectivities. arrows : bool, optional (default: False) Show arrows (deprecated in favour of ). arrows_kwds : typing.Union[typing.Mapping[str, typing.Any], NoneType], optional (default: None) Passed to :meth: sort_order : bool, optional (default: True) For continuous annotations used as color parameter, plot data points with higher values on top of others. groups : typing.Union[str, NoneType], optional (default: None) Restrict to a few categories in categorical observation annotation. The default is not to restrict to any groups. dimensions : typing.Union[typing.Tuple[int, int], typing.Sequence[typing.Tuple[int, int]], NoneType], optional (default: None) 0-indexed dimensions of the embedding to plot as integers. E.g. [(0, 1), (1, 2)]. Unlike , this argument is used in the same way as , e.g. is used to specify a single plot at a time. Will eventually replace the components argument. components : typing.Union[str, typing.Sequence[str]], optional (default: None) For instance, . To plot all available components use . projection : typing.Literal['2d', '3d'], optional (default: '2d') Projection of plot (default: ). legend_loc : str, optional (default: 'right margin') Location of legend, either , or a valid keyword for the parameter of :class:. legend_fontsize : typing.Union[int, float, typing.Literal['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'], NoneType], optional (default: None) Numeric size in pt or string describing the size. See :meth:. legend_fontweight : typing.Union[int, typing.Literal['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']], optional (default: 'bold') Legend font weight. A numeric value in range 0-1000 or a string. Defaults to if , otherwise to . See :meth:. legend_fontoutline : typing.Union[int, NoneType], optional (default: None) Line width of the legend font outline in pt. Draws a white outline using the path effect :class:. colorbar_loc : typing.Union[str, NoneType], optional (default: 'right') Where to place the colorbar for continous variables. If , no colorbar is added. size : typing.Union[float, typing.Sequence[float], NoneType], optional (default: None) Point size. If , is automatically computed as 120000 / n_cells. Can be a sequence containing the size for each cell. The order should be the same as in adata.obs. color_map : typing.Union[matplotlib.colors.Colormap, str, NoneType], optional (default: None) Color map to use for continous variables. Can be a name or a :class: instance (e.g. ", or ), see :func:. If , the value of is used. The default can be set using :func:. palette : typing.Union[str, typing.Sequence[str], cycler.Cycler, NoneType], optional (default: None) Colors to use for plotting categorical annotation groups. The palette can be a valid :class: name (, , …), a :class: object, a dict mapping categories to colors, or a sequence of colors. Colors must be valid to matplotlib. (see :func:). If , is used unless the categorical variable already has colors stored in . If provided, values of will be set. na_color : typing.Union[str, typing.Tuple[float, ...]], optional (default: 'lightgray') Color to use for null or masked values. Can be anything matplotlib accepts as a color. Used for all points if . na_in_legend : bool, optional (default: True) If there are missing values, whether they get an entry in the legend. Currently only implemented for categorical legends. frameon : typing.Union[bool, NoneType], optional (default: None) Draw a frame around the scatter plot. Defaults to value set in :func:, defaults to . title : typing.Union[str, typing.Sequence[str], NoneType], optional (default: None) Provide title for panels either as string or list of strings, e.g. . vmin : typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float], typing.Sequence[typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float]]], NoneType], optional (default: None) The value representing the lower limit of the color scale. Values smaller than vmin are plotted with the same color as vmin. vmin can be a number, a string, a function or . If vmin is a string and has the format , this is interpreted as a vmin=percentile(N). For example vmin='p1.5' is interpreted as the 1.5 percentile. If vmin is function, then vmin is interpreted as the return value of the function over the list of values to plot. For example to set vmin tp the mean of the values to plot, and then set . If vmin is None (default) an automatic minimum value is used as defined by matplotlib function. When making multiple plots, vmin can be a list of values, one for each plot. For example vmax : typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float], typing.Sequence[typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float]]], NoneType], optional (default: None) The value representing the upper limit of the color scale. The format is the same as for . vcenter : typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float], typing.Sequence[typing.Union[str, float, typing.Callable[[typing.Sequence[float]], float]]], NoneType], optional (default: None) The value representing the center of the color scale. Useful for diverging colormaps. The format is the same as for . Example: sc.pl.umap(adata, color='TREM2', vcenter='p50', cmap='RdBu_r') add_outline : typing.Union[bool, NoneType], optional (default: False) If set to True, this will add a thin border around groups of dots. In some situations this can enhance the aesthetics of the resulting image outline_color : typing.Tuple[str, str], optional (default: ('black', 'white')) Tuple with two valid color names used to adjust the add_outline. The first color is the border color (default: black), while the second color is a gap color between the border color and the scatter dot (default: white). outline_width : typing.Tuple[float, float], optional (default: (0.3, 0.05)) Tuple with two width numbers used to adjust the outline. The first value is the width of the border color as a fraction of the scatter dot size (default: 0.3). The second value is width of the gap color (default: 0.05). ncols : int, optional (default: 4) Number of panels per row. wspace : typing.Union[float, NoneType], optional (default: None) Adjust the width of the space between multiple panels. hspace : float, optional (default: 0.25) Adjust the height of the space between multiple panels. return_fig : typing.Union[bool, NoneType], optional (default: None) Return the matplotlib figure. kwargs : _empty Arguments to pass to :func:, for instance: the maximum and minimum values (e.g. ). show : typing.Union[bool, NoneType], optional (default: None) Show the plot, do not return axis. save : typing.Union[bool, str, NoneType], optional (default: None) If or a , save the figure. A string is appended to the default filename. Infer the filetype if ending on {, , }. ax : typing.Union[matplotlib.axes._axes.Axes, NoneType], optional (default: None) A matplotlib axes object. Only works if plotting a single component. Returns ------- If a :class: or a list of it. File: /nfs/team205/kk18/miniconda3/envs/vitro/lib/python3.8/site-packages/scanpy/plotting/_tools/scatterplots.py Type: function
obsm'ann1'['ann1', 'ann2'].varvar_names.var.rawadataNoneTruelayeradata.rawuse_raw=Falseadata.Xlayerlayeruse_raw~networkx.drawing.nx_pylab.draw_networkx_edgesscvelo.pl.velocity_embedding~matplotlib.axes.Axes.quivercomponentscolors['1,2', '2,3']components='all''2d''on data''right margin'loc~matplotlib.legend.Legend~matplotlib.text.Text.set_fontsize'bold'legend_loc == 'on data''normal'~matplotlib.text.Text.set_fontweight~matplotlib.patheffects.withStrokeNoneNone~matplotlib.colors.Colormap"magma"viridis"mpl.cm.cividis~matplotlib.cm.get_cmapNonempl.rcParams["image.cmap"]color_map~scanpy.set_figure_params~matplotlib.colors.ListedColormap'Set2''tab20'~cycler.Cycler~matplotlib.colors.is_color_likeNonempl.rcParams["axes.prop_cycle"]adata.uns["{var}_colors"]adata.uns["{var}_colors"]color=None~scanpy.set_figure_paramsTrue['title1', 'title2', ...]NonepNdef my_vmin(values): return np.mean(values)vmin=my_vminscattervmin=[0.1, 'p1', None, my_vmin]vminvminmatplotlib.pyplot.scattervmin=-2, vmax=5Truestr'.pdf''.png''.svg'show==False~matplotlib.axes.Axes?sc.pl.embedding
Example 1 (python):
import scanpy as sc
import pandas as pd
import numpy as np
import anndata
from scipy.io import mmwrite, mmread
from scipy.sparse import csr_matrix
Example 2 (python):
import scvi
import anndata
import scipy
import numpy as np
import pandas as pd
import scanpy as sc
import matplotlib.pyplot as plt
scvi.settings.seed = 420
Example 3 (python):
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.stats import gaussian_kde
import scanpy as sc
Example 4 (python):
import session_info
session_info.show()
Example 5 (python):
import numpy as np
import pandas as pd
import scanpy as sc
import matplotlib.pyplot as plt
import scrublet as scr
import session_info
This skill includes comprehensive documentation in references/:
Use view to read specific reference files when detailed information is needed.
Start with the getting_started or tutorials reference files for foundational concepts.
Use the appropriate category reference file (api, guides, etc.) for detailed information.
The quick reference section above contains common patterns extracted from the official docs.
Organized documentation extracted from official sources. These files contain:
Add helper scripts here for common automation tasks.
Add templates, boilerplate, or example projects here.
To refresh this skill with updated documentation: