Learn R Programming

IMAGE (version 1.0)

image: High-powered detection of genetic effects on DNA methylation

Description

Perform high-powered detection of genetic effects on DNA methylation using integrated methylation QTL (methylation quantitative-trait locus) mapping and allele-specific analysis.

Usage

image(geno, data, K, Covariates = NULL, numCore = 1,
  fit.maxiter = 500, fit.tol = 1e-05, verbose = TRUE)

Arguments

geno

a data list containing the genotype data

data

a data list containing the methylation data

K

a known kinship matrix. This matrix should be a positive semi-definite matrix with dimensions equal to the sample size

Covariates

a matrix containing the covariates subject to adjustment (Default = NULL)

numCore

a positive integer specifying the number of cores for parallel computing (default = 1)

fit.maxiter

a positive integer specifying the maximum number of iterations when fitting the generalized linear mixed model (default = 500)

fit.tol

a positive number specifying tolerance, the difference threshold for parameter estimates below which iterations should be stopped (default = 1e-5)

verbose

include verbose output

Value

A data.frame containing the following named elements:

  • loc: ordinal number of SNP-CpG pair being analyzed

  • numIDV: number of observations of SNP-CpG pair being analyzed

  • beta: the fixed effect parameter estimate for the predictor of interest

  • se_beta: the standard deviation of fixed effect

  • pvalue: P value for the fixed effect, based on the Wald test

  • h2: heritability of the transformed rate

  • sigma2: total variance component

  • converged: a logical indicator for convergence

  • time: time to converge

References

Fan, Y., Vilgalys, T.P., Sun, S., Peng, Q., Tung, J. and Zhou, X., 2019. High-powered detection of genetic effects on DNA methylation using integrated methylation QTL mapping and allele-specific analysis. bioRxiv, p.615039.

Examples

Run this code
# NOT RUN {
# This example demonstrates IMAGE:
# }
# NOT RUN {
  data(ExampleData)
  geno <- ExampleData$geno
  K <- ExampleData$K
  data <- ExampleData$data
  res=image(geno,data,K)
# }
# NOT RUN {
# }
# NOT RUN {
  # We've saved the results of the example above to show an example of
  # the outputs IMAGE produces:
  data(example_results)
# }
# NOT RUN {
# Toy example for testing purposes only:

geno <- list()
geno$hap1 = matrix(sample(c(0,1),25, replace = TRUE, prob = c(0.6,0.4)),
                    nrow = 5, ncol = 5)
geno$hap2 = matrix(sample(c(0,1),25, replace = TRUE, prob = c(0.6,0.4)),
                    nrow = 5, ncol = 5)

data <- list()
data$r = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)
data$y = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)
data$r1 = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)
data$r2 = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)
data$y1 = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)
data$y2 = matrix(sample(0:50,25, replace = TRUE), nrow = 5, ncol = 5)

K = matrix(runif(25,-0.1,0.1), nrow = 5, ncol = 5)

res=image(geno,data,K)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab