R/CpGsInfoAllRegions.R
CpGsInfoAllRegions.Rd
Test associations of individual CpGs in multiple genomic regions with a continuous phenotype
vector of character strings with location info for
all the genomic regions. Each region should be specified in this format:
"chrxx:xxxxxx-xxxxxx"
An object of class GRanges
with location information for the regions. If this argument is NULL, then
the regions in AllRegionNames_char
are used. If this argument is not
NULL, then region_gr
will overwrite any supplied ranges in
AllRegionNames_char
.
data frame of beta values for all genomic regions, with row names = CpG IDs amd column names = sample IDs
a data frame with phenotype and covariate variables, with variable "Sample" for sample IDs.
character string of the continuous phenotype to be tested against methylation values
character vector of covariate variables names
human genome of reference hg19 (default) or hg38
Type of array, can be "450k" or "EPIC"
a data frame with locations of the genomic region (Region), CpG ID (cpg), chromosome (chr), position (pos), results for testing association of methylation in individual CpGs with the continuous phenotype (slopeEstimate, slopePval), UCSC_RefGene_Name, UCSC_RefGene_Accession, and UCSC_RefGene_Group
data(betasChr22_df)
data(pheno_df)
AllRegionNames_char <- c(
"chr22:18267969-18268249",
"chr22:18531243-18531447"
)
CpGsInfoAllRegions(
AllRegionNames_char,
betas_df = betasChr22_df,
pheno_df = pheno_df,
contPheno_char = "stage",
covariates_char = c("age.brain", "sex")
)
#> snapshotDate(): 2021-05-18
#> see ?sesameData and browseVignettes('sesameData') for documentation
#> Region cpg chr pos slopeEstimate slopePval
#> 1 chr22:18267969-18268249 cg18370151 chr22 18267969 -0.0078 0.6911
#> 2 chr22:18267969-18268249 cg12460175 chr22 18268062 -0.0393 0.3230
#> 3 chr22:18267969-18268249 cg14086922 chr22 18268239 -0.0779 0.0586
#> 4 chr22:18267969-18268249 cg21463605 chr22 18268249 -0.1005 0.0264
#> 5 chr22:18531243-18531447 cg25257671 chr22 18531243 -0.0617 0.1918
#> 6 chr22:18531243-18531447 cg06961233 chr22 18531385 -0.0512 0.2291
#> 7 chr22:18531243-18531447 cg08819022 chr22 18531447 -0.1009 0.1108
#> UCSC_RefGene_Name UCSC_RefGene_Accession UCSC_RefGene_Group
#> 1
#> 2
#> 3
#> 4
#> 5
#> 6
#> 7