Skip to content

Commit

Permalink
Update Collection and Scene operations in abstract spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-dark committed Sep 24, 2024
1 parent 247b6df commit 099c3a5
Showing 1 changed file with 20 additions and 35 deletions.
55 changes: 20 additions & 35 deletions abstract_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>add_new\_<var>object_type</var></code> methods are considered "owned" by the collection.
Expand Down Expand Up @@ -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 | <!-- TODO --> |
| register_point_cloud | <!-- TODO --> |
| register_geometry_dataframe | <!-- TODO --> |
| register_multiscale_image | <!-- TODO --> |
| 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

<!-- TODO: -->

### Operation: register_point_cloud()

<!-- TODO: -->

### Operation: register_geometry_dataframe()

<!-- TODO: -->

### Operation: register_multiscale_image()

<!-- TODO: -->

### Operation: register\_<var>object_type</var>

Each <code>add_new\_<var>object_type</var></code> 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

Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 099c3a5

Please sign in to comment.