View source: R/MarkComethylatedCpGs.R
MarkComethylatedCpGs | R Documentation |
Mark CpGs in contiguous and co-methylated region
MarkComethylatedCpGs(
betaCluster_mat,
betaToM = TRUE,
epsilon = 1e-08,
rDropThresh_num = 0.4,
method = c("pearson", "spearman"),
use = "complete.obs"
)
betaCluster_mat |
matrix of beta values, with rownames = sample ids and
column names = CpG ids. Note that the CpGs need to be ordered by their
genomic positions, this can be accomplished by the
|
betaToM |
indicates if beta values should be converted to M values before computing correlations. Defaults to TRUE. |
epsilon |
When transforming beta values to M values, what should be done
to values exactly equal to 0 or 1? The M value transformation would yield
|
rDropThresh_num |
threshold for minimum correlation between a cpg with the rest of the CpGs. Defaults to 0.4. |
method |
correlation method; can be "pearson" or "spearman" |
use |
method for handling missing values when calculating the
correlation. Defaults to |
An outlier CpG in a genomic region will typically have low
correlation with the rest of the CpGs in a genomic region. On the other
hand, in a cluster of co-methylated CpGs, we expect each CpG to have high
correlation with the rest of the CpGs. The r.drop
statistic is used
to identify these co-methylated CpGs here.
A data frame with the following columns:
CpG
: CpG ID
keep
: The CpGs with keep = 1
belong to the
contiguous and co-methylated region
ind
: Index for the CpGs
r_drop
: The correlation between each CpG with the sum of
the rest of the CpGs
data(betaMatrix_ex1)
MarkComethylatedCpGs(
betaCluster_mat = betaMatrix_ex1,
betaToM = FALSE,
method = "pearson"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.