Description Usage Arguments Details Value Author(s) See Also Examples
Correlation between methylation and expression
1 2 3 4 |
sample_id |
a vector of sample id |
expr |
expression matrix in which columns correspond to sample ids |
txdb |
a |
chr |
a single chromosome |
extend |
extension of gene model, both upstream and downstream |
cov_filter |
if |
cor_method |
method to calculate correlation |
factor |
classes of samples |
window_size |
number of CpGs in a window |
max_width |
maximum width of a window |
raw_meth |
whether use raw methylation value (values from |
cov_cutoff |
cutoff for coverage |
min_dp |
minimal non-NA values for calculating correlations |
col |
color for classes |
The detection for correlated regions is gene-centric. For every gene, the process are as follows:
extend to both upstream and downstream
from the most upstream, use a sliding window which contains windows_size
CpG sites
filter each window by CpG coverage (by cov_filter
and cov_cutoff
)
calculate correlation between methylation and gene expression for this window
Following meth columns are attached to the GRanges
objects:
number of CpG sites
mean methylation in each window in every sample.
correlation
p-value for the correlation test
IQR of mean methylation if factor
is not set
p-value from oneway ANOVA test if factor
is set
range between maximum mean and minimal mean in all subgroups if factor
is set
gene id
distance to tss of genes
if genes have multiple transcripts, this is the distance to the nearest transcript
transcript id of the nearest transcript
This function keeps all the information for all CpG windows. Users can get filter_correlated_regions
to get correlated regions
with significant correlations and use reduce_cr
to merge neighbouring windows.
Since information for all CpG windows are kept, the size of the object is always very huge, thus, it is reasonable to analyze each chromosome separately and save each object as a single file. Some downstream functions expect a formatted path of the cr file.
A GRanges
object which contains associated statistics for every CpG windows.
Zuguang Gu <z.gu@dkfz.de>
filter_correlated_regions
, reduce_cr
1 2 | # There is no example
NULL
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.