From 099c3a5dfd0e45aac8c62c45c60103fdb5485347 Mon Sep 17 00:00:00 2001 From: Julia Dark Date: Tue, 24 Sep 2024 15:55:23 -0400 Subject: [PATCH] Update Collection and Scene operations in abstract spec --- abstract_specification.md | 55 ++++++++++++++------------------------- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/abstract_specification.md b/abstract_specification.md index 907ca12..deb4b31 100644 --- a/abstract_specification.md +++ b/abstract_specification.md @@ -539,11 +539,11 @@ In addition, `SOMACollection` supports operations to manage the contents of the | del(string key) | Removes the key/value from the collection. Does not delete the underlying object (value). | | add_new_collection(string key, ...) | Creates a new sub-Collection and adds it to this `SOMACollection`. | | add_new_dataframe(string key, ...) | Creates a new `DataFrame` and adds it to this `SOMACollection`. | -| add_new_point_cloud(string key, ...) | Creates a new `PointCloud` and adds it to this `SOMACollection`. | -| add_new_geometry_dataframe(string key, ...) | Creates a new `GeometryDataFrame` and adds it to this `SOMACollection`. | +| add_new_point_cloud(string key, ...) | Creates a new `PointCloud` and adds it to this `SOMACollection`. | +| add_new_geometry_dataframe(string key, ...) | Creates a new `GeometryDataFrame` and adds it to this `SOMACollection`. | | add_new_dense_ndarray(string key, ...) | Creates a new `DenseNDArray` and adds it to this `SOMACollection`. | | add_new_sparse_ndarray(string key, ...) | Creates a new `SparseNDArray` and adds it to this `SOMACollection`. | -| add_new_multiscale_image(string key, ...) | Creates a new `MultiscaleImage` and adds it to this `SOMACollection`. | +| add_new_multiscale_image(string key, ...) | Creates a new `MultiscaleImage` and adds it to this `SOMACollection`. | A `SOMACollection` also manages the lifecycle of objects directly instantiated by it. Objects accessed via getting a collection element, or objects created with one of the add_new\_object_type methods are considered "owned" by the collection. @@ -643,39 +643,24 @@ add_new_collection(string key, CollectionType kind, string uri = "", PlatformCon - `kind`: The kind of collection to add. For instance, if `SOMAExperiment` is provided, the newly-added collection, and the returned instance, will be a `SOMAExperiment`. - ## SOMAScene The `SOMAScene` contains the same base operations as a `SOMACollection` with a few additional calls for accessing and managing coordinate spaces. Summary of opertions: -| Operation | Description | -| --------- | ----------- | -| get coordinate_space | | -| register_point_cloud | | -| register_geometry_dataframe | | -| register_multiscale_image | | +| Operation | Description | +| --------------------------- | ------------------------------------------------------------------------------------ | +| get coordinate_space | Returns the `CoordinateSpace` this `SOMAScene` is defined on. | +| register_point_cloud | Adds a `CoordinateTransform` to an existing `PointCloud` in this `SOMAScene`. | +| register_geometry_dataframe | Adds a `CoordinateTransform` to an existing `GeometryDataFrame` in this `SOMAScene`. | +| register_multiscale_image | Adds a `CoordinateTransform` to an existing `MultiscaleImage` in this `SOMAScene`. | ### Operations -### get coordinate space - - - -### Operation: register_point_cloud() - - - -### Operation: register_geometry_dataframe() - - - -### Operation: register_multiscale_image() - - - +### Operation: register\_object_type +Each add_new\_object_type method takes an existing SOMA object in the scene, adds a transformation from the scene to the object, and returns the object. The returned object has the same `context` value as the existing scene and is [owned by the current scene](#operation-close-collection-types). ## SOMADataFrame @@ -717,15 +702,15 @@ A `SOMADataFrame` is indexed by one or more dataframe columns (also known as "di Summary of operations: -| Operation | Description | -| ---------------------------------------- | ----------------------------------------------------- | -| static create(uri, ...) -> SOMAGemetoryDataFrame | Create a `SOMAGeometryDataFrame`. | -| get soma_type | Returns the constant "SOMAGeometryDataFrame". | -| get schema -> Arrow.Schema | Return data schema, in the form of an Arrow `Schema`. | -| get index_column_names -> [string, ...] | Return index (dimension) column names. | -| get count -> int | Return the number of rows in the `SOMAGeometryDataFrame`. | -| read | Read a subset of data from the `SOMAGeometryDataFrame`. | -| write | Write a subset of data to the `SOMADataFrame`. | +| Operation | Description | +| ------------------------------------------------ | --------------------------------------------------------- | +| static create(uri, ...) -> SOMAGemetoryDataFrame | Create a `SOMAGeometryDataFrame`. | +| get soma_type | Returns the constant "SOMAGeometryDataFrame". | +| get schema -> Arrow.Schema | Return data schema, in the form of an Arrow `Schema`. | +| get index_column_names -> [string, ...] | Return index (dimension) column names. | +| get count -> int | Return the number of rows in the `SOMAGeometryDataFrame`. | +| read | Read a subset of data from the `SOMAGeometryDataFrame`. | +| write | Write a subset of data to the `SOMADataFrame`. | A `SOMADataFrame` is indexed by one or more dataframe columns (also known as "dimensions"). The name and order of dimensions is specified at the time of creation. [Slices](#indexing-and-slicing) are addressable by the user-specified dimensions. The `soma_joinid` column may be specified as an index column.