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)
Exports to a SPRING project directory [Weinreb17].
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 [Weinreb17] for details.
- Parameters:
- adata :
AnnData
Annotated data matrix:
adata.uns['neighbors']
needs to be present.- project_dir :
Union
[Path
,str
] Path to directory for exported SPRING files.
- embedding_method :
str
Name of a 2-D embedding in
adata.obsm
- subplot_name :
Optional
[str
] (default:None
) Name of subplot folder to be created at
project_dir+"/"+subplot_name
- cell_groupings :
Union
[str
,Iterable
[str
],None
] (default:None
) Instead of importing all categorical annotations when
None
, pass a list of keys foradata.obs
.- custom_color_tracks :
Union
[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 :
Examples
See this tutorial.