Generate a tidy table with the results of DESeq2
deseqresult2df(res_de, FDR = NULL)
A tidy data.frame
with the results from differential expression,
sorted by adjusted p-value. If FDR is specified, the table contains only genes
with adjusted p-value smaller than the value.
data(res_de_macrophage, package = "GeneTonic")
head(res_macrophage_IFNg_vs_naive)
#> log2 fold change (MLE): condition IFNg vs naive
#> Wald test p-value: condition IFNg vs naive
#> DataFrame with 6 rows and 7 columns
#> baseMean log2FoldChange lfcSE stat pvalue
#> <numeric> <numeric> <numeric> <numeric> <numeric>
#> ENSG00000000003 171.571 -0.2822450 0.3005710 0.00000 1.00000e+00
#> ENSG00000000419 967.751 0.0391223 0.0859708 0.00000 1.00000e+00
#> ENSG00000000457 682.433 1.2846179 0.1969067 1.44545 1.48333e-01
#> ENSG00000000460 262.963 -1.4718762 0.2186916 -2.15772 3.09493e-02
#> ENSG00000000938 2660.102 0.6754781 0.2360530 0.00000 1.00000e+00
#> ENSG00000000971 3052.123 4.9871107 0.4964284 8.03159 9.62155e-16
#> padj SYMBOL
#> <numeric> <character>
#> ENSG00000000003 1.00000e+00 TSPAN6
#> ENSG00000000419 1.00000e+00 DPM1
#> ENSG00000000457 1.00000e+00 SCYL3
#> ENSG00000000460 4.09728e-01 C1orf112
#> ENSG00000000938 1.00000e+00 FGR
#> ENSG00000000971 1.37057e-13 CFH
res_df <- mosdef::deresult_to_df(res_macrophage_IFNg_vs_naive)
head(res_df)
#> id baseMean log2FoldChange lfcSE stat
#> ENSG00000125347 ENSG00000125347 30585.0749 5.560124 0.2182663 20.89248
#> ENSG00000162645 ENSG00000162645 36790.5921 6.665804 0.2865732 19.77088
#> ENSG00000111181 ENSG00000111181 688.5779 4.710592 0.1961023 18.92172
#> ENSG00000174944 ENSG00000174944 1324.3975 9.863904 0.4715127 18.79886
#> ENSG00000100336 ENSG00000100336 2551.4789 8.708551 0.4214096 18.29230
#> ENSG00000145365 ENSG00000145365 3637.2221 5.193448 0.2368542 17.70476
#> pvalue padj SYMBOL
#> ENSG00000125347 6.268470e-97 1.116164e-92 IRF1
#> ENSG00000162645 5.304222e-87 4.722349e-83 GBP2
#> ENSG00000111181 7.555181e-80 4.484252e-76 SLC6A12
#> ENSG00000174944 7.715124e-79 3.434388e-75 P2RY14
#> ENSG00000100336 9.530829e-75 3.394119e-71 APOL4
#> ENSG00000145365 3.853076e-70 1.143465e-66 TIFA