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
Copy file name to clipboardExpand all lines: vitessce/wrappers.py
+72-10Lines changed: 72 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
frompathlibimportPurePath, PurePosixPath
5
5
fromuuidimportuuid4
6
6
7
+
importzarr
8
+
7
9
from .constantsimport (
8
10
DataTypeasdt,
9
11
)
@@ -42,12 +44,16 @@ def __init__(self, **kwargs):
42
44
Abstract constructor to be inherited by dataset wrapper classes.
43
45
44
46
:param str out_dir: The path to a local directory used for data processing outputs. By default, uses a temp. directory.
47
+
:param dict request_init: options to be passed along with every fetch request from the browser, like `{ "header": { "Authorization": "Bearer dsfjalsdfa1431" } }`
:param str adata_path: A path to an AnnData object written to a Zarr store containing single-cell experiment data.
931
975
:param str adata_url: A remote url pointing to a zarr-backed AnnData store.
976
+
:param adata_store: A path to pass to zarr.FSStore, or an existing store instance.
977
+
:type adata_store: str or zarr.Storage
932
978
:param str obs_feature_matrix_path: Location of the expression (cell x gene) matrix, like `X` or `obsm/highly_variable_genes_subset`
933
979
:param str feature_filter_path: A string like `var/highly_variable` used in conjunction with `obs_feature_matrix_path` if obs_feature_matrix_path points to a subset of `X` of the full `var` list.
934
980
:param str initial_feature_filter_path: A string like `var/highly_variable` used in conjunction with `obs_feature_matrix_path` if obs_feature_matrix_path points to a subset of `X` of the full `var` list.
@@ -941,7 +987,6 @@ def __init__(
941
987
:param list[str] obs_embedding_dims: Dimensions along which to get data for the scatterplot, like `[[0, 1], [4, 5]]` where `[0, 1]` is just the normal x and y but `[4, 5]` could be comparing the third and fourth principal components, for example.
942
988
:param str obs_spots_path: Column name in `obsm` that contains centroid coordinates for displaying spots in the spatial viewer
943
989
:param str obs_points_path: Column name in `obsm` that contains centroid coordinates for displaying points in the spatial viewer
944
-
:param dict request_init: options to be passed along with every fetch request from the browser, like `{ "header": { "Authorization": "Bearer dsfjalsdfa1431" } }`
945
990
:param str feature_labels_path: The name of a column containing feature labels (e.g., alternate gene symbols), instead of the default index in `var` of the AnnData store.
946
991
:param str obs_labels_path: (DEPRECATED) The name of a column containing observation labels (e.g., alternate cell IDs), instead of the default index in `obs` of the AnnData store. Use `obs_labels_paths` and `obs_labels_names` instead. This arg will be removed in a future release.
947
992
:param list[str] obs_labels_paths: The names of columns containing observation labels (e.g., alternate cell IDs), instead of the default index in `obs` of the AnnData store.
@@ -955,16 +1000,28 @@ def __init__(
955
1000
self._repr=make_repr(locals())
956
1001
self._adata_path=adata_path
957
1002
self._adata_url=adata_url
958
-
ifadata_urlisnotNoneand (adata_pathisnotNone):
959
-
raiseValueError("Did not expect adata_url to be provided with adata_path")
960
-
ifadata_urlisNoneand (adata_pathisNone):
961
-
raiseValueError("Expected either adata_url or adata_path to be provided")
0 commit comments