add_sources: Add sample source information for meta-analysis.

View source: R/add_source.R

add_sourcesR Documentation

Add sample source information for meta-analysis.

Description

User selects a tissue source for each contrast and indicates any sources that should be paired. This step is required if you would like to perform source-specific effect-size/pathway meta-analyses.

Usage

add_sources(diff_exprs, data_dir = getwd(), postfix = NULL)

Arguments

diff_exprs

Previous result of diff_expr, which can be reloaded using load_diff.

data_dir

String specifying directory of GSE folders.

postfix

Optional string to append to saved results. Useful if need to run multiple meta-analyses on the same series but with different contrasts.

Details

The Sources tab is used to add a source for each contrast. To do so: click the relevant contrast rows, search for a source in the Sample source dropdown box, and then click the Add button.

The Pairs tab is used to indicate sources that should be paired (treated as the same source for subsequent effect-size and pathway meta-analyses). To do so: select at least two sources from the Paired sources dropdown box, and then click the Add button.

For each GSE, analysis results with added sources/pairs are saved in the corresponding GSE folder (in data_dir) that was created by get_raw.

Value

Same as diff_expr with added slots for each GSE in diff_exprs:

sources

Named vector specifying selected sample source for each contrast. Vector names identify the contrast.

pairs

List of character vectors indicating tissue sources that should be treated as the same source for subsequent effect-size and pathway meta-analyses.

Examples

library(lydata)

# load result of previous call to diff_expr:
data_dir  <- system.file("extdata", package = "lydata")
gse_names <- c("GSE9601", "GSE34817")
anals     <- load_diff(gse_names, data_dir)

# run shiny GUI to add tissue sources
# anals <- add_sources(anals, data_dir)


alexvpickering/crossmeta documentation built on May 23, 2024, 5:06 a.m.