In addition to various functions for reading input data in scanpy, various methods in picturedrocks need cluster labels.
Annotate with information about clusters
Precomputes cluster indices, number of clusters, etc.
object with annotation
The information computed here is lost when saving as a .loom file. If a .loom file has cluster information, you should run this function immediately after
read_clusts(adata, filename, sep=', ', copy=False)¶
Read cluster labels from a csv
object with cluster labels
- Cluster ids will automatically be changed so they are 0-indexed
- csv can either be two columns (in which case the first column is treated
as observation label and merging handled by pandas) or one column (only
cluster labels, ordered as in