CreateOutputDF: Create Output Dataframe

View source: R/CreateOutputDF.R

CreateOutputDFR Documentation

Create Output Dataframe

Description

Create Output Dataframe

Usage

CreateOutputDF(
  keepCpGs_df,
  keepContiguousCpGs_df,
  CpGsOrdered_df,
  returnAllCpGs = FALSE
)

Arguments

keepCpGs_df

a data frame with CpG = CpG name, keep = indicator for co-methylated CpGs, and r_drop = correlation between the CpG with rest of the CpGs

keepContiguousCpGs_df

a data frame with ProbeID = CpG name and Subregion = contiguous comethylated subregion number

CpGsOrdered_df

a data frame of CpG location with chr = chromosome number, pos = genomic position, and cpg = CpG name

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 data frame with CpG = CpG name, Chr = chromosome number, MAPINFO = genomic position, r_drop = correlation between the CpG with rest of the CpGs, keep = indicator for co-methylated CpG, and keep_contiguous = contiguous comethylated subregion number

Examples

   data(betasChr22_df)
   CpGsChr22_char <- c(
     "cg02953382", "cg12419862", "cg24565820", "cg04234412", "cg04824771",
     "cg09033563", "cg10150615", "cg18538332", "cg20007245", "cg23131131",
     "cg25703541"
   )
      
   CpGsOrdered_df <- OrderCpGsByLocation(
      CpGsChr22_char, arrayType="450k", output = "dataframe"
   )
   betaCluster_mat <- t(betasChr22_df[CpGsOrdered_df$cpg, ])
   keepCpGs_df <- MarkComethylatedCpGs(betaCluster_mat = betaCluster_mat)
   keepContiguousCpGs_df <- FindComethylatedRegions(CpGs_df = keepCpGs_df)
   CreateOutputDF(keepCpGs_df, keepContiguousCpGs_df, CpGsOrdered_df)
   

TransBioInfoLab/coMethDMR documentation built on Sept. 14, 2022, 7:09 p.m.