computeMetaFeatures | R Documentation |
This function computes various meta features for the specified
assay in the SPATA2
object and adds them to the object's metadata.
computeMetaFeatures(
object,
assay_name = activeAssay(object),
overwrite = FALSE
)
object |
An object of class |
assay_name |
Only relevant if the |
overwrite |
Logical value. Must be |
This function computes the following meta features for each observation in the specified assay. The computed features are added to the metadata of the SPATA2 object with the following naming conventions:
n_counts_<assay_name>
: The total number of counts for each observation.
n_distinct_<assay_name>
: The number of distinct molecules (non-zero entries) for each observation.
avg_cpm_<assay_name>
: The average counts per molecule for each observation, computed as the total number of counts divided by the number of distinct molecules.
If the overwrite
parameter is set to TRUE, existing features with the same names will be overwritten.
Otherwise, the function will check for the presence of existing features and will not overwrite them unless
explicitly instructed to do so.
The updated input object, containing the added, removed or computed results.
library(SPATA2)
object <- loadExampleObject("UKF269T")
getAssayNames(object)
getMetaDf(object)
object <- computeMetaFeatures(object, asay_name = "gene")
getMetaDf(object)
plotSurface(object, color_by = "n_counts_gene")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.