Description Usage Arguments Details Value Examples
This is the main function of this package. It accepts outputs from other
functions in this package, and integrates statistical methods of signal
smoothing, bump hunting and differential testing, and reports differential
binding regions with estimated significance. It is important that the inputs
are genome-wide bin level read counts, instead of peak level. Also, it is
noted that each read should be only assigned to one bin if multiple
overlapping exists, as done by function regionReads
.
1 2 | diffRegions(count, bins = NULL, meta = NULL, design, sizefac, rccut = 15,
fccut = 0.4, gap = 2, diffmeth = c("DESeq2", "limma", "ttest"))
|
count |
A matrix of read counts or a RangedSummarizedExperiment, where
columns are samples and rows are genome-wide bins. This object can be
generated by function |
bins |
If |
meta |
If |
design |
A formula object which expresses how read counts for each bin
depend on the variables in |
sizefac |
A numeric vector indicating estimated size of samples for
normalization purpose. This vector can be generated by function
|
rccut |
A numeric cutoff on normalized count matrix using
|
fccut |
A numeric cutoff on smoothed log2foldchanges of bins for bump hunting of differtial binding regions. Neighbor bins with fold change larger than this value will be merged together with allowed gaps. (Default: 0.4) |
gap |
A integer specifying the gaps allowed for bin merging, in the unit of number of bins. (Default: 2) |
diffmeth |
Method for statistical testing of differential binding. (Default: 'DESeq2') |
Three methods are provided for significance estimation of differential
binding. DESeq2
allows pseudo-estimation for comparisons without
replicates; otherwise, all methods can be used for comparisons with at least
two replicates. The design
formula can be specified as suggested by
DESeq2
and limma
if these two methods are selected. For
ttest
, design
can either contain one or two components,
referring to student's t-test or paired t-test based on logarithm scaled
data. For consistance with other packages, the last component in
design
formula is the contrast on which the final differential
estimation are reported.
A GRanges object containing potential regions with differential binding, as well as statistical significances as meta columns.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## load sample data
data(complex)
names(complex)
## test sample data
sizefac <- sizeFac(count=complex$counts,plot=TRUE)$sizefac
library(SummarizedExperiment)
se <- SummarizedExperiment(assays=list(counts=complex$counts),
rowRanges=complex$bins,
colData=DataFrame(cond=c("ctr","tre")))
dr <- diffRegions(count=se,design=~cond,sizefac=sizefac)
## return values
dr
hist(width(dr),nclass=30,xlab="region width",
main="Width of potential differential regions")
hist(-log10(dr$pvalue),nclass=30,xlab="-log10 pvalue",
main="Estimated significance")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.