You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with Y being the cell counts, X the covariates, and v the set of nodes of the underlying tree structure.
53
-
54
36
For further information, see `tascCODA: Bayesian Tree-Aggregated Analysis of Compositional Amplicon and Single-Cell Data`
55
37
(Ostner et al., 2021)
56
38
"""
@@ -75,11 +57,14 @@ def load(
75
57
modality_key_1: str="rna",
76
58
modality_key_2: str="coda",
77
59
) ->MuData:
78
-
"""Prepare a MuData object for subsequent processing. If type is "cell_level", then create a compositional analysis dataset from the input adata. If type is "sample_level", generate ete tree for tascCODA models from dendrogram information or cell-level observations.
60
+
"""Prepare a MuData object for subsequent processing.
61
+
62
+
If type is "cell_level", then create a compositional analysis dataset from the input adata.
63
+
If type is "sample_level", generate ete tree for tascCODA models from dendrogram information or cell-level observations.
79
64
80
-
When using ``type="cell_level"``, ``adata`` needs to have a column in ``adata.obs`` that contains the cell type assignment.
65
+
When using `type="cell_level"`, `adata` needs to have a column in `adata.obs` that contains the cell type assignment.
81
66
Further, it must contain one column or a set of columns (e.g. subject id, treatment, disease status) that uniquely identify each (statistical) sample.
82
-
Further covariates (e.g. subject age) can either be specified via addidional column names in ``adata.obs``, a key in ``adata.uns``, or as a separate DataFrame.
67
+
Further covariates (e.g. subject age) can either be specified via addidional column names in `adata.obs`, a key in `adata.uns`, or as a separate DataFrame.
83
68
84
69
Args:
85
70
adata: AnnData object.
@@ -90,10 +75,13 @@ def load(
90
75
covariate_obs: If type is "cell_level", specify list of keys for adata.obs, where covariate values are stored.
91
76
covariate_df: If type is "cell_level", specify dataFrame with covariates.
92
77
dendrogram_key: Key to the scanpy.tl.dendrogram result in `.uns` of original cell level anndata object.
93
-
levels_orig: List that indicates which columns in `.obs` of the original data correspond to tree levels. The list must begin with the root level, and end with the leaf level.
94
-
levels_agg: List that indicates which columns in `.var` of the aggregated data correspond to tree levels. The list must begin with the root level, and end with the leaf level.
78
+
levels_orig: List that indicates which columns in `.obs` of the original data correspond to tree levels.
79
+
The list must begin with the root level, and end with the leaf level.
80
+
levels_agg: List that indicates which columns in `.var` of the aggregated data correspond to tree levels.
81
+
The list must begin with the root level, and end with the leaf level.
95
82
add_level_name: If True, internal nodes in the tree will be named as "{level_name}_{node_name}" instead of just {level_name}.
96
-
key_added: If not specified, the tree is stored in .uns[‘tree’]. If `data` is AnnData, save tree in `data`. If `data` is MuData, save tree in data[modality_2].
83
+
key_added: If not specified, the tree is stored in `.uns['tree']`.
84
+
If `data` is AnnData, save tree in `data`. If `data` is MuData, save tree in data[modality_2].
97
85
modality_key_1: Key to the cell-level AnnData in the MuData object.
98
86
modality_key_2: Key to the aggregated sample-level AnnData object in the MuData object.
0 commit comments