This obtains the sample variables of a HermesData object together
with selected gene information.
Usage
col_data_with_genes(object, assay_name, genes)
Arguments
- object
(AnyHermesData)
input experiment.
- assay_name
(string)
which assay to use.
- genes
(GeneSpec)
which genes or which gene signature should be extracted.
Value
The combined data set, where the additional attribute gene_cols contains
the names of the columns obtained by extracting the genes information.
Note
The class of the returned data set will depend on the class of colData, so usually
will be S4Vectors::DFrame.
Examples
result <- col_data_with_genes(hermes_data, "counts", gene_spec("GeneID:1820"))
tail(names(result))
#> [1] "COHORT" "TTYPE" "STDSSDY"
#> [4] "low_depth_flag" "tech_failure_flag" "GeneID.1820"
result$GeneID.1820
#> [1] 49 153 94 54 111 567 118 171 180 16 386 57 242 73 362 144 124 243 79
#> [20] 161