R: Find ChIP-enriched regions on smoothed ExpressionSet
findChersOnSmoothed
R Documentation
Find ChIP-enriched regions on smoothed ExpressionSet
Description
Given an ExpressionSet of smoothed probe intensities, an environment
with the mapping of probes to chromosomes, and a vector of thresholds
for calling genomic sites enriched, this function finds the
'chers' (ChIP-enriched regions)
consisting of enriched genomic positions, with probes mapped to them.
'Adjacent' enriched positions are condensed into a single Cher.
Object of class ExpressionSet holding the
smoothed probe intensities, e.g. the result of function
computeRunningMedians.
probeAnno
environment containing the probe to genome mapping
thresholds
numeric vector of threshold above which smoothed
probe intensities are considered to correspond to enriched
probes. The vector has to be of length equal the number of samples
in smoothedX, with a single threshold for each sample.
allChr
character vector of all chromosomes on which enriched
regions are sought. Every chromosome here has to have probes mapped
to it in the probeAnno environment. By default (NULL)
the chromosomeNames of the probeAnno object are used.
distCutOff
integer; maximum amount of base pairs at which
enriched probes are condensed into one Cher.
minProbesInRow
integer; minimum number of enriched
probes required for a Cher; see details for further
explanation.
cellType
character; name of cell type the data comes from, is
either a. of length one indicating the column of
pData(smoothedX) that holds the cell type OR b. of length one
indicating the common cell type for all samples in the
ExpressionSet OR c. of length equal to ncol(smoothedX)
specifying the cell type of each sample individually.
antibodyColumn
the name or number of the column of the
pData(smoothedX) that holds the description of the antibody
used for each sample. This information is used to annotate found
ChIP-enriched regions accordingly. If NULL (default), the
sampleNames of smoothedX are used.
checkUnique
logical; indicates whether the uniqueness
indicator of probe matches from the probeAnno environment should be
used.
uniqueCodes
numeric; which numeric codes in the chromosome-wise
match-uniqueness elements of the probeAnno environment indicate
uniqueness?
verbose
logical; extended output to STDOUT?
Details
Specifying a minimum number of probes for a Cher (argument
minProbesInRow) guarantees that a Cher is supported by a
reasonable number of measurements in probe-sparse regions.
For example, if there's only one enriched probe within a certain
genomic 1kb region and no other probes can been mapped to that
region, this single probe does arguably not provide enough evidence
for calling this genomic region enriched.
Value
A list of class cherList, holding objects of class cher
that were found on the supplied data.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Ringo)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: RColorBrewer
Loading required package: limma
Attaching package: 'limma'
The following object is masked from 'package:BiocGenerics':
plotMA
Loading required package: Matrix
Loading required package: grid
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Ringo/findChersOnSmoothed.Rd_%03d_medium.png", width=480, height=480)
> ### Name: findChersOnSmoothed
> ### Title: Find ChIP-enriched regions on smoothed ExpressionSet
> ### Aliases: findChersOnSmoothed
> ### Keywords: manip
>
> ### ** Examples
>
> exDir <- system.file("exData",package="Ringo")
> load(file.path(exDir,"exampleProbeAnno.rda"))
> load(file.path(exDir,"exampleX.rda"))
> smoothX <- computeRunningMedians(exampleX, probeAnno=exProbeAnno,
+ modColumn = "Cy5", allChr = "9", winHalfSize = 400)
Chromosome 9 ...
Suz12_vs_total ...
Construction result ExpressionSet...Done.
> chersX <- findChersOnSmoothed(smoothX, probeAnno=exProbeAnno,
+ thresholds=0.45, allChr="9", distCutOff=600, cellType="human")
Sample: Suz12_vs_total.sm ...
Chr: 9 ...> # if (interactive())
> plot(chersX[[1]], smoothX, probeAnno=exProbeAnno, gff=exGFF)
> chersX <- relateChers(chersX, exGFF)
Relating 2 ChIP-enriched regions to GFF:
> as.data.frame.cherList(chersX)
name chr start end cellType
1 human.Suz12_vs_total.sm.chr9.cher1 9 34318954 34319928 human
2 human.Suz12_vs_total.sm.chr9.cher2 9 34579010 34582430 human
antibody
1 Suz12_vs_total.sm
2 Suz12_vs_total.sm
features
1 ENST00000379158 ENST00000379154 ENST00000379155 ENST00000346365 ENST00000337747
2 ENST00000378980 ENST00000351266
maxLevel score
1 1.995891 69.47276
2 1.534150 104.44638
>
>
>
>
>
> dev.off()
null device
1
>