addEnrichmentParameters: Enrichment analysis

Description Usage Arguments Value Author(s) See Also Examples

View source: R/qsea.createSet.R

Description

This function analyses the dependency of enrichment on a sequence pattern, based on a subset of windows for which the signal is known.

Usage

1
2
addEnrichmentParameters(qs, enrichmentPattern, signal, windowIdx, 
min_wd=5,bins=seq(.5,40.5,1))

Arguments

qs

The qseaSet object

enrichmentPattern

The name of the pattern, on which the enrichment depends on (usually CpG for methylation analysis). This name must correspond to the name specified in addPatternDensity()

windowIdx

vector of window indices, for which "true" values are known (or can be estimated)

signal

Matrix containing the known (or estimated) values for all samples and all specified windows, as a numeric matrix. These values are expected to be between 0 and 1.

bins

For the enrichment analysis, windows are binned according to pattern density. This parameter specifies the bins.

min_wd

minimal number of windows per bin to be considered

Value

The function returns the qseaSet object, extended by the parameters of the enrichment profiles for all samples

Author(s)

Mathias Lienhard

See Also

plotEnrichmentProfile, addPatternDensity

Examples

1
2
3
4
5
6
7
8
9
qs=getExampleQseaSet(enrichmentAnalysis=FALSE)
#this procedure assumes that regions with low CpG density is 80% methylated
#on average, and regions within CpG islands are 25% methylated on average. 
wd=which(getRegions(qs)$CpG_density>1 &
    getRegions(qs)$CpG_density<15)
signal=(15-getRegions(qs)$CpG_density[wd])*.55/15+.25
signal=matrix(signal,nrow=length(signal),ncol=length(getSampleNames(qs)))
qs=addEnrichmentParameters(qs, enrichmentPattern="CpG", 
    windowIdx=wd, signal=signal)

qsea documentation built on Nov. 8, 2020, 8:28 p.m.