From 003dded632811c0d72b8a6e30f072a0e5bf5ada4 Mon Sep 17 00:00:00 2001 From: DoronHav Date: Sat, 27 Apr 2024 15:08:18 -0400 Subject: [PATCH 1/2] fix doc strings --- scenvi/utils.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scenvi/utils.py b/scenvi/utils.py index 1cd7c4c..543fbf9 100644 --- a/scenvi/utils.py +++ b/scenvi/utils.py @@ -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 @@ -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 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) + :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 From 4b85d805bef750ccd1d958639b41b4f352de42a3 Mon Sep 17 00:00:00 2001 From: DoronHav Date: Sat, 27 Apr 2024 15:13:54 -0400 Subject: [PATCH 2/2] fix docs --- scenvi/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scenvi/utils.py b/scenvi/utils.py index 543fbf9..c77c764 100644 --- a/scenvi/utils.py +++ b/scenvi/utils.py @@ -264,7 +264,7 @@ def compute_covet( :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 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)