SplitCpGDFbyRegion: Split CpG dataframe by Subregion

View source: R/util3_SplitCpGsSubregionsDataFrameToList.R

SplitCpGDFbyRegionR Documentation

Split CpG dataframe by Subregion

Description

Split a dataframe of CpGs and comethylated subregions to a list of CpGs in each subregion

Usage

SplitCpGDFbyRegion(
  CpGsSubregions_df,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  manifest_gr = NULL,
  returnAllCpGs = TRUE
)

Arguments

CpGsSubregions_df

data frame with CpG and subregion number

genome

Human genome of reference: hg19 or hg38

arrayType

Type of array: 450k or EPIC

manifest_gr

A GRanges object with the genome manifest (as returned by ExperimentHub or by ImportSesameData). This function by default ignores this argument in favour of the genome and arrayType arguments.

returnAllCpGs

indicates if outputting all the CpGs in the region when there is not a contiguous comethylated region or only the CpGs in the contiguous comethylated regions

Value

a list of comethylated subregions CpGs for a pre-defined region

Examples

   data(betaMatrix_ex4)
   CpGs_df <- MarkComethylatedCpGs(betaCluster_mat = betaMatrix_ex4)
   CpGsSubregions_df <- FindComethylatedRegions(CpGs_df)

   SplitCpGDFbyRegion(
     CpGsSubregions_df,
     genome = "hg19",
     arrayType = "450k"
   )


TransBioInfoLab/coMethDMR documentation built on Oct. 15, 2024, 12:52 a.m.