createMolecularAssay | R Documentation |
MolecularAssay
Creates and adds an object of class MolecularAssay
to the SPATA2
object.
createMolecularAssay(
object,
modality,
mtr_counts = Matrix::Matrix(),
mtr_proc = list(),
active_mtr = NULL,
overwrite = FALSE,
activate = FALSE,
verbose = NULL,
...
)
object |
An object of class |
modality |
Character value. Should best describe the molecular type of the count matrix.
Additionally, it defines the assay name, that is created with the count matrix and further
referred to via the argument |
mtr_counts |
A count matrix. Column names correspond to the barcodes of the observations. Rownames correspond to the names of the molecular features (genes, proteins, metabolites etc.). |
mtr_proc |
A list of processed matrices set in slot @mtr_proc. |
active_mtr |
Character value. The name of the matrix chosen as
the active matrix. If |
overwrite |
Logical value. Must be |
verbose |
Logical. If (Warning messages will always be printed.) |
... |
Gives access to set remaining slots of the |
Creating an assay only with processed matrices (mtr_proc
) while not specifying
mtr_counts
is possible. In that case, mtr_counts
is populated with an empty
matrix that contains all unique molecule names found in the matrices as rownames
and barcodes as colnames.
Generally speaking, the count matrix contains all molecule names! Processed matrices contain either identical molecule names or a subset of those found in the count matrix.
The updated input object, containing the added, removed or computed results.
The molecules of the added assay must not already exist in the SPATA2
object.
Variables in SPATA2 are case sensitive! If you want to add, for instance, a protein assay to
the SPATA2
object that already contains genes, you can provide the protein names
like this Ldh while the gene names exist like this LDH. See stringr::str_to_title()
and
related functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.