Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #54

Merged
merged 2 commits into from
Apr 27, 2024
Merged

Docs #54

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions scenvi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def __call__(self, x, mode="spatial", key=random.key(0)):

@struct.dataclass
class Metrics(metrics.Collection):
"""
:meta private:
"""

enc_loss: metrics.Average
dec_loss: metrics.Average
enc_corr: metrics.Average
Expand Down Expand Up @@ -257,12 +261,12 @@ def compute_covet(
"""
Compute niche covariance matrices for spatial data, run with scenvi.compute_covet

:param spatial_data (anndata): anndata with spatial data, with an obsm indicating spatial location of spot/segmented cell
:param k (int): number of nearest neighbours to define niche (default 8)
:param g (int): number of HVG to compute COVET representation on (default 64)
:param genes (list of str): list of genes to keep for niche covariance (default []
:param spatial_key (str): obsm key name with physical location of spots/cells (default 'spatial')
:param batch_key (str): obs key name of batch/sample of spatial data (default 'batch' if in spatial_data.obs, else -1)
:param spatial_data: (anndata) spatial data, with an obsm indicating spatial location of spot/segmented cell
:param k: (int) number of nearest neighbours to define niche (default 8)
:param g: (int) number of HVG to compute COVET representation on (default 64)
:param genes: (list of str) list of genes to keep for niche covariance (default []
:param spatial_key: (str) obsm key name with physical location of spots/cells (default 'spatial')
:param batch_key: (str) obs key name of batch/sample of spatial data (default 'batch' if in spatial_data.obs, else -1)

:return COVET: niche covariance matrices
:return COVET_SQRT: matrix square-root of niche covariance matrices for approximate OT
Expand Down
Loading