-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi PHLOWER Team,
I'm using the software on a subset of cell clusters from a single-cell sequencing experiment we've run. When I get to the output from the phlower.ext.plot_stream_sc I don't see any bifurcation in my output. I'm not very familiar with this approach though and wondering if that is possible and should be interpreted as cell states along a continuum, as opposed to an error in my coding?
As background the subsetted cells included encompass fibroblasts, osteoblasts, and osteochondral progenitors from fish scales. All advice would be appreciated. Kind Regards.
Output here:
Code followed here:
Create stream tree
ph.tl.harmonic_stream_tree(adata,
trajs_use=10000,
trajs_clusters='trajs_clusters',
min_bin_number=20,
cut_threshold=1,
layout_name='cumsum',
eigen_n = -1)
Create group column
adata.obs['group'] = adata.obs['seurat_clusters'].astype(str)
adata.obs['group'] = adata.obs['group'].astype('category')
Color dictionary
celltype_colors = {
"0": "#0b871c",
"11": "#fea541",
"13": "#d50a11",
"16": "#8b3df9",
"2":"#573b0a",
"5":"#fe7fce",
"3":"#6a034d",
}
adata.uns['group_colors'] = [celltype_colors[g] for g in adata.obs['group'].cat.categories]
adata.uns['group_colors'] = celltype_colors
Plot stream tree
figs = ph.ext.plot_stream_sc(
adata,
color=['group'],
show_text=True,
show_graph=True,
show_legend=True,
fig_size=(8,5),
s=10,
return_fig=True,
dist_scale=1
)