Function to get the features that are significant according to some thresholds from a DEGSet, DESeq2::DESeqResults and edgeR::topTags.
significants(object, ...) # S4 method for DEGSet significants(object, padj = 0.05, fc = 0, direction = NULL, full = FALSE, ...) # S4 method for DESeqResults significants(object, padj = 0.05, fc = 0, direction = NULL, full = FALSE, ...) # S4 method for TopTags significants(object, padj = 0.05, fc = 0, direction = NULL, full = FALSE, ...) # S4 method for list significants(object, padj = 0.05, fc = 0, direction = NULL, full = FALSE, newFDR = FALSE, ...)
object | |
---|---|
... | Passed to deg. Default: value = NULL. Value can be 'raw', 'shrunken'. |
padj | Cutoff for the FDR column. |
fc | Cutoff for the log2FC column. |
direction | Whether to take down/up/ignore. Valid arguments are down, up and NULL. |
full | Whether to return full table or not. |
newFDR | Whether to recalculate the FDR or not. See https://support.bioconductor.org/p/104059/#104072. Only used when a list is giving to the method. |
library(DESeq2) library(dplyr) dds <- makeExampleDESeqDataSet(betaSD=1) colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) design(dds) <- ~ condition + treatment dds <- DESeq(dds)#>#>#>#>#>#>#>#>#>significants(res, full = TRUE) %>% head#> # A tibble: 6 x 3 #> gene log2FoldChange_condition_A_vs_B padj_condition_A_vs_B #> <chr> <dbl> <dbl> #> 1 gene1 1.76 0.00486 #> 2 gene1000 -1.47 0.00368 #> 3 gene103 2.43 0.000800 #> 4 gene111 -1.16 0.00191 #> 5 gene118 -1.54 0.00000465 #> 6 gene124 -1.44 0.00347significants(res, full = TRUE, padj = 1) %>% head # all genes#> # A tibble: 6 x 5 #> gene log2FoldChange_c… log2FoldChange_… padj_condition_… padj_treatment_… #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 gene1 1.76 -0.0560 0.00486 0.997 #> 2 gene10 -0.588 -0.0963 0.193 0.981 #> 3 gene100 -0.138 -0.693 0.774 0.432 #> 4 gene1000 -1.47 -0.315 0.00368 0.981 #> 5 gene101 0.793 0.193 0.304 0.981 #> 6 gene102 -0.504 -0.378 0.201 0.887