r study
r author
r format(Sys.time(), '%d %B, %Y')
ewas.summary$parameters
For continuous or ordinal variables, the "mean" column provides the mean and the "var" column the standard deviation of the variable. For categorical variables, the "mean" column provides the number of samples with the given "value" and the "var" column the percentage of samples with the given "value".
knitr::kable(ewas.summary$sample.characteristics)
out <- NULL if (!is.null(ewas.summary$covariate.associations)) { for (covariate.name in names(ewas.summary$covariate.associations)) out <- c(out, knit_child(file.path(report.path, "ewas-covariate.rmd"))) }
if (!is.null(out)) cat(out, sep="\n\n")
out <- NULL for (plot in ewas.summary$qq.plots) out <- c(out, knit_child(file.path(report.path, "qq-plot.rmd")))
cat(out, sep="\n")
out <- NULL for (plot in ewas.summary$manhattan.plots) out <- c(out, knit_child(file.path(report.path, "manhattan-plot.rmd")))
cat(out, sep="\n")
There were r length(ewas.summary$significant.sites)
CpG sites with association p-values < r ewas.summary$parameters$sig.threshold
.
These are listed in the file associations.csv.
tab <- with(ewas.summary, cpg.stats[match(significant.sites, rownames(cpg.stats)),]) write.csv(tab, file=file.path(opts_knit$get("output.dir"), "associations.csv"))
The following table shows overlaps between associations under different sets of covariates:
p.value.idx <- grep("p.value", colnames(tab)) tab.overlaps <- apply(tab[,p.value.idx,drop=F], 2, function(p.a) { apply(tab[,p.value.idx,drop=F], 2, function(p.b) { sum(p.a < ewas.summary$parameters$sig.threshold & p.b < ewas.summary$parameters$sig.threshold, na.rm=T) }) }) knitr::kable(tab.overlaps)
practical.sites <- names(ewas.summary$cpg.plots) tab <- with(ewas.summary, cpg.stats[match(practical.sites, rownames(cpg.stats)),])
Below are the r length(practical.sites)
CpG sites with association p-values < r ewas.summary$parameters$practical.threshold
in the r ewas.summary$parameters$model
regression model.
knitr::kable(tab[practical.sites,])
Plots of these sites follow, one for each covariate set. "p[lm]" denotes the p-value obtained using a linear model and "p[beta]" the p-value obtained using beta regression.
out <- NULL for (cpg in practical.sites) out <- c(out, knit_child(file.path(report.path, "cpg-plot.rmd")))
cat(out, sep="\n")
Number of CpG sites selected: r length(ewas.summary$selected.sites)
.
tab <- with(ewas.summary, cpg.stats[match(selected.sites, rownames(cpg.stats)),]) knitr::kable(tab)
out <- NULL for (cpg in ewas.summary$selected.sites) out <- c(out, knit_child(file.path(report.path, "cpg-plot.rmd")))
cat(out, sep="\n\n")
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.