Find contiguous comethylated regions based on output file from function MarkComethylatedCpGs

FindComethylatedRegions(CpGs_df, minCpGs_int = 3)

Arguments

CpGs_df

an output dataframe from function MarkComethylatedCpGs, with variables: CpG, keep, ind, r_drop. See details in documentation for MarkComethylatedCpGs.

minCpGs_int

an integer indicating the minimum number of CpGs for output genomic regions

Value

A data frame with variables ProbeID and Subregion (index for each output contiguous comethylated region)

Examples

   data(betaMatrix_ex4)

   CpGs_df <- MarkComethylatedCpGs(betaCluster_mat = betaMatrix_ex4)

   FindComethylatedRegions(CpGs_df)
#>       ProbeID Subregion
#> 1  cg05076221         1
#> 2  cg23936031         1
#> 3  cg02248486         1
#> 4  cg25866143         1
#> 5  cg09549073         1
#> 6  cg01370449         1
#> 7  cg04863892         1
#> 8  cg19759481         1
#> 9  cg12128839         1
#> 10 cg02916332         1
#> 11 cg17569124         1
#> 12 cg02005600         1
#> 13 cg25307665         1
#> 14 cg14014955         1
#> 15 cg02646423         1
#> 17 cg23204968         2
#> 18 cg05835726         2
#> 19 cg14058329         2
#> 20 cg03207666         2
#> 21 cg13512268         2
#> 22 cg23454797         2
#> 23 cg12015737         2
#> 24 cg08070327         2
#> 25 cg25506432         2
#> 26 cg14658493         2
#> 27 cg19196335         2
#> 28 cg09880291         2
#> 29 cg24389585         2
#> 30 cg16997642         2
#> 31 cg20817131         2
#> 32 cg14013695         2
#> 33 cg25390165         2
#> 34 cg01323381         2
#> 36 cg05774699         3
#> 37 cg26023912         3
#> 38 cg14882265         3
#> 39 cg17432857         3
#> 40 cg00969405         3
#> 41 cg07049592         3
#> 42 cg02106682         3
#> 43 cg03368099         3
#> 44 cg01748892         3
#> 45 cg13694927         3
#> 46 cg03744763         3
#> 47 cg27151303         3
#> 48 cg05579037         3
#> 49 cg21641458         3
#> 50 cg09343092         3
#> 51 cg18931036         3
#> 52 cg24040595         3