Description Usage Arguments Details Value Methods Examples
Find regions with a significant accumulation of reads in a sequencing experiment.
1 2 3 | enrichedRegions(sample1, sample2, regions, minReads=10, mappedreads,
pvalFilter=0.05, exact=FALSE, p.adjust.method='none', twoTailed=FALSE,
mc.cores=1)
|
sample1 |
Either start and end of sequences in sample 1 ( |
sample2 |
Same for sample 2. Can be left missing. |
regions |
If specified, the analysis is restricted to the regions
indicated in |
minReads |
The regions to be tested for enrichment are those with coverage
greater or equal than |
mappedreads |
Number of mapped reads for the sample. Has to be of class integer. Will be used to compute RPKM. |
pvalFilter |
Only regions with P-value below |
exact |
If set to TRUE, an exact test is used whenever
some expected cell counts are 5 or less
(chi-square test based on permutations if |
p.adjust.method |
P-value adjustment method, passed on to
|
twoTailed |
If set to FALSE, only regions with a higher
concentration of reads in sample 1 than in sample 2 are reported. If
set to TRUE, regions with higher concentration of sample 2 reads are
also reported. Ignored if |
mc.cores |
If |
The calculations depend on whether sample2
is missing or not.
Non-missing sample2
case.
First, regions with coverage above minReads
are
selected. Second, the number of reads falling in the selected regions
are computed for sample 1 and sample 2.
Third, the counts are compared via a chi-square test (with Yates
continuity correction), which takes into
account the total number of sequences in each sample.
Finally, statistically significant regions are selected and returned
in RangedData
or list
objects.
Missing sample2
. First, regions with coverage above minReads
are selected.
Second, the number of reads in sample 1 falling in the selected regions is computed.
Third, the proportion of reads in each region is tested for enrichment via a one-tailed Binomial exact test.
Object of class RangedData
indicating the significantly enriched regions, the number of reads in
each sample for those regions, the fold changes (adjusted considering
the overall number of sequences in each sample) and the chi-square
test P-values.
signature(sample1 = "missing", sample2 =
"missing", regions = "RangedData")
ranges(regions)
indicates the chromosome, start and end of genomic regions, while values{regions}
should
indicate the observed number of reads for each group in each
region. enrichedRegions
tests the null hypothesis that the
proportion of reads in the region is equal across all groups via a
likelihood-ratio test (or permutation-based chi-square for regions
where the expected counts are below 5 for some group).
signature(sample1 = "list", sample2 =
"missing", regions = "missing")
Each element in sample1
contains the read
start/end of an individual sample. enrichedRegions
identifies
regions with high concentration of reads (across all samples) and
then compares the counts across groups using a likelihood-ratio test
(or permutation-based chi-square for regions
where the expected counts are below 5 for some group).
signature(sample1 = "RangedData", sample2 = "RangedData",
regions = "missing")
space(sample1)
indicates the chromosome, start(sample1)
and
end(sample1)
the start/end position of the reads. Similarly for
sample2
. enrichedRegions
identifies regions with high
concentration of reads (across all samples) and then compares the
counts across groups using a likelihood-ratio test (or
permutation-based chi-square for regions where the expected counts are
below 5 for some group).
signature(sample1 = "RangedData", sample2 = "missing",
regions = "missing")
space(sample1)
indicates the chromosome, start(sample1)
and end(sample1)
the start/end position of the reads.
enrichedRegions
tests the null hypothesis that an unusually high proportion of reads has been
observed in the region using an exact binomial test.
1 2 3 4 5 6 7 8 | set.seed(1)
st <- round(rnorm(1000,500,100))
strand <- rep(c('+','-'),each=500)
space <- rep('chr1',length(st))
sample1 <- RangedData(IRanges(st,st+38),strand=strand,space=space)
st <- round(rnorm(1000,1000,100))
sample2 <- RangedData(IRanges(st,st+38),strand=strand,space=space)
enrichedRegions(sample1,sample2,twoTailed=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.