S4 class to store data from differentially expression analysis. It should be compatible with different package and stores the information in a way the methods will work with all of them.
DEGSet(resList, default) DEGSet(resList, default) DEGSetFromEdgeR(object, ...) DEGSetFromDESeq2(object, ...) # S4 method for TopTags DEGSetFromEdgeR(object, default = "shrunken", extras = NULL) # S4 method for DESeqResults DEGSetFromDESeq2(object, default = "shrunken", extras = NULL)
resList | List with results as elements containing log2FoldChange, pvalues and padj as column. Rownames should be feature names. Elements should have names. |
---|---|
default | The name of the element to use by default. |
object | Different objects to be transformed to DEGSet. |
... | Optional parameters of the generic. |
extras | List of extra tables related to the same comparison. |
For now supporting only DESeq2::results()
output.
Use constructor degComps()
to create the object.
The list will contain one element for each comparison done. Each element has the following structure:
DEG table
Optional table with shrunk Fold Change when it has been done.
To access the raw table use deg(dgs, "raw")
, to access the
shrunken table use deg(dgs, "shrunken")
or just deg(dgs)
.
library(DESeq2) dds <- makeExampleDESeqDataSet(betaSD = 1) colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) design(dds) <- ~ condition + treatment dds <- DESeq(dds)#>#>#>#>#>#>#>#>#>#> log2 fold change (MAP): condition B vs A #> Wald test p-value: condition B vs A #> DataFrame with 1000 rows and 6 columns #> baseMean log2FoldChange lfcSE stat pvalue padj #> <numeric> <numeric> <numeric> <numeric> <numeric> <numeric> #> gene254 1297.34 2.416 0.2767 8.505 1.823e-17 1.741e-14 #> gene174 245.74 2.585 0.3269 7.912 2.542e-15 1.214e-12 #> gene878 51.98 -2.893 0.3671 -7.671 1.702e-14 5.417e-12 #> gene631 55.75 -2.360 0.3152 -7.310 2.678e-13 6.393e-11 #> gene253 54.27 -2.559 0.3548 -6.885 5.784e-12 1.105e-09 #> ... ... ... ... ... ... ... #> gene843 0.3203 2.060e-01 0.3454 0.36759 0.7132 NA #> gene846 0.6453 5.378e-05 0.4370 0.09192 0.9268 NA #> gene863 0.3218 -1.137e-01 0.3454 -0.34644 0.7290 NA #> gene928 0.4599 2.198e-01 0.3642 0.59410 0.5524 NA #> gene974 0.4876 1.170e-01 0.3666 0.35872 0.7198 NA#> # A tibble: 1,000 x 7 #> gene baseMean log2FoldChange lfcSE stat pvalue padj #> * <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 gene254 1297.34 2.416 0.2767 8.505 1.823e-17 1.741e-14 #> 2 gene174 245.74 2.585 0.3269 7.912 2.542e-15 1.214e-12 #> 3 gene878 51.98 -2.893 0.3671 -7.671 1.702e-14 5.417e-12 #> 4 gene631 55.75 -2.360 0.3152 -7.310 2.678e-13 6.393e-11 #> 5 gene253 54.27 -2.559 0.3548 -6.885 5.784e-12 1.105e-09 #> 6 gene78 154.21 2.322 0.3257 6.798 1.059e-11 1.686e-09 #> 7 gene796 70.54 1.730 0.2650 6.625 3.471e-11 4.735e-09 #> 8 gene114 107.95 -2.000 0.3032 -6.361 1.999e-10 2.386e-08 #> 9 gene80 667.61 1.542 0.2439 6.249 4.121e-10 4.373e-08 #> 10 gene529 32.77 -2.128 0.3445 -6.072 1.261e-09 1.205e-07 #> # ... with 990 more rows