select_genes: Select genes based on variance

Description Usage Arguments Value Examples

View source: R/filter.R

Description

Select genes based on variance

Usage

1
select_genes(expr, n_genes, filter_pval = 0.1)

Arguments

expr

A data.frame containing expression values

n_genes

(Optional) Number of genes to be selected

filter_pval

P-value cutoff for gene selection

Value

A vector containing the names of selected genes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Get example expression data
data(expr0)
# Filter genes
expr_f <- filter_genes(expr0)
# Check selected genes
expr_f[1:5, 1:5]
# Filter genes and apply variance stabilizing transformation
expr_f2 <- filter_genes(expr0, apply_vst=TRUE)
# Check results
expr_f2[1:5, 1:5]
# Selected genes
selected <- select_genes(expr_f2)
# Get data.frame with only selected genes
expr_s <- expr_f2[selected, ]
# Check results
expr_s[1:5, 1:5]

Example output

Warning message:
replacing previous importggplot2::annotatebyggpmisc::annotatewhen loadingCEMiToolX1913_d0 X1913_d3 X1913_d7 X1911_d0 X1911_d3
HBB     13.19873 14.92036 14.98221 13.78113 14.76081
HBA2    13.76894 14.96412 14.98703 13.67176 14.78928
KRT123P 12.92786 14.79587 14.83737 13.52328 14.66080
HBA1    12.16379 14.86128 14.87355 12.31662 14.38398
DUSP1   12.92282 13.84120 14.04626 13.20706 13.69986
        X1913_d0 X1913_d3 X1913_d7 X1911_d0 X1911_d3
HBB     13.19873 14.92036 14.98221 13.78113 14.76081
HBA2    13.76894 14.96412 14.98703 13.67176 14.78928
KRT123P 12.92786 14.79587 14.83737 13.52328 14.66080
HBA1    12.16379 14.86128 14.87355 12.31662 14.38398
DUSP1   12.92282 13.84120 14.04626 13.20706 13.69986
          X1913_d0  X1913_d3 X1913_d7 X1911_d0 X1911_d3
HBA1      12.16379 14.861276 14.87355 12.31662 14.38398
RPS26     11.13540  9.663552  9.62106 12.06424 12.15919
LYZ       11.56361 12.413904 11.29802 12.85029 12.31579
PPBP      12.61296 12.955377 13.82550 12.02593 10.84787
abParts35 11.50589 11.699947 11.43535 11.30181 12.22802

CEMiTool documentation built on March 13, 2021, 2 a.m.