CellCloud Three-dimensional single-cell transcriptome imaging of thick tissues¶
Data obtained from https://elifesciences.org/reviewed-preprints/90029v1
In [1]:
Copied!
import os
# Use the freshly built frontend when running this notebook locally.
os.environ["CELLDEGA_LOCAL_ESM"] = "1"
import celldega as dega
import pandas as pd
import os
# Use the freshly built frontend when running this notebook locally.
os.environ["CELLDEGA_LOCAL_ESM"] = "1"
import celldega as dega
import pandas as pd
In [2]:
Copied!
base_url = 'https://raw.githubusercontent.com/broadinstitute/scverse-owkin_thick_merfish/main/landscape_files'
base_url = 'https://raw.githubusercontent.com/broadinstitute/scverse-owkin_thick_merfish/main/landscape_files'
Cell size and continuous rotation¶
cell_size sets the default cell diameter in microns, assuming the centroid
coordinates are in microns. Change cell_size=10.0 below and rerun the notebook
to try another default.
In the interactive preview, the CELL slider multiplies this diameter: its midpoint is 1× (10 µm here), the minimum is 0×, and the maximum is 2× (20 µm here). Drag vertically or horizontally to rotate continuously, including past the poles where vertical rotation previously stopped.
The saved documentation preview uses the JavaScript bundle served by this local docs site. Reexecuting the notebook uses your locally built frontend.
In [3]:
Copied!
landscape = dega.viz.CellCloud(
base_url=base_url,
height=600,
cell_size=10.0, # Default cell diameter in microns
rotation_x=90,
)
landscape = dega.viz.CellCloud(
base_url=base_url,
height=600,
cell_size=10.0, # Default cell diameter in microns
rotation_x=90,
)
In [4]:
Copied!
df_sig = pd.read_parquet(base_url + '/df_sig.parquet')
mat = dega.clust.Matrix(df_sig)
mat.norm(axis='row', by='zscore')
mat.cluster()
cgm = dega.viz.Clustergram(matrix=mat, width=500, height=500)
df_sig = pd.read_parquet(base_url + '/df_sig.parquet')
mat = dega.clust.Matrix(df_sig)
mat.norm(axis='row', by='zscore')
mat.cluster()
cgm = dega.viz.Clustergram(matrix=mat, width=500, height=500)
In [5]:
Copied!
dega.viz.spatial_clustergram(landscape, cgm)
dega.viz.spatial_clustergram(landscape, cgm)
Out[5]: