View source: R/CoMethSingleRegion.R
| CoMethSingleRegion | R Documentation | 
Wrapper function to find contiguous and comethyalted sub-regions within a pre-defined genomic region
CoMethSingleRegion(
  CpGs_char,
  dnam,
  betaToM = TRUE,
  rDropThresh_num = 0.4,
  method = c("pearson", "spearman"),
  minCpGs = 3,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  manifest_gr = NULL,
  returnAllCpGs = FALSE
)
| CpGs_char | vector of CpGs in the inputting pre-defined genomic region. | 
| dnam | matrix (or data frame) of beta values, with row names = CpG ids,
column names = sample ids. This should include the CpGs in  | 
| betaToM | indicates if converting methylation beta values mvalues | 
| rDropThresh_num | threshold for min correlation between a cpg with sum of the rest of the CpGs | 
| method | method for computing correlation, can be "pearson" or "spearman" | 
| minCpGs | minimum number of CpGs to be considered a "region".
Only regions with more than  | 
| genome | Human genome of reference hg19 or hg38 | 
| arrayType | Type of array, can be "450k" or "EPIC" | 
| manifest_gr | A GRanges object with the genome manifest (as returned by
 | 
| returnAllCpGs | When there is not a contiguous comethylated region in
the inputing pre-defined region,  | 
A list with two components:
Contiguous_Regions : a data frame with CpG (CpG ID),
Chr (chromosome number), MAPINFO (genomic position),
r_drop (correlation between the CpG with rest of the CpGs),
keep (indicator for co-methylated CpG), keep_contiguous
(index for contiguous comethylated subregion)
CpGs_subregions : lists of CpGs in each contiguous
co-methylated subregion
   data(betasChr22_df)
   CpGsChr22_char <- c(
     "cg02953382", "cg12419862", "cg24565820", "cg04234412", "cg04824771",
     "cg09033563", "cg10150615", "cg18538332", "cg20007245", "cg23131131",
     "cg25703541"
   )
   CoMethSingleRegion(
     CpGs_char = CpGsChr22_char,
     dnam = betasChr22_df
   )
   data(betaMatrix_ex3)
   CpGsEx3_char <- c(
     "cg14221598", "cg02433884", "cg07372974", "cg13419809", "cg26856676",
     "cg25246745"
   )
   CoMethSingleRegion(
     CpGs_char = CpGsEx3_char,
     dnam = t(betaMatrix_ex3),
     returnAllCpGs = TRUE
   )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.