addGeneFeatures.Rd
This function allows to savely add features to the gene meta data.frame of an expression matrix of choice.
addGeneFeatures(
object,
gene_df,
feature_names = NULL,
mtr_name = NULL,
overwrite = FALSE,
verbose = NULL,
of_sample = NA
)
A valid spata-object.
A data.frame that contains the variables specified by name
in the argument feature_names
and the key variable genes by
which the feature variables are joined to the already existing
gene meta data.frame.
Character vector or NULL. See details for more.
Character value. The name of the matrix of interest.
Logical. If the specified feature names already exist in the current spata-object this argument must be set to TRUE in order to overwrite them.
Logical. If set to TRUE informative messages regarding the computational progress will be printed.
(Warning messages will always be printed.)
This argument is currently inactive. It might be reactivated when spata-objects can store more than one sample.
The input spata2
object containing the added or computed
results.
If you are only interested in adding specific features to the spata-object
you can specify those with the feature_names
-argument. If no variables
are specified this way all variables found in the input data.frame for argument
gene_df
are taken. (Apart from the key variable genes).
Eventually the new features are joined via dplyr::left_join()
over the
key-variables genes. Additional steps secure
the joining process.