Description Usage Arguments Value Examples
View source: R/feature_selection.R
Remove Lowly Expressed Genes From Expression Data
1 2 3 4 5 6 | rm_low_counts(
expr,
count_threshold = NULL,
perc_threshold = NULL,
transpose = FALSE
)
|
expr |
A matrix of gene expression with cells as rows and genes as columns |
count_threshold |
A threshold for the number of counts a gene must have to be included. Only one threshold may be used at a time. |
perc_threshold |
A threshold for what percentile the gene counts should be cut off at. Only one threshold may be used at a time. |
transpose |
A logical value indicating whether the expression matrix should be transposed before any operations are carried out. |
A matrix of gene expressions with the low count genes, as specified by the user, removed.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Creating Data
gene1 <- c(0, 0, 0, 0, 1, 2, 3)
gene2 <- c(5, 5, 3, 2, 0, 0, 0)
gene3 <- c(2, 0, 2, 1, 3, 0, 1)
gene4 <- c(3, 3, 3, 3, 3, 3, 3)
gene5 <- c(0, 0, 0, 0, 5, 0, 0)
gene_counts <- matrix(c(gene1, gene2, gene3, gene4, gene5), ncol = 5)
rownames(gene_counts) <- paste0("cell", 1:7)
colnames(gene_counts) <- paste0("gene", 1:5)
# Removing Low Count Genes
rm_low_counts(gene_counts, count_threshold = 7)
rm_low_counts(gene_counts, perc_threshold = 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.