This function creates a new variable indicating DEGs as -1, 0, 1 based on the
user-defined foldchange and p-value criteria
deg_def(diffexp, pcriteria, foldchangecol, pv, fc)
Arguments
- diffexp
data.frame/data.table with differential expression results
- pcriteria
column name of the pvalue variable <strings>
- foldchangecol
column name of the foldchange variable <string>
- pv
pvalue threshold <double>
- fc
foldchange threshold <double>
Value
data.table/data.frame with a new deg variable
Examples
data(diffexplist)
diffexp <- deg_def(diffexplist[[1]], "pvalue", "Log2FC", 0.05, 0)
table(diffexp[['deg']])
#>
#> -1 0 1
#> 1190 4458 925