scanpy.external.exporting.spring_project#
- scanpy.external.exporting.spring_project(adata, project_dir, embedding_method, *, subplot_name=None, cell_groupings=None, custom_color_tracks=None, total_counts_key='n_counts', neighbors_key=None, overwrite=False)[source]#
Exports to a SPRING project directory [Weinreb et al., 2017].
Visualize annotation present in
adata
. By default, export all gene expression data fromadata.raw
and categorical and continuous annotations present inadata.obs
.See SPRING or Weinreb et al. [2017] for details.
- Parameters:
- adata
AnnData
Annotated data matrix:
adata.uns['neighbors']
needs to be present.- project_dir
Path
|str
Path to directory for exported SPRING files.
- embedding_method
str
Name of a 2-D embedding in
adata.obsm
- subplot_name
str
|None
(default:None
) Name of subplot folder to be created at
project_dir+"/"+subplot_name
- cell_groupings
str
|Iterable
[str
] |None
(default:None
) Instead of importing all categorical annotations when
None
, pass a list of keys foradata.obs
.- custom_color_tracks
str
|Iterable
[str
] |None
(default:None
) Specify specific
adata.obs
keys for continuous coloring.- total_counts_key
str
(default:'n_counts'
) Name of key for total transcript counts in
adata.obs
.- overwrite
bool
(default:False
) When
True
, existing counts matrices inproject_dir
are overwritten.
- adata
- Return type:
Examples
See this tutorial.