diff --git a/articles/soma-experiment-queries.html b/articles/soma-experiment-queries.html index 1809ba14c8..af9b0e69b1 100644 --- a/articles/soma-experiment-queries.html +++ b/articles/soma-experiment-queries.html @@ -100,7 +100,7 @@
experiment$ms
#> <SOMACollection>
-#> uri: file:///tmp/RtmpES12uG/soma-exp-pbmc-small/ms
+#> uri: file:///tmp/RtmpOfs479/soma-exp-pbmc-small/ms
#> groups: RNA
To use larger (or smaller) buffer sizes:
diff --git a/articles/soma-objects.html b/articles/soma-objects.html index 054f40fd7c..e045f6e5cb 100644 --- a/articles/soma-objects.html +++ b/articles/soma-objects.html @@ -95,7 +95,7 @@Example data
uri <- extract_dataset("soma-exp-pbmc-small") uri -#> [1] "/tmp/Rtmpg9udEr/soma-exp-pbmc-small"
experiment <- SOMAExperimentOpen(uri)
experiment
#> <SOMAExperiment>
-#> uri: /tmp/Rtmpg9udEr/soma-exp-pbmc-small
+#> uri: /tmp/RtmpXZxQi9/soma-exp-pbmc-small
#> arrays: obs
#> groups: ms
Note that opening a SOMAExperiment
(or any SOMA object) only returns a pointer to the object on disk. No data is actually read into memory until it’s requested. This is important as the full experiment may be too large to fit in memory.
experiment$ms
#> <SOMACollection>
-#> uri: file:///tmp/Rtmpg9udEr/soma-exp-pbmc-small/ms
+#> uri: file:///tmp/RtmpXZxQi9/soma-exp-pbmc-small/ms
#> groups: RNA
This returns the SOMACollection
of measurements. We’ll take a closer look at this later.
To access the obs
field containing the observation annotations:
experiment$obs
#> <SOMADataFrame>
-#> uri: file:///tmp/Rtmpg9udEr/soma-exp-pbmc-small/obs
+#> uri: file:///tmp/RtmpXZxQi9/soma-exp-pbmc-small/obs
#> dimensions: soma_joinid
#> attributes: orig.ident, nCount_RNA, nFeature_RNA, RNA_snn_res.0.8, letter.idents, groups,...
experiment$ms
#> <SOMACollection>
-#> uri: file:///tmp/Rtmpg9udEr/soma-exp-pbmc-small/ms
+#> uri: file:///tmp/RtmpXZxQi9/soma-exp-pbmc-small/ms
#> groups: RNA
In this case, we have one member: RNA
, which is a SOMAMeasurement
. A specific measurement can be accessed by name with the get()
method:
experiment$ms$get("RNA")
#> <SOMAMeasurement>
-#> uri: file:///tmp/Rtmpg9udEr/soma-exp-pbmc-small/ms/RNA
+#> uri: file:///tmp/RtmpXZxQi9/soma-exp-pbmc-small/ms/RNA
#> arrays: var
#> groups: obsm, obsp, varm, X
This collection contains 3 layers corresponding to the raw, normalized, and scaled slots from the original Seurat object.
Any of these X
layers can be accessed using get()
:
This returns a SOMASparseNDArray
. As we did before, we can inspect the array’s schema:
## <SOMASparseNDArray>
-## uri: file:///tmp/Rtmpaivl1V/soma-exp-pbmc-small/ms/RNA/X/counts
+## uri: file:///tmp/RtmpJuklno/soma-exp-pbmc-small/ms/RNA/X/counts
## dimensions: soma_dim_0, soma_dim_1
## attributes: soma_data
Similar to SOMADataFrame
, we can load the data into memory as an Arrow Table: