addMoleculeCoordinates | R Documentation |
Adds or updates the molecule coordinates for a specified assay in the given object.
addMoleculeCoordinates(
object,
coordinates = NULL,
assay_name = activeAssay(object)
)
object |
An object of class |
coordinates |
A data frame containing the coordinates to be added. The data frame must contain the following variables:
|
assay_name |
Only relevant if the |
This function processes the provided coordinates data frame to ensure
it contains the necessary variables (molecule
or the assay name, x
or x_orig
,
and y
or y_orig
). If only the scaled coordinates (x
and y
) are provided,
they are scaled back to the original coordinate frame using the image scale factor.
The resulting data frame is then nested by the assay modality and integrated into
the molecular metadata variables of the object.
Results are stored in a nested column in the molecular meta variable data.frame called coords.
The updated input object, containing the added, removed or computed results.
getMolecularCoordinates()
, getMetaVarDf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.