get_de_data: Aggregate and retrieve data from multiple differentially...

Description Usage Arguments Value See Also Examples

Description

This function finds the union or intersection of DE gene names for all result sets provided, extracts those rows from all DE result sets, and merges the values into a single data set containing log2 fold-change or padj values.

Usage

1
2
get_de_data(res_list, method = "union", type = "lfc",
  lfc_filter = FALSE)

Arguments

res_list

A list of DESeq result sets created with DESeq2::results(). I.E: list(res1, res2, ..., resN).

method

Method for aggregating data. "union" will gather expression data for all samples in results list when a gene is differentially expressed in at least one sample. "intersection" will gather expression data only for genes that are DE in all samples of the result list.

type

Type of data to retrieve. Options are "lfc" (log2foldchange) and "padj" (adjusted p-value).

lfc_filter

Filter genes based on a minimum log fold-change as initialized in init_cutoffs(). Boolean. Default=FALSE.

Value

Returns the aggregated data frame containing fold-change or p-values for the provided result sets.

See Also

init_cutoffs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 

#Prepare a result list for aggregation.
res.day1 <- results(dds, contrast=c("Condition_Time", "day1_disease", "day1_control"))
res.day2 <- results(dds, contrast=c("Condition_Time", "day2_disease", "day2_control"))
res.day3 <- results(dds, contrast=c("Condition_Time", "day3_disease", "day3_control"))
myResList <- list(res.day1, res.day2, res.day3)


/*
 * Data for all result sets will be included for each gene if that gene was found to be
 * differentially expressed in at least one of the provided result sets.
 * Filter based on a minimum fold-change.
 */
aggregated_lfc_union  <- get_de_data(res_list=myResList, method="union",
                                      type="lfc", lfc_filter=TRUE)
aggregated_pval_union <- get_de_data(res_list=myResList, method="union",
                                      type="padj", lfc_filter=TRUE)


/*
 * Data for all result sets will be included for each gene only if that gene was found to
 * be differentially expressed in all provided result sets. Do not apply a fold-change filter.
 * Significance is determined only by p-value threshold.
 */
aggregated_lfc_intersect  <- get_de_data(res_list=myResList, method="intersection",
                                          type="lfc", lfc_filter=FALSE)
aggregated_pval_intersect <- get_de_data(res_list=myResList, method="intersection",
                                          type="padj", lfc_filter=FALSE)


## End(Not run)

DEVis documentation built on May 2, 2019, 3:18 p.m.