-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the Scene
class
#220
Add the Scene
class
#220
Conversation
- Add new MultiscaleImage - Add new SpatialDataframe abstract base class - Add PointCloud subclass of the SpatialDataFrame - Add GeometryDataFrame subclass of the SpatialDataFrame - Add shapely as a dependency
* Update docstrings * Add ValueError error messages in `SpatialRead` * Rename method `read_level`->`read_region`
34f7878
to
462678a
Compare
Co-authored-by: nguyenv <[email protected]>
The individual implementations may find a shared base class useful, but it doesn't need to be included in the abstract specification.
* Create the `Scene` class * Add `spatial` collection of scenes to the `Experiment` class * Add Scene to ephemeral collections and tests
[sc-55577], [sc-55578], [sc-55579] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will need another pass from me, but I left comments about some of the more high level parts of this PR I'm not sure if I understand.
python-spec/src/somacore/scene.py
Outdated
If the subcollection the geometry dataframe is inside of is more than one | ||
layer deep, the input should be provided as a sequence of names. For example, | ||
to register a geometry dataframe named "transcripts" in the "var/RNA" | ||
collection:: | ||
|
||
scene.register_geometry_dataframe( | ||
'transcripts', transform, subcollection=['var', 'RNA'], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a workflow that is being supported? I thought the spec was pretty opinionated about where each kind of thing would be stored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example in the docstring follows the storage guideline and is more than one layer deep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few naming suggestions but otherwise looks great.
python-spec/src/somacore/scene.py
Outdated
raise NotImplementedError() | ||
|
||
@abc.abstractmethod | ||
def get_transformation_to_multiscale_image( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_transformation_to_multiscale_image( | |
def get_transformation_multiscale_image( |
Do we need to
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need something to specify what the transform is going from/to. (Scene to image is different than image to scene). I don't love how verbose the methods are, so I'm open to other suggestions. I did change transformation
to match transform
(based on one of your suggestion changes on #219).
* Add methods to add new assets to a scene * Rename `register_*` methods to `set_transformation_to_*`
* Rename `_transformation_` methods to `_transform_`. * Add ability to get transforms "from" as well as "to" assets.
Scene
classspatial
collection of scenes to theExperiment
classThis PR is ready for review, but should be merged after PR #219