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, ...)

Arguments

object

DEGSet

...

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.

Examples

library(DESeq2) library(dplyr) dds <- makeExampleDESeqDataSet(betaSD=1) colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) design(dds) <- ~ condition + treatment dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("treatment_B_vs_A", c("condition", "A", "B")))
#> Doing 2 element(s).
#> Doing results() for each element.
#> Doing lcfSrink() for each element.
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.00347
significants(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