RcadeAnalysis: Rcade Analysis

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/RcadeAnalysis.R

Description

The main function in Rcade - reads in DE information, processes ChIP data from raw .bam files, and then combines the two to form an Rcade object.

Usage

1
RcadeAnalysis(DE, ChIPannoZones, annoZoneGeneidName, ChIPtargets, ChIPfileDir, cl, DElookup, DE.prior = NULL, prior.mode="assumeIndependent", prior=NULL, ...)

Arguments

DE

Data.frame - DE summary information for genes of interest. For example, output from limma. EITHER DE must have column names "geneID", "logfc" and "B" (case insensitive) OR you should specify DElookup.

ChIPannoZones

GRanges specifying the bins of interest, with a column in the metadata for the geneID.

annoZoneGeneidName

character - the name of the column in ChIPannoZones's metadata corresponding to geneID.

ChIPtargets

Data.frame - Information about the ChIP data files. Mandatory column names are: "fileid", "sampleid", "factor", "filepath".

ChIPfileDir

character - Directory, within which "filepath" of ChIPtargets is evaluated.

cl

A cluster from makeCluster in the parallel package.

DElookup

list - lookup table of form list(RcadeField1 = DEcolumn1, RcadeField2 = DEcolumn2, ...). If you don't specify this argument, then Rcade will try to find the mandatory fields automatically but will not keep any of the other information in its output.

DE.prior

numeric - The prior probability of DE for each GeneID. Either a scalar, or a vector where the Nth element corresponds to the Nth row of the DE argument. Ignored if prior.mode = "assumeIndependent".

For example, if using DE analysis from the limma package (default settings), then set DE.prior = 0.01.

prior.mode

The method used to create prior probabilities in the Rcade table. Current options are:

assumeIndependent:

Under the prior, ChIP counts and DE log ratios are assumed independent; that is, the prior is of form P(D,C)=P(D)P(C). No need to specify the prior argument.

keepChIP:

The prior is factorized as form P(D,C)=P(D|C)P(C). P(C) is taken from the differential count algorithm used. User must specify the prior argument as c(P(D|C), P(D|not C)).

prior

See prior.mode.

...

Additional arguments.

Details

This is the main analysis function in Rcade. The user should specify information relating to the DE and ChIP data for the experiment in question. Rcade will process these data and rank genes by the combined DE and ChIP strength.

Value

An Rcade object.

Author(s)

Jonathan Cairns

See Also

RcadeAnalysis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	dir <- file.path(system.file("extdata", package="Rcade"), "STAT1")

	DE <- read.csv(file.path(dir, "DE.csv"))
	DElookup <- list(GeneID="ENSG", logFC="logFC", B="B",
"Genes.Location", "Symbol")

	targets <- read.csv(file.path(dir, "targets.csv"), as.is = TRUE)
	
	anno <- read.csv(file.path(dir, "anno.csv"))
	anno <- anno[order(anno$chromosome_name),]
	colnames(anno) <- c("ENSG","chr","start","end","str")
	ChIPannoZones <- defineBins(anno, zone=c(-1500, 1500), geneID="ENSG")

	Rcade <- RcadeAnalysis(DE, ChIPannoZones, annoZoneGeneidName="ENSG", ChIPtargets=targets, ChIPfileDir = dir,
	DElookup=DElookup)

Rcade documentation built on Nov. 8, 2020, 6:25 p.m.