addGenesPerc
¶
addGenesPerc
Description¶
calculates the total percentage of (normalized) counts for a subset of selected genes
Usage¶
addGenesPerc(
gobject,
expression_values = c("normalized", "scaled", "custom"),
genes = NULL,
vector_name = "gene_perc",
return_gobject = TRUE
)
Arguments¶
Argument |
Description |
---|---|
|
giotto object |
|
expression values to use |
|
vector of selected genes |
|
column name as seen in pDataDT() |
|
boolean: return giotto object (default = TRUE) |
Value¶
giotto object if return_gobject = TRUE, else a vector with % results
Examples¶
data(mini_giotto_single_cell)
# select genes (e.g. Rpl or mitochondrial)
random_genes = sample(slot(mini_giotto_single_cell, 'gene_ID'), 5)
# calculate percentage of those selected genes per cells/spot
updated_giotto_object = addGenesPerc(mini_giotto_single_cell,
genes = random_genes,
vector_name = 'random_gene_perc')
# visualize result in data.table format
pDataDT(updated_giotto_object)