Retrieves the list of molecular signatures stored in a molecular assay. While getSignatureList() allows to extract signatures of all assays, getGeneSetList(), getMetaboliteSetList() and getProteinSetList() are quick wrappers. But they require assays of specific names/molecular modalities.

getGeneSetList(object, ..., class = NULL)

getMetaboliteSetList(object, ..., class = NULL)

getProteinSetList(object, ..., class = NULL)

getSignatureList(object, ..., class = NULL, assay_name = activeAssay(object))

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

...

Additional selection helpers from the tidyselect package that match names according to a given pattern.

class

Character vector of signature classes with which to subset the output.

assay_name

Only relevant if the SPATA2 object contains more than one assay: Denotes the assay of interest and thus the molecular modality to use. Defaults to the active assay as set by activateAssay().

Value

A named list of character vectors.

Details

These functions retrieve the signatures from the provided object.

  • getSignatureList(): The list of signatures from the assay specified in assay_name.

  • getGeneSetList(): The list of signatures from the assay with @modality = 'gene' (assay_name = 'gene').

  • getMetaboliteSetList(): The list of signatures from the assay with @modality = 'metabolite' (assay_name = 'metabolite').

  • getProteinSetLit(): The list of signatures the assay with @modality = 'protein' (assay_name = 'protein').

See also

vselect(), lselect()

Documentation of slot @signatures in the MolecularAssay-class. To extract character vectors of molecule names getMolecules() or getGenes(), ... To extract character vectors of signature names getSignatureNames(), getGeneSets(), ... To add signatures addSignature() or addGeneSet(), ...

Examples


library(SPATA2)

object <- loadSpataObject("UKF269T")

## how the different functions work
getAssayNames(object)

# opt 1
activeAssay(object)
gene_sets <- getSignatureList(object)

head(gene_sets)

# opt 2 (equal to opt 1, cause active and only assay is 'gene')
gene_sets <- getSignatureList(object, assay_name = "gene")

head(gene_sets)

# opt 3
gene_sets <- getGeneSetList(object)

head(gene_sets)

# opt 4 - fails cause no 'protein' assay
protein_sets <- getProteinSetList(object)

## using class argument

hm_gene_sets <- getGeneSetList(object, class = "HM")

head(hm_gene_sets)
tail(hm_gene_sets)

two_kinds_of_gene_sets <- getGeneSetList(object, class = c("HM", "RCTM"))

head(two_kinds_of_gene_sets)
tail(two_kinds_of_gene_sets)

# subsetting with tidyselect grammar

tcr_gene_sets <- getGeneSetList(object, contains("TCR"))

str(tcr_gene_sets)

tcr_gene_sets2 <- getGeneSetList(object, contains("TCR") & !starts_with("RCTM"))

str(tcr_gene_sets2)