Description Usage Arguments Value Examples
calculates the total percentage of (normalized) counts for a subset of selected genes
1 2 3 4 5 6 7 | addGenesPerc(
gobject,
expression_values = c("normalized", "scaled", "custom"),
genes = NULL,
vector_name = "gene_perc",
return_gobject = TRUE
)
|
gobject |
giotto object |
expression_values |
expression values to use |
genes |
vector of selected genes |
vector_name |
column name as seen in pDataDT() |
return_gobject |
boolean: return giotto object (default = TRUE) |
giotto object if return_gobject = TRUE, else a vector with
1 2 3 4 5 6 7 8 9 10 11 12 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.