tiledbsoma.Scene.add_new_geometry_dataframe

Scene.add_new_geometry_dataframe(key: str, subcollection: str | Sequence[str], *, transform: CoordinateTransform | None, uri: str | None = None, schema: pa.Schema, coordinate_space: Sequence[str] | CoordinateSpace = ('x', 'y'), domain: Domain | None = None, platform_config: options.PlatformConfig | None = None) GeometryDataFrame

Adds a GeometryDataFrame to the scene and sets a coordinate transform between the scene and the dataframe.

If the subcollection the geometry dataframe will be created inside of is more than one layer deep, the input should be provided as a sequence of names. For example, to add a new geometry dataframe named “transcripts” in the “var/RNA” collection:

scene.add_new_geometry_dataframe(
    'transcripts', subcollection=['var', 'RNA'], **kwargs
)

See add_new_collection() for details about child URIs.

Parameters:
  • key – The name of the geometry dataframe.

  • subcollection – The name, or sequence of names, of the subcollection the dataframe is stored in.

  • transform – The coordinate transformation from the scene to the dataframe.

  • uri – If provided, overrides the default URI what would be used to create this object. This may be aboslution or relative.

  • kwargs – Additional keyword arugments as specified in spatial.GeometryDataFrame.create().

Returns:

The newly create GeometryDataFrame, opened for writing.

Lifecycle

Experimental.