In this report, I will take you through a re-analysis methylation data first described by Kok et al (2015).
In their study, they analysed the DNA methylation patterns of 87 participants of aged 65-75 years with midly elevated Homocysteine levels. THese individuals were randomly asigned to take 400 μg folic acid and 500 μg vitamin B12 per day or a placebo during an intervention period of 2 years.
The platform used in the study is the Illumina Infinium HumanMethylation450k BeadChip assay. The authors used a pipeline based on DMRs (Peters et al, 2017), together with Benjamini-Hochberg(BH) procedure (Benjamini et al, 1995).
The methylation data have been deposited to NCBI GEO repository accession number GSE74548
The main conclusions from the original study were:
Long-term supplementation with folic acid and vitamin B12 resulted in DNA methylation changes in leukocytes of older persons.
A change in DNA methylation was observed to be different between the participants receiving folic acid and vitamin B12 versus placebo.
DNA methylation levels of several genomic loci were found to correlate to serum levels of either folate, vitamin B12, or plasma homocysteine.
Most prominent DNA methylation patterns associated with supplemental intake or status of B-vitamins are related to developmental processes as well as carcinogenesis.
The aim of this work is to;
Asses the relationship between Homocysteine to DNA methylation patterns
develop the analytical pipelines required for efficient re-analysis of 450K array data,
to confirm that we are able to obtain differential methylation results that are similar to those obtained in the original study, and
to critically evaluate the conclusions made in the original study.
These packackes will help us to perform vital steps such as normalisation, filtering, differential analysis, etc, and provide information about the array probe annotaions.
knitr::opts_chunk$set(dev = "png")
suppressPackageStartupMessages({
library("missMethyl")
library("GEOquery")
library("limma")
library("topconfects")
library("minfi")
library("IlluminaHumanMethylation450kmanifest")
library("IlluminaHumanMethylation450kanno.ilmn12.hg19")
library("DMRcate")
library("mitch")
library("kableExtra")
library("forestplot")
library("RColorBrewer")
library("plyr")
library("R.utils")
library("eulerr")
library("gplots")
library("reshape2")
library("beeswarm")
library("RCircos")
})
# Annotation
ann450k <- getAnnotation(IlluminaHumanMethylation450kanno.ilmn12.hg19)
myann <- data.frame(ann450k[,c("UCSC_RefGene_Name","Regulatory_Feature_Group")])
promoters <- grep("Prom",myann$Regulatory_Feature_Group)
These functions provide shortcuts to help with charts and other analysis. They will eventually be shoved into another Rscript or package but can stay here for now.
source("https://raw.githubusercontent.com/markziemann/ART_methylation/master/meth_functions.R")
myranks<-function(x) {
x$score <- sign(x$logFC)/log10(x$adj.P.Val)
y <- x[,"score",drop=FALSE]
y$rn <- x$Row.names
return(y)
}
# heatmap for continuous data
heatmap_c<-function(dm,name,mx,n, groups) {
my_palette <- colorRampPalette(c("blue", "white", "red"))(25)
topgenes <- rownames(head(dm[order(dm$P.Value),],n))
ss <- mx[which(rownames(mx) %in% topgenes),]
mycols <- colorRampPalette(c("white","yellow", "orange", "red","darkred"))(n = length(groups))
colCols <- mycols[order(groups)]
heatmap.2(ss,scale="row",margin=c(10, 10),cexRow=0.6,trace="none",cexCol=0.4,
ColSideColors=colCols , col=my_palette, main=name)
}
# heatmap for continuous data - topconfects
make_heatmap2_c <- function(confects,name,mx,n, groups) {
topgenes <- head(confects$table$name,n)
my_palette <- colorRampPalette(c("blue", "white", "red"))(25)
ss <- mx[which(rownames(mx) %in% topgenes),]
mycols <- colorRampPalette(c("white","yellow", "orange", "red","darkred"))(n = length(groups))
colCols <- mycols[order(groups)]
heatmap.2(ss,scale="row",margin=c(10, 10),cexRow=0.6,trace="none",cexCol=0.4,
ColSideColors=colCols , col=my_palette, main=name)
}
Data will be imported from GEO data base under the accession number-GSE74548 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE74548
dir.create("GSE74548")
## Warning in dir.create("GSE74548"): 'GSE74548' already exists
ARRAY_SAMPLESHEET="GSE74548/GSE74548_Sample_description_BProof.txt"
# only download it if it is not present on the system
if ( !file.exists(ARRAY_SAMPLESHEET ) ) {
DLFILE=paste(ARRAY_SAMPLESHEET,".gz",sep="")
download.file("https://ftp.ncbi.nlm.nih.gov/geo/series/GSE74nnn/GSE74548/suppl/GSE74548_Sample_description_BProof.txt.gz",
destfile = DLFILE)
gunzip(DLFILE)
}
ARRAY_DATA="GSE74548/GSE74548_RAW.tar"
# only download it if it is not present on the system
if ( !dir.exists("GSE74548/IDAT") ) {
dir.create("GSE74548/IDAT")
download.file("https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE74548&format=file",
destfile = ARRAY_DATA)
untar(exdir = "GSE74548/IDAT", tarfile = ARRAY_DATA)
}
baseDir <- "GSE74548"
R.utils::gunzip("GSE74548/IDAT/GPL13534_HumanMethylation450_15017482_v.1.1.csv.gz",overwrite=TRUE, remove=FALSE)
targets <- read.metharray.sheet(baseDir,pattern="csv")
## [read.metharray.sheet] Found the following CSV files:
## [1] "GSE74548/IDAT/GPL13534_HumanMethylation450_15017482_v.1.1.csv"
## [2] "GSE74548/IDAT/GPL13534_HumanMethylation450_15017482_v.1.1.csv.gz"
## Warning in FUN(X[[i]], ...): Could not infer array name for file: GSE74548/IDAT/
## GPL13534_HumanMethylation450_15017482_v.1.1.csv
## Warning in FUN(X[[i]], ...): Could not infer slide name for file: GSE74548/IDAT/
## GPL13534_HumanMethylation450_15017482_v.1.1.csv
## Warning in FUN(X[[i]], ...): Could not infer array name for file: GSE74548/IDAT/
## GPL13534_HumanMethylation450_15017482_v.1.1.csv.gz
## Warning in FUN(X[[i]], ...): Could not infer slide name for file: GSE74548/IDAT/
## GPL13534_HumanMethylation450_15017482_v.1.1.csv.gz
if (! file.exists("GSE74548_series_matrix.txt.gz") ) {
URL="https://ftp.ncbi.nlm.nih.gov/geo/series/GSE74nnn/GSE74548/matrix/GSE74548_series_matrix.txt.gz"
download.file(URL,destfile = "GSE74548_series_matrix.txt.gz")
}
gse<- getGEO(filename = "GSE74548_series_matrix.txt.gz")
##
## ── Column specification ─────────────────────────────────────────────────────────────────────────────────
## cols(
## .default = col_double(),
## ID_REF = col_character()
## )
## ℹ Use `spec()` for the full column specifications.
## File stored at:
## /tmp/RtmpXt1SCk/GPL13534.soft
## Warning: 65 parsing failures.
## row col expected actual file
## 485513 SPOT_ID 1/0/T/F/TRUE/FALSE rs10796216 literal data
## 485514 SPOT_ID 1/0/T/F/TRUE/FALSE rs715359 literal data
## 485515 SPOT_ID 1/0/T/F/TRUE/FALSE rs1040870 literal data
## 485516 SPOT_ID 1/0/T/F/TRUE/FALSE rs10936224 literal data
## 485517 SPOT_ID 1/0/T/F/TRUE/FALSE rs213028 literal data
## ...... ....... .................. .......... ............
## See problems(...) for more details.
targets <- pData(phenoData(gse))
targets <- targets[order(rownames(targets)),]
mybase <- unique(gsub("_Red.idat.gz" ,"", gsub("_Grn.idat.gz", "" ,list.files("./GSE74548",pattern = "GSM",recursive = TRUE))))
mybase <- paste("GSE74548/", mybase, sep = "")
# sample number discrepancy. 311 IDAT FILES but GEO states 174 subjects.
gsm <-sapply(strsplit(mybase,"_"),"[[",1)
gsm <-gsub("GSE74548/IDAT/","",gsm)
#only using sampels described in meta data
targets$Basename<- mybase[which(gsm %in% rownames(targets))]
rgSet <- read.metharray.exp(targets = targets)
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
## Warning in readChar(con, nchars = n): truncating string with embedded nuls
targets[1:6,1:5]
## title geo_accession
## GSM1922494 Buffy_Placebo_Baseline_Subject_1 GSM1922494
## GSM1922495 Buffy_Placebo_Follow-up_Subject_1 GSM1922495
## GSM1922496 Buffy_Placebo_Baseline_Subject_2 GSM1922496
## GSM1922497 Buffy_Placebo_Follow-up_Subject_2 GSM1922497
## GSM1922498 Buffy_Placebo_Baseline_Subject_3 GSM1922498
## GSM1922499 Buffy_Placebo_Follow-up_Subject_3 GSM1922499
## status submission_date last_update_date
## GSM1922494 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922495 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922496 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922497 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922498 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922499 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
mSet <- preprocessRaw(rgSet)
mSetSw <- SWAN(mSet,verbose=FALSE)
## [SWAN] Preparing normalization subset
## 450k
## [SWAN] Normalizing methylated channel
## [SWAN] Normalizing unmethylated channel
par(mfrow=c(1,2), cex=0.8)
densityByProbeType(mSet[,1], main = "Raw")
densityByProbeType(mSetSw[,1], main = "SWAN")
Figure 1. Normalisation of bead-array data with SWAN.
Here we are running parallel analyses, both including and excluding sex chromosomes.
# include sex chromosomes
detP <- detectionP(rgSet)
keep <- rowSums(detP < 0.01) == ncol(rgSet)
mSetSw <- mSetSw[keep,]
# exclude SNP probes
mSetSw <- mapToGenome(mSetSw)
mSetSw_nosnp <- dropLociWithSnps(mSetSw)
dim(mSetSw)
## [1] 446510 174
dim(mSetSw_nosnp)
## [1] 432127 174
mSetSw <- mSetSw_nosnp
# exclude sex chromosomes
keep <- !(featureNames(mSetSw) %in% ann450k$Name[ann450k$chr %in% c("chrX","chrY")])
mSetFlt <- mSetSw[keep,]
mSetFlt[1:6,1:5]
## class: GenomicMethylSet
## dim: 6 5
## metadata(0):
## assays(2): Meth Unmeth
## rownames(6): cg13869341 cg14008030 ... cg00381604 cg20253340
## rowData names(0):
## colnames(5): GSM1922494_9373550096_R03C01 GSM1922495_9373550096_R04C01
## GSM1922496_9374343071_R03C01 GSM1922497_9374343071_R04C01
## GSM1922498_9374343068_R03C01
## colData names(57): title geo_accession ... Basename filenames
## Annotation
## array: IlluminaHumanMethylation450k
## annotation: ilmn12.hg19
## Preprocessing
## Method: SWAN (based on a MethylSet
## preprocessed as 'Raw (no normalization or bg correction)')
## minfi version: 1.34.0
## Manifest version: 0.4.0
dim(mSetFlt)
## [1] 422374 174
# include sex chromosomes
meth <- getMeth(mSetSw)
unmeth <- getUnmeth(mSetSw)
Mval <- log2((meth + 100)/(unmeth + 100))
beta <- getBeta(mSetSw)
# exclude sex chromosomes
meth <- getMeth(mSetFlt)
unmeth <- getUnmeth(mSetFlt)
Mval_flt <- log2((meth + 100)/(unmeth + 100))
beta_flt <- getBeta(mSetFlt)
colnames(Mval)<-sapply(strsplit(colnames(Mval),"_"),"[[",1)
colnames(Mval_flt)<-sapply(strsplit(colnames(Mval_flt),"_"),"[[",1)
cgx<-rownames(Locations[which(Locations$chr %in% "chrX"),])
cgy<-rownames(Locations[which(Locations$chr %in% "chrY"),])
mvx<-Mval[which(rownames(Mval) %in% cgx),]
mvy<-Mval[which(rownames(Mval) %in% cgy),]
targets_m<-rownames(subset(targets,`gender:ch1`=="male"))
str(targets_m)
## chr [1:80] "GSM1922496" "GSM1922497" "GSM1922504" "GSM1922505" ...
targets_f<-rownames(subset(targets,`gender:ch1`=="female"))
Mvalm<-Mval[,colnames(Mval) %in% targets_m]
Mvalf<-Mval[,colnames(Mval) %in% targets_f]
mvxm<-Mvalm[which(rownames(Mvalm) %in% cgx),]
mvym<-Mvalm[which(rownames(Mvalm) %in% cgy),]
mvxf<-Mvalf[which(rownames(Mvalf) %in% cgx),]
mvyf<-Mvalf[which(rownames(Mvalf) %in% cgy),]
plot(colMeans(mvx),colMeans(mvy),col="gray")
points(colMeans(mvxm),colMeans(mvym),col="blue")
points(colMeans(mvxf),colMeans(mvyf),col="red")
plot(colMeans(mvx),colMeans(mvy),col="gray")
points(colMeans(mvxm),colMeans(mvym),col="lightblue",pch=19,cex=1.5)
points(colMeans(mvxf),colMeans(mvyf),col="pink",pch=19,cex=1.5)
text(colMeans(mvx),colMeans(mvy),labels = colnames(mvx),cex=0.75)
[Multidimensional scaling(https://en.wikipedia.org/wiki/Multidimensional_scaling) plot is a method used to identify the major sources of variation in a dataset. In the MDS plots below, I will be plotting the first two dimensions (principal components [PCs]), with each sample label coloured either by Hcy classification, sample group,age, folate levels and vitb12 levels.
We will begin with MDS analysis including the sex chromosomes and then exclude them.
First, let’s quantify the contribution of the major principal components. with a scree plot, so we can see whether most of the variation is captured in the first two PCs or whether it is spread over more PCs. As we can see in Figure 2, the main source of variation is what is shown in PC1, and a much lesser extent on the other dimensions. Interestingly, excluding sex chromosomes does not seem to change the relative contributions of PCs very much.
targets[1:6,1:5]
## title geo_accession
## GSM1922494 Buffy_Placebo_Baseline_Subject_1 GSM1922494
## GSM1922495 Buffy_Placebo_Follow-up_Subject_1 GSM1922495
## GSM1922496 Buffy_Placebo_Baseline_Subject_2 GSM1922496
## GSM1922497 Buffy_Placebo_Follow-up_Subject_2 GSM1922497
## GSM1922498 Buffy_Placebo_Baseline_Subject_3 GSM1922498
## GSM1922499 Buffy_Placebo_Follow-up_Subject_3 GSM1922499
## status submission_date last_update_date
## GSM1922494 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922495 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922496 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922497 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922498 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922499 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
dim(targets)
## [1] 174 56
targets$group <- factor(targets$source_name_ch1)
sample_group<-factor(targets$group)
targets$sex <- factor(targets$`gender:ch1`)
dim(sample_group)
## NULL
colour_palette=brewer.pal(n = length(levels(targets$group)), name = "Paired")
colours <- colour_palette[as.integer(factor(targets$source_name_ch1))]
plot(1,axes = FALSE,xlab="",ylab="",main="treatment groups")
legend("center",legend=levels(targets$group),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by targets groups
mydist <- plotMDS(Mval, labels=targets$geo_accession,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by targets groups
mydist_flt <- plotMDS(Mval_flt, labels=targets$geo_accession,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by targets groups
hcy<- targets$characteristics_ch1.10
hcy<-strsplit(as.character(targets$characteristics_ch1.10), " ")
hcy<-sapply(hcy, "[",5)
hcy<-as.numeric(hcy)
## Warning: NAs introduced by coercion
hist(hcy,breaks = 20,xlab = "hcy levels")
hcy_groups<-cut(hcy,breaks = c(0,10,16,30),labels = c("low","medium","high"))
table(hcy_groups)
## hcy_groups
## low medium high
## 26 108 38
targets[1:6,1:5]
## title geo_accession
## GSM1922494 Buffy_Placebo_Baseline_Subject_1 GSM1922494
## GSM1922495 Buffy_Placebo_Follow-up_Subject_1 GSM1922495
## GSM1922496 Buffy_Placebo_Baseline_Subject_2 GSM1922496
## GSM1922497 Buffy_Placebo_Follow-up_Subject_2 GSM1922497
## GSM1922498 Buffy_Placebo_Baseline_Subject_3 GSM1922498
## GSM1922499 Buffy_Placebo_Follow-up_Subject_3 GSM1922499
## status submission_date last_update_date
## GSM1922494 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922495 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922496 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922497 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922498 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
## GSM1922499 Public on Nov 16 2015 Oct 30 2015 Apr 25 2016
targets$sex <- factor(targets$`gender:ch1`)
targets$hcy_groups <- hcy_groups
sample_group<-hcy_groups
colour_palette=brewer.pal(n = length(levels(sample_group)), name = "Paired")
colours <- colour_palette[as.integer(factor(hcy_groups))]
plot(1,axes = FALSE,xlab="",ylab="",main="hcy levels")
legend("center",legend=levels(hcy_groups),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by homocysteine levels
plotMDS(mydist, labels=targets$geo_accession,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by homocysteine levels
plotMDS(mydist_flt, labels=targets$geo_accession,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by homocysteine levels
age<- targets$characteristics_ch1.5
age<-strsplit(as.character(targets$characteristics_ch1.5), " ")
age<-sapply(age , "[",4)
age<-as.numeric(age)
hist(age,breaks = 20,xlab = "age levels")
age_groups<-cut(age,breaks = c(0,65,70,75),labels = c("old","older","oldest"))
table(age_groups)
## age_groups
## old older oldest
## 8 62 104
targets$age <- factor(age_groups)
sample_group <-factor(age_groups)
colour_palette=brewer.pal(n = length(levels(sample_group)), name = "Paired")
colours <- colour_palette[as.integer(factor(age_groups))]
plot(1,axes = FALSE,xlab="",ylab="",main="age")
legend("center",legend=levels(age_groups),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by age
plotMDS(mydist, labels=targets$geo_accession,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by age
plotMDS(mydist_flt,labels=targets$geo_accession,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by age
folate_levels<- targets$characteristics_ch1.8
folate_levels<-strsplit(as.character(targets$characteristics_ch1.8), " ")
folate_levels<-sapply(folate_levels , "[",5)
folate_levels<-as.numeric(folate_levels)
hist(folate_levels,breaks = 20,xlab = "folate levels")
folate_levels<-cut(folate_levels,breaks = c(0,20,35,50,70,90),labels = c("lowest","low","medium","high","highest"))
table(folate_levels)
## folate_levels
## lowest low medium high highest
## 68 63 17 18 6
folate_levels
## [1] low low low low low low low low low
## [10] lowest lowest lowest lowest low low low lowest lowest
## [19] low medium lowest low lowest lowest lowest low lowest
## [28] low lowest low lowest lowest low low lowest low
## [37] lowest lowest lowest lowest medium medium lowest lowest low
## [46] low lowest lowest lowest low lowest medium lowest lowest
## [55] lowest lowest lowest medium lowest low lowest lowest low
## [64] low low lowest lowest lowest lowest low low low
## [73] lowest lowest lowest medium low low lowest low low
## [82] low lowest low low low lowest low lowest medium
## [91] lowest high low high lowest highest low high lowest
## [100] medium low high low <NA> low high lowest highest
## [109] lowest medium lowest low lowest highest lowest medium lowest
## [118] low low high low high low highest lowest medium
## [127] lowest medium lowest low lowest high lowest high lowest
## [136] highest lowest high lowest medium lowest medium low low
## [145] low high low high lowest high low <NA> lowest
## [154] low low high low medium low high lowest medium
## [163] lowest medium low high lowest high low highest low
## [172] low lowest high
## Levels: lowest low medium high highest
targets$folate_levels <- folate_levels
sample_group<-folate_levels
colour_palette=brewer.pal(n = length(levels(sample_group)), name = "Paired")
colours <- colour_palette[as.integer(factor(targets$folate_levels))]
plot(1,axes = FALSE,xlab="",ylab="",main="Folate levels")
legend("center",legend=levels(targets$folate_levels),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by folate levels
plotMDS(mydist, labels=targets$geo_accession,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by folate levels
plotMDS(mydist_flt, labels=targets$geo_accession,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by folate levels
vitb12_levels<- targets$characteristics_ch1.9
vitb12_levels<-strsplit(as.character(targets$characteristics_ch1.9), " ")
vitb12_levels<-sapply(vitb12_levels , "[",6)
vitb12_levels<-as.numeric(vitb12_levels)
hist(vitb12_levels,breaks = 20,xlab = "vitb12 levels")
vitb12_levels<-cut(vitb12_levels,breaks = c(100,300,500,700,900,1115),labels = c("lowest","low","medium","high","highest"))
table(vitb12_levels)
## vitb12_levels
## lowest low medium high highest
## 66 66 25 8 7
vitb12_levels
## [1] low medium low medium low medium low low lowest
## [10] low lowest low lowest low medium medium low low
## [19] <NA> <NA> low low low medium lowest lowest low
## [28] low lowest lowest low low lowest lowest lowest lowest
## [37] lowest lowest low low lowest lowest low low low
## [46] low lowest lowest low low lowest lowest lowest lowest
## [55] low low lowest lowest lowest lowest lowest lowest low
## [64] low low lowest lowest lowest lowest lowest low low
## [73] lowest lowest low highest low low lowest lowest low
## [82] low lowest lowest low low lowest high low highest
## [91] medium high low high lowest high low highest lowest
## [100] low medium highest lowest low lowest low lowest high
## [109] lowest medium lowest high low medium lowest medium lowest
## [118] low lowest medium low medium lowest medium low medium
## [127] lowest high lowest low lowest medium lowest low lowest
## [136] low lowest low low medium low high lowest low
## [145] lowest low low highest lowest highest low highest lowest
## [154] medium low medium lowest low lowest low low medium
## [163] lowest low lowest medium low medium lowest low medium
## [172] medium lowest medium
## Levels: lowest low medium high highest
targets$vitb12_levels <- vitb12_levels
sample_group<-vitb12_levels
colour_palette=brewer.pal(n = length(levels(sample_group)), name = "Paired")
colours <- colour_palette[as.integer(factor(targets$vitb12_levels))]
plot(1,axes = FALSE,xlab="",ylab="",main="vitb12 levels")
legend("center",legend=levels(targets$vitb12_levels),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by vitaminb12 levels
plotMDS(mydist, labels=targets$geo_accession,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by vitaminb12 levels
plotMDS(mydist_flt, labels=targets$geo_accession,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by vitaminb12 levels
There are several differential contrasts that would be of interest to us in this study:
placebo(43) vs supplement(44) follow-up
placebo(43) vs supplement(44) Baseline
hcy levels(172)
folate levels(172)
vitb12 levels(172)
samplesheet<-targets[grep("follow-up",targets$source_name_ch1),]
sex <- factor(samplesheet$`gender:ch1`)
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
groups<-factor(samplesheet$source_name_ch1,levels = c("Buffy coat, placebo, follow-up","Buffy coat, FA/vB12, follow-up"))
mx <-Mval_flt
name="placebo_vs_supplement_follow-up"
design <- model.matrix(~age+ sex +groups)
mxs <- mx[,which(colnames(mx) %in% rownames(samplesheet) )]
fit.reduced <- lmFit(mxs,design)
fit.reduced <- eBayes(fit.reduced)
summary(decideTests(fit.reduced))
## (Intercept) age sexmale groupsBuffy coat, FA/vB12, follow-up
## Down 123901 0 476 0
## NotSig 152042 422374 421677 422374
## Up 146431 0 221 0
dm <- topTable(fit.reduced,coef=4, number = Inf)
dma <- merge(myann,dm,by=0)
dma1a <- dma[order(dma$P.Value),]
head(dma1a, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
Row.names | UCSC_RefGene_Name | Regulatory_Feature_Group | logFC | AveExpr | t | P.Value | adj.P.Val | B | |
---|---|---|---|---|---|---|---|---|---|
194979 | cg11922164 | SYT15;SYT15 | -0.3207440 | 3.0628125 | -5.466346 | 0.0000004 | 0.1773779 | 2.8548096 | |
272834 | cg17055959 | RB1 | Promoter_Associated | -0.2579878 | -3.5523052 | -4.466023 | 0.0000235 | 0.9999726 | 0.5484130 |
152845 | cg09095400 | MCF2L;MCF2L | -0.2869663 | 3.0493159 | -4.450392 | 0.0000249 | 0.9999726 | 0.5139563 | |
1593 | cg00079169 | THOP1 | -0.2949458 | 3.1762899 | -4.427706 | 0.0000271 | 0.9999726 | 0.4640560 | |
9038 | cg00485312 | RADIL | 0.4223117 | 3.4557277 | 4.198764 | 0.0000638 | 0.9999726 | -0.0322635 | |
352431 | cg22907174 | Unclassified_Cell_type_specific | -0.2805781 | -3.7414555 | -4.192707 | 0.0000652 | 0.9999726 | -0.0452071 | |
232944 | cg14356440 | MGAT5 | -0.3155745 | 3.2499548 | -4.090695 | 0.0000947 | 0.9999726 | -0.2616689 | |
35947 | cg02007493 | NUDT14 | Unclassified | -0.2196511 | -3.7525626 | -3.982487 | 0.0001397 | 0.9999726 | -0.4880158 |
410445 | cg26973953 | GNPTG | -0.3423116 | 5.9634321 | -3.926533 | 0.0001704 | 0.9999726 | -0.6036902 | |
319979 | cg20451722 | MX1 | Promoter_Associated | -0.1704236 | -3.3387503 | -3.912364 | 0.0001791 | 0.9999726 | -0.6328306 |
252841 | cg15693572 | -0.4953480 | 0.7570441 | -3.906532 | 0.0001828 | 0.9999726 | -0.6448044 | ||
270682 | cg16895973 | TOLLIP | 0.3271528 | 2.6815052 | 3.888504 | 0.0001948 | 0.9999726 | -0.6817596 | |
410352 | cg26966630 | CBLN2 | 0.4046942 | -2.9624521 | 3.883318 | 0.0001984 | 0.9999726 | -0.6923708 | |
151462 | cg08998375 | TBL3 | -0.1874329 | 2.5281804 | -3.874526 | 0.0002046 | 0.9999726 | -0.7103394 | |
67914 | cg03852670 | SLC10A4 | Unclassified_Cell_type_specific | -0.4424089 | -0.8063450 | -3.872034 | 0.0002064 | 0.9999726 | -0.7154288 |
252505 | cg15672304 | GPX5;GPX5 | -0.3355514 | 3.1090028 | -3.848088 | 0.0002244 | 0.9999726 | -0.7642308 | |
315265 | cg20089935 | ANKLE2 | -0.2949441 | 4.0151169 | -3.822348 | 0.0002455 | 0.9999726 | -0.8164874 | |
93786 | cg05392577 | 0.3460317 | 2.9111184 | 3.791762 | 0.0002730 | 0.9999726 | -0.8783028 | ||
87552 | cg05021312 | CBFA2T2 | Promoter_Associated | -0.3001565 | 2.5124807 | -3.787561 | 0.0002770 | 0.9999726 | -0.8867700 |
140100 | cg08267701 | TOMM40;TOMM40;TOMM40 | Promoter_Associated | -0.1740473 | -3.1041199 | -3.785859 | 0.0002786 | 0.9999726 | -0.8901981 |
254727 | cg15828427 | FBXW9 | Unclassified | -0.2557794 | 0.5824044 | -3.784076 | 0.0002803 | 0.9999726 | -0.8937900 |
164936 | cg09887667 | NEDD4 | -0.4014011 | -3.2160336 | -3.760417 | 0.0003041 | 0.9999726 | -0.9413380 | |
21032 | cg01142579 | -0.3264804 | 3.3291150 | -3.754200 | 0.0003107 | 0.9999726 | -0.9538023 | ||
326613 | cg20954533 | MAP1B | -0.4630739 | -0.6714320 | -3.752344 | 0.0003127 | 0.9999726 | -0.9575208 | |
364010 | cg23712359 | ZEB1;ZEB1;ZEB1;ZEB1;ZEB1 | Promoter_Associated | -0.2990705 | -3.4093399 | -3.746015 | 0.0003196 | 0.9999726 | -0.9701918 |
336712 | cg21697812 | C11orf91 | Promoter_Associated | -0.3423609 | 0.5137633 | -3.723449 | 0.0003453 | 0.9999726 | -1.0152639 |
277727 | cg17396852 | PIK3CG | -0.3188207 | 3.6582971 | -3.722313 | 0.0003466 | 0.9999726 | -1.0175285 | |
333613 | cg21478490 | PROP1;PROP1 | -0.3935315 | 1.1517228 | -3.703347 | 0.0003698 | 0.9999726 | -1.0552709 | |
268481 | cg16728323 | RAB20 | Unclassified_Cell_type_specific | -0.2564711 | 3.0509414 | -3.686191 | 0.0003921 | 0.9999726 | -1.0893075 |
122362 | cg07162820 | NFATC4;NFATC4 | Unclassified | -0.2654847 | -1.0260086 | -3.685136 | 0.0003935 | 0.9999726 | -1.0913986 |
50638 | cg02852873 | CNDP2 | Promoter_Associated | -0.1405710 | -2.0239166 | -3.677300 | 0.0004041 | 0.9999726 | -1.1069091 |
49484 | cg02779707 | TAP2;TAP2 | Promoter_Associated | -0.2906797 | -3.3337094 | -3.675729 | 0.0004063 | 0.9999726 | -1.1100152 |
148894 | cg08837481 | -0.2429505 | 3.3511260 | -3.659913 | 0.0004287 | 0.9999726 | -1.1412487 | ||
148880 | cg08836615 | 0.2866996 | 3.5243889 | 3.656941 | 0.0004330 | 0.9999726 | -1.1471082 | ||
344371 | cg22304399 | CACNA1A;CACNA1A | Unclassified | -0.2778105 | -3.1805269 | -3.656575 | 0.0004335 | 0.9999726 | -1.1478298 |
363253 | cg23666491 | -0.2106844 | 2.6152030 | -3.647054 | 0.0004477 | 0.9999726 | -1.1665811 | ||
97120 | cg05616472 | EHMT1;C9orf37;EHMT1 | Promoter_Associated | -0.2810570 | -2.0786060 | -3.644458 | 0.0004517 | 0.9999726 | -1.1716876 |
278934 | cg17479060 | -0.2713071 | 4.3397625 | -3.642974 | 0.0004539 | 0.9999726 | -1.1746065 | ||
149010 | cg08844849 | SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10 | -0.2787876 | 1.6726163 | -3.630757 | 0.0004730 | 0.9999726 | -1.1986016 | |
370682 | cg24181389 | RPTOR;RPTOR | Gene_Associated_Cell_type_specific | -0.2990377 | 3.1769511 | -3.626237 | 0.0004803 | 0.9999726 | -1.2074667 |
258173 | cg16066221 | CCDC55 | -0.1864558 | 3.3357653 | -3.614383 | 0.0004998 | 0.9999726 | -1.2306821 | |
142022 | cg08391356 | Promoter_Associated | -0.1719292 | -3.0256092 | -3.596706 | 0.0005303 | 0.9999726 | -1.2652110 | |
286363 | cg18034329 | RABEP1;RABEP1 | Promoter_Associated | -0.2069383 | -3.1698977 | -3.594818 | 0.0005337 | 0.9999726 | -1.2688918 |
260886 | cg16258224 | -0.3390869 | 2.2013619 | -3.593741 | 0.0005356 | 0.9999726 | -1.2709919 | ||
176620 | cg10645648 | HLA-DQA2 | 0.7923688 | 2.1099234 | 3.592603 | 0.0005377 | 0.9999726 | -1.2732096 | |
26385 | cg01448562 | -0.7166918 | 3.4088542 | -3.592207 | 0.0005384 | 0.9999726 | -1.2739815 | ||
254925 | cg15840079 | TMEM132A;TMEM132A | Unclassified | -0.2209829 | -2.1738729 | -3.585705 | 0.0005502 | 0.9999726 | -1.2866452 |
238741 | cg14686845 | AGPAT5 | Promoter_Associated | -0.1488296 | -3.1824300 | -3.581915 | 0.0005572 | 0.9999726 | -1.2940191 |
116523 | cg06837179 | -0.2189942 | 3.4386469 | -3.576507 | 0.0005674 | 0.9999726 | -1.3045315 | ||
375993 | cg24571822 | CUBN | -0.2526041 | -0.0494196 | -3.575795 | 0.0005687 | 0.9999726 | -1.3059156 |
dma1a_d<-nrow(subset(dm,adj.P.Val<0.05,logFC<0))
dma1a_u<-nrow(subset(dm,adj.P.Val<0.05,logFC>0))
confects <- limma_confects(fit.reduced, coef=3, fdr=0.05)
head(confects$table, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
rank | index | confect | effect | AveExpr | name |
---|---|---|---|---|---|
1 | 176632 | -2.333 | -2.6106572 | 1.9338004 | cg04462931 |
2 | 324814 | -2.062 | -2.4477398 | 2.6338863 | cg23719534 |
3 | 265197 | -2.062 | -2.4664538 | 1.9332521 | cg19097082 |
4 | 53347 | -1.747 | -2.0612973 | 2.2559876 | cg11955727 |
5 | 322235 | 1.737 | 2.2513803 | -2.9627509 | cg10631453 |
6 | 297838 | -1.690 | -2.2777656 | -2.3976297 | cg00804338 |
7 | 53343 | -1.630 | -1.8504308 | 1.7317535 | cg17765025 |
8 | 313251 | 1.322 | 1.9402360 | -3.4657220 | cg18382982 |
9 | 188638 | -1.263 | -1.5338367 | 2.1606074 | cg00399683 |
10 | 273633 | -1.223 | -1.6332701 | -2.2493411 | cg03691818 |
11 | 65789 | -1.182 | -1.4238288 | -1.8746964 | cg16218221 |
12 | 229722 | -1.150 | -1.7972848 | -1.8429331 | cg00167275 |
13 | 176630 | -1.111 | -1.3971690 | 2.3086541 | cg12949927 |
14 | 75042 | -1.057 | -1.4369829 | 3.0685724 | cg11643285 |
15 | 337459 | 1.049 | 1.3643271 | 1.3583188 | cg04946709 |
16 | 288528 | -0.989 | -1.6027117 | -2.4907581 | cg06710937 |
17 | 410835 | 0.938 | 1.2718301 | -3.6278295 | cg17612569 |
18 | 271146 | -0.849 | -1.1995992 | 0.8388355 | cg08037478 |
19 | 81288 | -0.841 | -1.2064637 | -2.7222487 | cg20891225 |
20 | 41029 | 0.830 | 1.2424089 | -1.1176724 | cg27540865 |
21 | 41027 | 0.817 | 1.1883675 | -1.1948976 | cg12691488 |
22 | 128407 | -0.767 | -1.2338993 | -0.6901004 | cg17226602 |
23 | 211995 | -0.764 | -1.0484054 | -0.6102350 | cg20926353 |
24 | 41030 | 0.724 | 1.2096172 | -1.6754531 | cg00500229 |
25 | 297839 | -0.682 | -1.0369250 | -3.2268420 | cg23778841 |
26 | 75043 | -0.680 | -0.9668562 | 2.1577334 | cg17238319 |
27 | 193178 | -0.679 | -0.9970399 | 3.2672881 | cg17307919 |
28 | 254009 | 0.650 | 0.9537902 | -3.1522686 | cg25294185 |
29 | 148854 | -0.644 | -1.0049727 | -2.2345692 | cg24919522 |
30 | 188640 | -0.638 | -0.8976680 | 2.3285756 | cg26914004 |
31 | 128405 | -0.638 | -0.9248432 | -0.8211230 | cg23950473 |
32 | 51691 | -0.620 | -0.9436641 | -3.9231560 | cg09725915 |
33 | 370423 | -0.615 | -0.8623628 | -3.4274711 | cg22345911 |
34 | 306304 | -0.614 | -0.9532107 | -4.1372058 | cg22794378 |
35 | 30377 | -0.609 | -1.0762909 | -0.4168573 | cg20746702 |
36 | 322236 | 0.606 | 0.9355076 | -1.7955885 | cg13150977 |
37 | 250856 | -0.606 | -0.9335363 | -2.3648054 | cg17232883 |
38 | 75095 | -0.579 | -1.0354956 | 2.2786920 | cg03911306 |
39 | 211998 | -0.562 | -0.8203861 | -1.6154218 | cg08656326 |
40 | 115950 | -0.557 | -0.8936860 | 0.0713273 | cg15633893 |
41 | 179533 | -0.543 | -0.8228527 | -3.9376350 | cg17743279 |
42 | 250857 | -0.532 | -0.8675442 | -2.4132395 | cg04858776 |
43 | 141981 | -0.530 | -0.7785561 | 1.6107933 | cg00774458 |
44 | 352937 | -0.526 | -0.8703237 | 2.0761655 | cg20299935 |
45 | 209663 | -0.478 | -0.7917411 | -3.7467034 | cg02908189 |
46 | 211996 | -0.475 | -0.8194767 | -1.5026645 | cg14095100 |
47 | 101058 | -0.474 | -0.9607986 | -3.4157721 | cg09067967 |
48 | 52402 | 0.446 | 0.8099304 | -4.6534035 | cg06642617 |
49 | 211994 | -0.433 | -0.7404246 | -1.0028903 | cg06358300 |
50 | 270960 | 0.429 | 1.1496584 | -2.0488483 | cg20248611 |
colCols <- as.numeric(as.factor(groups))
make_volcano(dma1a,name = "placebo_vs_supplement_follow-up(sex,age)",mx=Mval_flt)
rownames(dma1a)<-dma1a[,1]
make_beeswarms(dm=dma1a ,name="placebo_vs_supplement_follow-up(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_beeswarms_confects(confects = confects ,name="placebo_vs_supplement_follow-up(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_heatmap(dm=dma1a , name="placebo_vs_supplement_baseline(sex,age)" , mx=mxs ,n = 50, groups=groups)
make_heatmap2(confects = confects , name="placebo_vs_supplement_baseline(sex,age)",mx=mxs ,n = 50, groups=groups)
samplesheet<-targets[grep("baseline",targets$source_name_ch1),]
sex <- factor(samplesheet$`gender:ch1`)
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
age
## [1] 73 73 72 72 75 74 69 74 75 73 69 75 72 72 74 72 71 74 65 67 67 69 65 68 72
## [26] 75 75 71 73 70 71 71 73 67 70 66 72 66 70 73 69 66 75 74 68 75 70 75 67 65
## [51] 72 72 75 71 74 72 73 71 71 72 69 75 73 70 73 69 68 66 66 73 73 74 74 70 70
## [76] 70 67 66 73 71 72 65 74 70 71 67 69
groups<-factor(samplesheet$source_name_ch1,levels = c("Buffy coat, placebo, baseline","Buffy coat, FA/vB12, baseline"))
mx <-Mval_flt
name="placebo_vs_supplement_baseline"
design <- model.matrix(~age+ sex +groups)
mxs <- mx[,which(colnames(mx) %in% rownames(samplesheet) )]
fit.reduced <- lmFit(mxs,design)
fit.reduced <- eBayes(fit.reduced)
summary(decideTests(fit.reduced))
## (Intercept) age sexmale groupsBuffy coat, FA/vB12, baseline
## Down 127995 0 691 0
## NotSig 149128 422374 421505 422374
## Up 145251 0 178 0
dm <- topTable(fit.reduced,coef=4, number = Inf)
dma <- merge(myann,dm,by=0)
dma2a <- dma[order(dma$P.Value),]
head(dma2a, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
Row.names | UCSC_RefGene_Name | Regulatory_Feature_Group | logFC | AveExpr | t | P.Value | adj.P.Val | B | |
---|---|---|---|---|---|---|---|---|---|
11210 | cg00596687 | C20orf166;MIR1-1 | Unclassified_Cell_type_specific | 0.4059493 | 3.6530802 | 4.738182 | 0.0000082 | 0.6442329 | 1.5839252 |
413732 | cg27194173 | ADK;ADK | -0.1991879 | 1.6428078 | -4.708564 | 0.0000092 | 0.6442329 | 1.5111224 | |
211353 | cg13109300 | DHH;DHH | Unclassified_Cell_type_specific | -0.3865678 | -3.6526576 | -4.662703 | 0.0000110 | 0.6442329 | 1.3988109 |
100548 | cg05839533 | KRT36 | Unclassified_Cell_type_specific | -0.3693614 | 2.5981589 | -4.606993 | 0.0000136 | 0.6442329 | 1.2630697 |
225839 | cg13972202 | HLA-DRB5 | -0.6535618 | 0.9934635 | -4.484811 | 0.0000218 | 0.6442329 | 0.9681296 | |
173035 | cg10417218 | MT1DP;MT1DP | Unclassified | -0.2437147 | -0.3404724 | -4.445310 | 0.0000253 | 0.6442329 | 0.8736202 |
249744 | cg15475272 | CCDC40 | -0.3161184 | 2.4786898 | -4.426963 | 0.0000272 | 0.6442329 | 0.8298660 | |
212267 | cg13181164 | MEIS2;MEIS2;MEIS2;MEIS2;MEIS2;MEIS2;MEIS2 | -0.4317426 | -1.3377767 | -4.421056 | 0.0000278 | 0.6442329 | 0.8158000 | |
254481 | cg15815117 | LOC100240726 | -0.1884227 | -0.1043439 | -4.416163 | 0.0000283 | 0.6442329 | 0.8041546 | |
169388 | cg10175334 | Unclassified | -0.4090550 | -2.4892256 | -4.407784 | 0.0000292 | 0.6442329 | 0.7842278 | |
44348 | cg02490736 | FOXF2 | -0.4212099 | -2.1707514 | -4.392464 | 0.0000309 | 0.6442329 | 0.7478453 | |
94014 | cg05407003 | Gene_Associated | -0.3813003 | 0.7027350 | -4.388086 | 0.0000315 | 0.6442329 | 0.7374616 | |
318725 | cg20355486 | EMILIN1 | -0.3106138 | 3.3857791 | -4.380245 | 0.0000324 | 0.6442329 | 0.7188758 | |
415870 | cg27338353 | Promoter_Associated_Cell_type_specific | -0.4186821 | -0.0083816 | -4.374199 | 0.0000332 | 0.6442329 | 0.7045543 | |
152554 | cg09073838 | SS18L1 | -0.3786977 | 3.8238329 | -4.368680 | 0.0000339 | 0.6442329 | 0.6914942 | |
27324 | cg01508600 | -0.1731648 | 0.8059384 | -4.359292 | 0.0000351 | 0.6442329 | 0.6692943 | ||
114206 | cg06710082 | HCG9 | Unclassified_Cell_type_specific | -0.2377063 | -1.8458535 | -4.348344 | 0.0000365 | 0.6442329 | 0.6434376 |
23420 | cg01282174 | -0.6082823 | -1.7803390 | -4.313454 | 0.0000416 | 0.6442329 | 0.5612625 | ||
287842 | cg18128914 | LOXL1 | -0.5179633 | 0.3381472 | -4.311807 | 0.0000419 | 0.6442329 | 0.5573914 | |
410941 | cg27005487 | TBX2 | Unclassified | -0.3160104 | 2.1006932 | -4.287003 | 0.0000460 | 0.6442329 | 0.4992007 |
420048 | cg27624471 | NFATC1;NFATC1;NFATC1;NFATC1 | -0.6632060 | 0.1888122 | -4.270459 | 0.0000489 | 0.6442329 | 0.4604866 | |
353401 | cg22977745 | NCOR2;NCOR2 | -0.3235785 | 1.9088217 | -4.270219 | 0.0000489 | 0.6442329 | 0.4599244 | |
291802 | cg18403480 | EXOG;EXOG | Promoter_Associated | -0.3214085 | -4.2495188 | -4.246573 | 0.0000534 | 0.6442329 | 0.4047337 |
138657 | cg08180624 | -0.2018448 | 0.1740520 | -4.225225 | 0.0000578 | 0.6442329 | 0.3550512 | ||
65298 | cg03694279 | Unclassified | -0.3691578 | 0.5948213 | -4.223948 | 0.0000581 | 0.6442329 | 0.3520820 | |
55328 | cg03114585 | HSPC157;HSPC157 | Promoter_Associated | -0.3182290 | -3.5355408 | -4.214670 | 0.0000601 | 0.6442329 | 0.3305370 |
93046 | cg05353710 | SESN2 | -0.4312160 | -5.1117417 | -4.214614 | 0.0000601 | 0.6442329 | 0.3304066 | |
104202 | cg06061536 | ULK4 | -0.3701378 | 2.8049169 | -4.207298 | 0.0000617 | 0.6442329 | 0.3134360 | |
258939 | cg16121929 | PITPNC1;PITPNC1 | -0.2931360 | -4.7362646 | -4.197012 | 0.0000641 | 0.6442329 | 0.2896006 | |
140967 | cg08319130 | Unclassified_Cell_type_specific | -0.3699686 | -2.2397584 | -4.185729 | 0.0000668 | 0.6442329 | 0.2634951 | |
35463 | cg01977082 | COX6C | Promoter_Associated | -0.4569839 | -2.5237696 | -4.178562 | 0.0000686 | 0.6442329 | 0.2469311 |
233717 | cg14404746 | RNF208 | -0.2194124 | -0.1769275 | -4.177486 | 0.0000689 | 0.6442329 | 0.2444456 | |
6731 | cg00361017 | PDE10A;PDE10A | -0.2563714 | 0.6908272 | -4.177020 | 0.0000690 | 0.6442329 | 0.2433692 | |
156392 | cg09323400 | DTX1 | -0.3423220 | 2.7074468 | -4.161551 | 0.0000730 | 0.6442329 | 0.2076830 | |
82061 | cg04695077 | -0.3372263 | -1.5883073 | -4.135535 | 0.0000803 | 0.6442329 | 0.1478306 | ||
296555 | cg18743464 | Unclassified | -0.5215313 | 2.1601806 | -4.125626 | 0.0000833 | 0.6442329 | 0.1250899 | |
309294 | cg19683073 | SERINC5 | -0.2678489 | 2.4856089 | -4.117220 | 0.0000859 | 0.6442329 | 0.1058224 | |
92275 | cg05308617 | ARMC8;ARMC8;ARMC8 | Promoter_Associated | -0.2484864 | -4.2442040 | -4.105819 | 0.0000895 | 0.6442329 | 0.0797262 |
285237 | cg17955329 | DTX1 | -0.2411715 | 2.8839041 | -4.093041 | 0.0000937 | 0.6442329 | 0.0505278 | |
236466 | cg14555733 | -0.3029664 | 0.5697251 | -4.091771 | 0.0000942 | 0.6442329 | 0.0476282 | ||
326818 | cg20967819 | GALNTL4 | -0.2599536 | 2.8674794 | -4.089703 | 0.0000949 | 0.6442329 | 0.0429093 | |
213484 | cg13270163 | -0.2190285 | 2.8917139 | -4.085945 | 0.0000962 | 0.6442329 | 0.0343343 | ||
266277 | cg16594165 | MPZL2;MPZL2 | Unclassified_Cell_type_specific | -0.3858430 | -2.2235659 | -4.082617 | 0.0000973 | 0.6442329 | 0.0267469 |
103740 | cg06028917 | C3orf67 | Promoter_Associated | -0.3121932 | -0.0620771 | -4.067771 | 0.0001027 | 0.6442329 | -0.0070645 |
365617 | cg23846955 | -0.2524743 | 2.3001638 | -4.059978 | 0.0001056 | 0.6442329 | -0.0247818 | ||
86548 | cg04960798 | -0.1664954 | 1.6728883 | -4.059500 | 0.0001058 | 0.6442329 | -0.0258692 | ||
68276 | cg03875632 | WBP1;INO80B | Promoter_Associated | -0.2112879 | -2.8856104 | -4.039237 | 0.0001138 | 0.6442329 | -0.0718456 |
371725 | cg24272254 | ADAP1 | -0.2236222 | 2.3486922 | -4.033549 | 0.0001162 | 0.6442329 | -0.0847277 | |
340332 | cg21983151 | C7orf10;C7orf11 | Promoter_Associated | -0.2907522 | -1.4836878 | -4.032546 | 0.0001166 | 0.6442329 | -0.0869990 |
159443 | cg09520904 | CCND1 | -0.3600314 | -1.2963369 | -4.030591 | 0.0001174 | 0.6442329 | -0.0914219 |
dma2a_d<-nrow(subset(dm,adj.P.Val<0.05,logFC<0))
dma2a_u<-nrow(subset(dm,adj.P.Val<0.05,logFC>0))
confects <- limma_confects(fit.reduced, coef=3, fdr=0.05)
head(confects$table, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
rank | index | confect | effect | AveExpr | name |
---|---|---|---|---|---|
1 | 176632 | -2.069 | -2.5308948 | 1.8153693 | cg04462931 |
2 | 324814 | -1.924 | -2.3901657 | 2.5704202 | cg23719534 |
3 | 265197 | -1.825 | -2.3179009 | 1.7666283 | cg19097082 |
4 | 53347 | -1.627 | -2.0152874 | 2.2588835 | cg11955727 |
5 | 297838 | -1.459 | -2.1126372 | -2.3760004 | cg00804338 |
6 | 53343 | -1.459 | -1.7822655 | 1.6546291 | cg17765025 |
7 | 313251 | 1.353 | 1.9560341 | -3.4556757 | cg18382982 |
8 | 322235 | 1.326 | 2.0703602 | -2.8667410 | cg10631453 |
9 | 229722 | -1.314 | -1.9590167 | -1.9006382 | cg00167275 |
10 | 188638 | -1.280 | -1.5916747 | 2.1139101 | cg00399683 |
11 | 273633 | -1.215 | -1.5716343 | -2.2998759 | cg03691818 |
12 | 176630 | -1.182 | -1.4781893 | 2.2488355 | cg12949927 |
13 | 65789 | -1.104 | -1.3711675 | -1.8855545 | cg16218221 |
14 | 75042 | -1.067 | -1.4025925 | 2.9989938 | cg11643285 |
15 | 271146 | -0.903 | -1.2722945 | 0.8231207 | cg08037478 |
16 | 41029 | 0.839 | 1.2921667 | -1.0983490 | cg27540865 |
17 | 337459 | 0.834 | 1.2015393 | 1.3519899 | cg04946709 |
18 | 41030 | 0.831 | 1.2401525 | -1.7041248 | cg00500229 |
19 | 211995 | -0.784 | -1.0530178 | -0.6383195 | cg20926353 |
20 | 410835 | 0.767 | 1.1544876 | -3.6688186 | cg17612569 |
21 | 288528 | -0.767 | -1.3865263 | -2.5038099 | cg06710937 |
22 | 41027 | 0.756 | 1.1034492 | -1.2247305 | cg12691488 |
23 | 193178 | -0.705 | -1.0437069 | 3.1400423 | cg17307919 |
24 | 81288 | -0.696 | -1.0416062 | -2.7419348 | cg20891225 |
25 | 128407 | -0.696 | -1.1849110 | -0.7804492 | cg17226602 |
26 | 51691 | -0.696 | -1.0261359 | -4.0406337 | cg09725915 |
27 | 75043 | -0.661 | -0.9955372 | 2.0857061 | cg17238319 |
28 | 148854 | -0.640 | -1.0208063 | -2.2749837 | cg24919522 |
29 | 322236 | 0.624 | 0.9247093 | -1.7877385 | cg13150977 |
30 | 128405 | -0.623 | -0.9229669 | -0.8390964 | cg23950473 |
31 | 370423 | -0.613 | -0.8568102 | -3.3521714 | cg22345911 |
32 | 211998 | -0.609 | -0.8497801 | -1.6623215 | cg08656326 |
33 | 188640 | -0.609 | -0.8731885 | 2.2808284 | cg26914004 |
34 | 211996 | -0.579 | -0.8960249 | -1.5422363 | cg14095100 |
35 | 254009 | 0.567 | 0.8662377 | -3.1578103 | cg25294185 |
36 | 297839 | -0.563 | -0.9042795 | -3.1711853 | cg23778841 |
37 | 141981 | -0.540 | -0.8139520 | 1.5726483 | cg00774458 |
38 | 211997 | -0.506 | -0.8416898 | -2.1471700 | cg07852945 |
39 | 115950 | -0.494 | -0.8053672 | 0.1431798 | cg15633893 |
40 | 250856 | -0.477 | -0.7752258 | -2.4110580 | cg17232883 |
41 | 306304 | -0.475 | -0.8509578 | -4.1331163 | cg22794378 |
42 | 306409 | 0.463 | 0.7550899 | 1.1329100 | cg02325951 |
43 | 30377 | -0.462 | -0.9472634 | -0.3470653 | cg20746702 |
44 | 179533 | -0.460 | -0.7133119 | -3.9566762 | cg17743279 |
45 | 410648 | -0.444 | -0.7713124 | 3.6187520 | cg13421194 |
46 | 75095 | -0.427 | -0.8754085 | 2.2035361 | cg03911306 |
47 | 280053 | -0.418 | -0.6859080 | -2.2437268 | cg12900929 |
48 | 250857 | -0.418 | -0.7621414 | -2.4491943 | cg04858776 |
49 | 390794 | 0.415 | 0.7097186 | 2.1720955 | cg12184120 |
50 | 252620 | 0.404 | 0.9775862 | 4.4049186 | cg21963048 |
make_volcano(dma2a,name = "placebo_vs_supplement_baseline(sex,age)",mx=Mval_flt)
rownames(dma2a)<-dma2a[,1]
make_beeswarms(dm=dma2a ,name="placebo_vs_supplement_baseline(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_beeswarms_confects(confects = confects ,name="placebo_vs_supplement_baseline(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_heatmap(dm=dma2a , name="plb_supl_baseline" , mx=mxs ,n = 50, groups=groups)
make_heatmap2(confects = confects , name="placebo_vs_supplement_baseline(sex,age)",mx=mxs ,n = 50, groups=groups)
samplesheet<-targets
hcy<- samplesheet$characteristics_ch1.10
hcy<-strsplit(as.character(samplesheet$characteristics_ch1.10), " ")
hcy<-sapply(hcy, "[",5)
hcy<- as.numeric(hcy)
## Warning: NAs introduced by coercion
samplesheet<-samplesheet[which(!is.na(hcy)),]
hcy<-hcy[which(!is.na(hcy))]
groups<-cut(hcy,breaks = c(0,10,16,30),labels = c("low","medium","high"))
groups<-as.integer(groups)
sex <- factor(samplesheet$`gender:ch1`)
class(sex)
## [1] "factor"
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
mx <-Mval_flt
name="hcy_levels "
design <- model.matrix(~ age+ sex + groups)
mxs <- mx[,which( colnames(mx) %in% rownames(samplesheet) )]
fit.reduced <- lmFit(mxs,design)
fit.reduced <- eBayes(fit.reduced)
summary(decideTests(fit.reduced))
## (Intercept) age sexmale groups
## Down 152122 456 8475 0
## NotSig 78604 421882 409392 422374
## Up 191648 36 4507 0
dm <- topTable(fit.reduced,coef=4, number = Inf)
dma <- merge(myann,dm,by=0)
dma3a <- dma[order(dma$P.Value),]
head(dma3a, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
Row.names | UCSC_RefGene_Name | Regulatory_Feature_Group | logFC | AveExpr | t | P.Value | adj.P.Val | B | |
---|---|---|---|---|---|---|---|---|---|
85619 | cg04905210 | POLR3D | -0.2909751 | -2.8181289 | -5.371887 | 2.00e-07 | 0.1046320 | 5.870238 | |
156642 | cg09338148 | Unclassified | -0.2931696 | -1.1596550 | -5.108807 | 8.00e-07 | 0.1790773 | 4.858988 | |
74666 | cg04247967 | -0.2088138 | 3.1729506 | -5.007905 | 1.30e-06 | 0.1892859 | 4.480509 | ||
110052 | cg06458106 | -0.1899343 | 1.6656045 | -4.777115 | 3.80e-06 | 0.2366578 | 3.635174 | ||
402095 | cg26425904 | OCA2 | Unclassified | -0.2521839 | -4.0202814 | -4.734540 | 4.50e-06 | 0.2366578 | 3.482404 |
162975 | cg09762242 | SIPA1;SIPA1 | Promoter_Associated | -0.2087797 | -2.5239477 | -4.718052 | 4.90e-06 | 0.2366578 | 3.423509 |
307961 | cg19590707 | SLC16A3;SLC16A3;SLC16A3 | Promoter_Associated | -0.2467008 | -1.2356286 | -4.708482 | 5.10e-06 | 0.2366578 | 3.389395 |
64125 | cg03622371 | P2RY6;P2RY6;P2RY6;P2RY6 | Unclassified | -0.2431608 | -1.6675739 | -4.682883 | 5.70e-06 | 0.2366578 | 3.298398 |
177978 | cg10746622 | PRSSL1 | -0.1979079 | 1.5566666 | -4.682073 | 5.70e-06 | 0.2366578 | 3.295523 | |
185437 | cg11257888 | RCAN3 | 0.2789381 | 0.4854828 | 4.669664 | 6.00e-06 | 0.2366578 | 3.251550 | |
271668 | cg16971827 | CBL | Gene_Associated_Cell_type_specific | 0.3011052 | 1.7634117 | 4.640064 | 6.80e-06 | 0.2366578 | 3.147010 |
143226 | cg08469255 | DDR1;DDR1 | Unclassified | 0.2427084 | 1.4992731 | 4.630262 | 7.10e-06 | 0.2366578 | 3.112500 |
327265 | cg20997993 | Unclassified | -0.2453986 | 1.9607420 | -4.625325 | 7.30e-06 | 0.2366578 | 3.095137 | |
419067 | cg27557428 | Unclassified | -0.2797007 | -2.1746243 | -4.582311 | 8.80e-06 | 0.2632014 | 2.944469 | |
9200 | cg00493755 | LYRM5;CASC1;CASC1;LYRM5;CASC1 | Promoter_Associated | -0.2460229 | -4.0903750 | -4.559036 | 9.70e-06 | 0.2632014 | 2.863381 |
253594 | cg15742245 | CD177 | -0.2552377 | 1.9001641 | -4.529286 | 1.10e-05 | 0.2632014 | 2.760189 | |
270472 | cg16879574 | NHLRC1 | Promoter_Associated | -0.2482200 | -1.5623319 | -4.522584 | 1.13e-05 | 0.2632014 | 2.737016 |
357413 | cg23248150 | TLL1 | -0.2469338 | -1.5131333 | -4.518951 | 1.15e-05 | 0.2632014 | 2.724461 | |
50486 | cg02845204 | KRTAP5-9 | -0.3078736 | -0.4130480 | -4.511190 | 1.18e-05 | 0.2632014 | 2.697673 | |
352974 | cg22948808 | DGKZ | -0.2887675 | -0.3387494 | -4.491734 | 1.29e-05 | 0.2688694 | 2.630667 | |
69420 | cg03946955 | LMNA;LMNA;LMNA | Unclassified_Cell_type_specific | -0.1821841 | -2.3265557 | -4.462849 | 1.45e-05 | 0.2688694 | 2.531597 |
347332 | cg22537604 | CD177 | -0.3160844 | 1.0723564 | -4.449111 | 1.54e-05 | 0.2688694 | 2.484650 | |
250246 | cg15516314 | RTL1;MIR431;MIR433 | 0.2388790 | 2.9473348 | 4.446169 | 1.56e-05 | 0.2688694 | 2.474609 | |
24498 | cg01345727 | NEK3;NEK3;NEK3;NEK3 | Promoter_Associated_Cell_type_specific | -0.2348001 | 1.6307342 | -4.440824 | 1.59e-05 | 0.2688694 | 2.456385 |
53925 | cg03032053 | MICALL2 | Unclassified_Cell_type_specific | -0.1589026 | 0.3925761 | -4.438674 | 1.60e-05 | 0.2688694 | 2.449057 |
303786 | cg19284277 | SLC16A3;SLC16A3;SLC16A3 | -0.2454879 | -1.8224276 | -4.426545 | 1.69e-05 | 0.2688694 | 2.407775 | |
230154 | cg14204064 | ZNF8 | Promoter_Associated | -0.2742361 | -3.0217711 | -4.409907 | 1.81e-05 | 0.2688694 | 2.351285 |
363149 | cg23659250 | BRD1;LOC90834 | -0.2585163 | 0.6609813 | -4.405756 | 1.84e-05 | 0.2688694 | 2.337218 | |
260364 | cg16223079 | PPCDC | Unclassified_Cell_type_specific | -0.2583710 | -1.8110113 | -4.384839 | 2.01e-05 | 0.2688694 | 2.266483 |
14297 | cg00772000 | NHLRC1 | Promoter_Associated | -0.2609967 | -1.8483604 | -4.380251 | 2.05e-05 | 0.2688694 | 2.251002 |
297698 | cg18817487 | HAL | -0.3790407 | -1.7717583 | -4.379371 | 2.05e-05 | 0.2688694 | 2.248035 | |
92215 | cg05305327 | CBFA2T2;CBFA2T2;CBFA2T2 | 0.2043839 | 2.3923169 | 4.378931 | 2.06e-05 | 0.2688694 | 2.246551 | |
410157 | cg26954174 | NOD2 | Unclassified_Cell_type_specific | -0.3115589 | -1.8832771 | -4.373779 | 2.10e-05 | 0.2688694 | 2.229186 |
144037 | cg08521073 | HRK | -0.2359101 | -2.1676858 | -4.349141 | 2.32e-05 | 0.2888284 | 2.146366 | |
267311 | cg16659510 | BANP;BANP | Promoter_Associated_Cell_type_specific | -0.2229223 | 2.5750260 | -4.329877 | 2.52e-05 | 0.2967083 | 2.081862 |
144250 | cg08533162 | ERI3 | -0.2850556 | -0.7612482 | -4.292731 | 2.93e-05 | 0.2967083 | 1.958109 | |
252328 | cg15657641 | -0.3035536 | -1.6322671 | -4.289817 | 2.96e-05 | 0.2967083 | 1.948437 | ||
2751 | cg00138407 | KLHL18 | -0.2323776 | 1.3715433 | -4.288322 | 2.98e-05 | 0.2967083 | 1.943476 | |
99796 | cg05788125 | -0.2131635 | 0.5936882 | -4.264690 | 3.28e-05 | 0.2967083 | 1.865242 | ||
19616 | cg01063280 | -0.2672720 | 1.0662597 | -4.263833 | 3.29e-05 | 0.2967083 | 1.862409 | ||
15211 | cg00822241 | FUT2;FUT2 | -0.2399254 | -1.0038568 | -4.248947 | 3.50e-05 | 0.2967083 | 1.813312 | |
416671 | cg27392804 | -0.2130157 | -2.0726691 | -4.239815 | 3.63e-05 | 0.2967083 | 1.783256 | ||
375956 | cg24568579 | Unclassified | -0.2436754 | -1.2119162 | -4.239736 | 3.63e-05 | 0.2967083 | 1.782996 | |
302646 | cg19203575 | ZNF323;ZKSCAN3;ZNF323 | -0.1782436 | -0.8064745 | -4.234647 | 3.71e-05 | 0.2967083 | 1.766271 | |
409681 | cg26923863 | CTBP1;CTBP1 | -0.3047867 | -0.9822440 | -4.211853 | 4.06e-05 | 0.2967083 | 1.691547 | |
9466 | cg00504782 | -0.1842581 | 0.1387713 | -4.209512 | 4.10e-05 | 0.2967083 | 1.683892 | ||
194260 | cg11866943 | STAB1 | Unclassified_Cell_type_specific | -0.2089029 | -1.2894131 | -4.207078 | 4.14e-05 | 0.2967083 | 1.675935 |
299655 | cg18963859 | -0.2801317 | 0.7266168 | -4.195395 | 4.34e-05 | 0.2967083 | 1.637794 | ||
112787 | cg06625077 | CTRL | Gene_Associated_Cell_type_specific | 0.1254747 | 2.7974287 | 4.190018 | 4.43e-05 | 0.2967083 | 1.620268 |
247629 | cg15321306 | Promoter_Associated_Cell_type_specific | 0.2809539 | 1.4241166 | 4.181371 | 4.59e-05 | 0.2967083 | 1.592118 |
dma3a_d<-nrow(subset(dm,adj.P.Val<0.05,logFC<0))
dma3a_u<-nrow(subset(dm,adj.P.Val<0.05,logFC>0))
confects <- limma_confects(fit.reduced, coef=3, fdr=0.05)
head(confects$table, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
rank | index | confect | effect | AveExpr | name |
---|---|---|---|---|---|
1 | 176632 | -2.299 | -2.5651523 | 1.8733626 | cg04462931 |
2 | 324814 | -2.114 | -2.4011928 | 2.5944998 | cg23719534 |
3 | 265197 | -2.066 | -2.3870065 | 1.8494022 | cg19097082 |
4 | 53347 | -1.786 | -2.0319150 | 2.2569505 | cg11955727 |
5 | 297838 | -1.786 | -2.2076125 | -2.3947466 | cg00804338 |
6 | 322235 | 1.699 | 2.1448515 | -2.9115831 | cg10631453 |
7 | 53343 | -1.625 | -1.8147372 | 1.6929714 | cg17765025 |
8 | 313251 | 1.534 | 1.9520019 | -3.4576118 | cg18382982 |
9 | 229722 | -1.409 | -1.8599069 | -1.8654079 | cg00167275 |
10 | 188638 | -1.360 | -1.5560497 | 2.1335683 | cg00399683 |
11 | 273633 | -1.325 | -1.5932227 | -2.2768331 | cg03691818 |
12 | 176630 | -1.232 | -1.4338303 | 2.2755820 | cg12949927 |
13 | 65789 | -1.231 | -1.4015459 | -1.8779054 | cg16218221 |
14 | 75042 | -1.171 | -1.4179072 | 3.0325592 | cg11643285 |
15 | 288528 | -1.044 | -1.4779074 | -2.4993461 | cg06710937 |
16 | 337459 | 1.044 | 1.2800387 | 1.3549029 | cg04946709 |
17 | 41029 | 0.982 | 1.2807835 | -1.1066425 | cg27540865 |
18 | 271146 | -0.972 | -1.2189282 | 0.8297361 | cg08037478 |
19 | 410835 | 0.963 | 1.2133805 | -3.6458193 | cg17612569 |
20 | 41030 | 0.950 | 1.2520356 | -1.6938549 | cg00500229 |
21 | 41027 | 0.900 | 1.1477128 | -1.2066913 | cg12691488 |
22 | 81288 | -0.887 | -1.1336542 | -2.7286877 | cg20891225 |
23 | 128407 | -0.884 | -1.2172473 | -0.7308420 | cg17226602 |
24 | 211995 | -0.854 | -1.0419647 | -0.6220793 | cg20926353 |
25 | 193178 | -0.774 | -1.0035034 | 3.2045161 | cg17307919 |
26 | 75043 | -0.761 | -0.9762575 | 2.1203936 | cg17238319 |
27 | 51691 | -0.747 | -0.9747893 | -3.9822151 | cg09725915 |
28 | 148854 | -0.746 | -1.0082487 | -2.2550620 | cg24919522 |
29 | 297839 | -0.731 | -0.9724230 | -3.2003920 | cg23778841 |
30 | 128405 | -0.727 | -0.9280042 | -0.8307381 | cg23950473 |
31 | 322236 | 0.713 | 0.9284243 | -1.7895491 | cg13150977 |
32 | 254009 | 0.705 | 0.9118034 | -3.1570995 | cg25294185 |
33 | 188640 | -0.703 | -0.8802871 | 2.3001218 | cg26914004 |
34 | 370423 | -0.694 | -0.8599495 | -3.3858844 | cg22345911 |
35 | 30377 | -0.674 | -1.0088242 | -0.3844653 | cg20746702 |
36 | 306304 | -0.661 | -0.9082453 | -4.1341714 | cg22794378 |
37 | 211998 | -0.652 | -0.8248935 | -1.6392284 | cg08656326 |
38 | 250856 | -0.633 | -0.8523955 | -2.3870446 | cg17232883 |
39 | 75095 | -0.632 | -0.9510572 | 2.2432959 | cg03911306 |
40 | 115950 | -0.624 | -0.8480831 | 0.1107559 | cg15633893 |
41 | 211996 | -0.622 | -0.8489614 | -1.5257228 | cg14095100 |
42 | 141981 | -0.621 | -0.7981709 | 1.5878170 | cg00774458 |
43 | 403868 | -0.619 | -1.3816985 | -1.7066753 | cg14815891 |
44 | 250857 | -0.583 | -0.8174271 | -2.4288200 | cg04858776 |
45 | 254556 | 0.579 | 0.9689510 | -3.7586127 | cg12052203 |
46 | 179533 | -0.579 | -0.7627629 | -3.9454190 | cg17743279 |
47 | 352937 | -0.565 | -0.8120516 | 2.0552523 | cg20299935 |
48 | 211997 | -0.556 | -0.7973435 | -2.1167179 | cg07852945 |
49 | 52402 | 0.530 | 0.7948238 | -4.6558021 | cg06642617 |
50 | 306409 | 0.525 | 0.7437398 | 1.1029951 | cg02325951 |
make_volcano(dma3a,name = "hcy_levels(sex,age)",mx=Mval_flt)
rownames(dma3a)<-dma3a[,1]
make_beeswarms(dm=dma3a ,name="hcy_levels(sex,age)" , mx=beta_flt , groups=groups , n= 15)
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
make_beeswarms_confects(confects = confects ,name="hcy_levels(sex,age)" , mx=beta_flt , groups=groups , n= 15)
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in min(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
heatmap_c(dm=dma3a , name="hcy_levels(sex,age)" , mx=mxs ,n = 50, groups=groups)
make_heatmap2_c(confects = confects , name="hcy_levels(sex,age)",mx=mxs ,n = 50, groups=groups)
samplesheet<-targets
folate_levels<- samplesheet$characteristics_ch1.8
folate_levels<-strsplit(as.character(samplesheet$characteristics_ch1.8), " ")
folate_levels<-sapply(folate_levels , "[",5)
folate_levels<-as.numeric(folate_levels)
sex <- factor(samplesheet$`gender:ch1`)
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
groups<-factor(samplesheet$source_name_ch1,levels = c("Buffy coat, placebo, baseline","Buffy coat, FA/vB12, baseline"))
mx <-Mval_flt
name="folate_levels"
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
design <- model.matrix(~ age+ sex + folate_levels)
mxs <- mx[,which( colnames(mx) %in% rownames(samplesheet) )]
fit.reduced <- lmFit(mxs,design)
fit.reduced <- eBayes(fit.reduced)
summary(decideTests(fit.reduced))
## (Intercept) age sexmale folate_levels
## Down 152992 582 6294 0
## NotSig 78117 421743 413037 422374
## Up 191265 49 3043 0
dm <- topTable(fit.reduced,coef=4, number = Inf)
dma <- merge(myann,dm,by=0)
dma4a <- dma[order(dma$P.Value),]
head(dma4a, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
Row.names | UCSC_RefGene_Name | Regulatory_Feature_Group | logFC | AveExpr | t | P.Value | adj.P.Val | B | |
---|---|---|---|---|---|---|---|---|---|
381818 | cg24973150 | HOXB7 | Unclassified | 0.0071236 | -4.8580902 | 4.568118 | 0.0000092 | 0.9999919 | 1.0632810 |
247130 | cg15276500 | ADRM1;ADRM1 | Promoter_Associated | 0.0064797 | -3.3705031 | 4.340403 | 0.0000240 | 0.9999919 | 0.1470237 |
192391 | cg11754259 | ZBTB44;ZBTB44 | 0.0047836 | -3.1951796 | 4.200945 | 0.0000422 | 0.9999919 | -0.3954523 | |
46268 | cg02601626 | CHID1;CHID1;CHID1;CHID1;CHID1 | 0.0043225 | 2.0032098 | 4.165838 | 0.0000486 | 0.9999919 | -0.5297401 | |
57246 | cg03226872 | BLCAP;BLCAP;BLCAP;BLCAP;BLCAP | 0.0045386 | 2.7608582 | 4.109434 | 0.0000608 | 0.9999919 | -0.7435481 | |
262150 | cg16337546 | LEMD2 | 0.0054636 | -3.2189034 | 4.108911 | 0.0000609 | 0.9999919 | -0.7455175 | |
52836 | cg02968854 | NOD1 | Promoter_Associated | -0.0062364 | -5.3353079 | -4.084096 | 0.0000672 | 0.9999919 | -0.8388132 |
135319 | cg07973395 | BLM | Promoter_Associated | 0.0041446 | -3.5093588 | 4.066914 | 0.0000718 | 0.9999919 | -0.9031363 |
263054 | cg16397021 | ATP10A | 0.0073693 | 3.2658426 | 4.066439 | 0.0000720 | 0.9999919 | -0.9049111 | |
31908 | cg01781745 | KLF9;KLF9 | Promoter_Associated | 0.0046187 | -3.8158746 | 4.054553 | 0.0000754 | 0.9999919 | -0.9492743 |
33783 | cg01884526 | BANP;BANP | 0.0043175 | 3.8476799 | 4.023402 | 0.0000851 | 0.9999919 | -1.0650280 | |
54275 | cg03050907 | SNHG3-RCC1;SNHG3-RCC1;SNHG3-RCC1;RCC1;RCC1;RCC1 | Promoter_Associated | 0.0063583 | -5.1741499 | 3.980437 | 0.0001005 | 0.9999919 | -1.2234582 |
268022 | cg16702725 | PCP4L1 | 0.0041713 | 3.1263612 | 3.966659 | 0.0001060 | 0.9999919 | -1.2739643 | |
414611 | cg27260462 | GLRX3 | Promoter_Associated_Cell_type_specific | 0.0067675 | -2.3642002 | 3.926284 | 0.0001238 | 0.9999919 | -1.4211215 |
282609 | cg17770813 | 0.0064121 | 1.1753881 | 3.919293 | 0.0001271 | 0.9999919 | -1.4464738 | ||
17615 | cg00957505 | 0.0035735 | 2.6585336 | 3.888577 | 0.0001429 | 0.9999919 | -1.5574138 | ||
295020 | cg18630811 | ILF3;ILF3;ILF3;ILF3;ILF3 | 0.0044830 | 3.1207267 | 3.874315 | 0.0001508 | 0.9999919 | -1.6086772 | |
54596 | cg03067660 | KLC4;KLC4;KLC4;KLC4;MRPL2 | Promoter_Associated | 0.0051393 | -3.9098320 | 3.833774 | 0.0001757 | 0.9999919 | -1.7535242 |
385405 | cg25230532 | GALT | Promoter_Associated | 0.0048199 | -1.4445749 | 3.832550 | 0.0001765 | 0.9999919 | -1.7578778 |
176369 | cg10630085 | RELT;RELT | -0.0056978 | 3.7335957 | -3.829486 | 0.0001785 | 0.9999919 | -1.7687710 | |
21985 | cg01195053 | LOC652276 | Promoter_Associated | 0.0084686 | -3.6687370 | 3.801274 | 0.0001984 | 0.9999919 | -1.8687120 |
198667 | cg12165758 | PRKCH | Unclassified_Cell_type_specific | 0.0039279 | -3.8914122 | 3.798961 | 0.0002001 | 0.9999919 | -1.8768778 |
370353 | cg24158205 | HCN2 | Unclassified_Cell_type_specific | 0.0059700 | 1.0014937 | 3.748887 | 0.0002409 | 0.9999919 | -2.0526307 |
149010 | cg08844849 | SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10;SIGLEC10 | -0.0051151 | 1.7152455 | -3.727770 | 0.0002604 | 0.9999919 | -2.1261534 | |
184607 | cg11207127 | SORBS2;SORBS2;SORBS2;SORBS2;SORBS2;SORBS2 | -0.0052452 | 3.0271340 | -3.720251 | 0.0002676 | 0.9999919 | -2.1522492 | |
292391 | cg18443378 | WDR17;WDR17 | Promoter_Associated | 0.0050128 | -2.8181357 | 3.719372 | 0.0002685 | 0.9999919 | -2.1552950 |
326423 | cg20941699 | FAM96A;FAM96A | Promoter_Associated | 0.0037577 | -3.4535203 | 3.716566 | 0.0002713 | 0.9999919 | -2.1650193 |
88348 | cg05065583 | CLK1;CLK1;CLK1;CLK1 | Promoter_Associated | 0.0041903 | -3.7007473 | 3.713937 | 0.0002739 | 0.9999919 | -2.1741243 |
398207 | cg26169213 | SEMA7A;SEMA7A;SEMA7A | 0.0053135 | 2.5494735 | 3.707901 | 0.0002800 | 0.9999919 | -2.1950099 | |
42081 | cg02360155 | 0.0059986 | 5.0408670 | 3.699656 | 0.0002886 | 0.9999919 | -2.2234872 | ||
402414 | cg26450254 | PWWP2B;PWWP2B | Gene_Associated_Cell_type_specific | -0.0073089 | 4.2912980 | -3.698964 | 0.0002893 | 0.9999919 | -2.2258765 |
261499 | cg16297271 | SERPINA12 | 0.0066996 | -2.1901291 | 3.674056 | 0.0003168 | 0.9999919 | -2.3115687 | |
64583 | cg03649649 | Promoter_Associated | 0.0062803 | -3.5258086 | 3.673286 | 0.0003177 | 0.9999919 | -2.3142119 | |
84203 | cg04829364 | GPR133 | 0.0043982 | 3.1193344 | 3.669226 | 0.0003224 | 0.9999919 | -2.3281317 | |
93526 | cg05378013 | ZXDC | -0.0057535 | 2.9129961 | -3.663117 | 0.0003297 | 0.9999919 | -2.3490488 | |
272482 | cg17031727 | COG2;COG2 | Promoter_Associated | -0.0066573 | -2.2885795 | -3.662482 | 0.0003304 | 0.9999919 | -2.3512193 |
158576 | cg09464206 | CASP8;CASP8;CASP8;CASP8;CASP8 | 0.0037463 | -3.5842511 | 3.661019 | 0.0003322 | 0.9999919 | -2.3562258 | |
109956 | cg06451822 | -0.0041623 | 2.4764852 | -3.656121 | 0.0003381 | 0.9999919 | -2.3729656 | ||
134016 | cg07895124 | GPR114 | 0.0056314 | 2.6442008 | 3.654963 | 0.0003395 | 0.9999919 | -2.3769229 | |
211097 | cg13089318 | 0.0034547 | 1.0288610 | 3.646567 | 0.0003500 | 0.9999919 | -2.4055663 | ||
182034 | cg11024450 | MAD1L1;MAD1L1;MAD1L1 | 0.0054800 | 2.0720688 | 3.640644 | 0.0003576 | 0.9999919 | -2.4257400 | |
264506 | cg16489826 | TCP1;TCP1;MRPL18 | Promoter_Associated | 0.0059084 | -3.7811792 | 3.638181 | 0.0003608 | 0.9999919 | -2.4341208 |
37168 | cg02074116 | Unclassified | 0.0044117 | -0.3795878 | 3.633242 | 0.0003673 | 0.9999919 | -2.4509140 | |
361042 | cg23507761 | CANT1;CANT1;CANT1 | Gene_Associated_Cell_type_specific | 0.0046564 | 2.5308403 | 3.625377 | 0.0003778 | 0.9999919 | -2.4776097 |
113721 | cg06679534 | CXCR4 | 0.0037064 | -4.1204716 | 3.615431 | 0.0003916 | 0.9999919 | -2.5113001 | |
40865 | cg02293991 | VEGFB | 0.0037897 | 2.5839972 | 3.613116 | 0.0003948 | 0.9999919 | -2.5191302 | |
103353 | cg06002197 | CENPN;CENPN;CENPN;C16orf61 | 0.0057178 | -0.1228313 | 3.608650 | 0.0004012 | 0.9999919 | -2.5342260 | |
50670 | cg02854137 | 0.0038452 | 2.8310675 | 3.603358 | 0.0004089 | 0.9999919 | -2.5520893 | ||
26772 | cg01471621 | NUDT3 | 0.0048041 | 3.1945042 | 3.591610 | 0.0004264 | 0.9999919 | -2.5916687 | |
105198 | cg06126829 | HNF4A;HNF4A;HNF4A | 0.0070803 | 3.0664134 | 3.590151 | 0.0004287 | 0.9999919 | -2.5965750 |
dma4a_d<-nrow(subset(dm,adj.P.Val<0.05,logFC<0))
dma4a_u<-nrow(subset(dm,adj.P.Val<0.05,logFC>0))
confects <- limma_confects(fit.reduced, coef=3, fdr=0.05)
head(confects$table, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
rank | index | confect | effect | AveExpr | name |
---|---|---|---|---|---|
1 | 176632 | -2.299 | -2.5618711 | 1.8745849 | cg04462931 |
2 | 324814 | -2.116 | -2.4094963 | 2.6021532 | cg23719534 |
3 | 265197 | -2.065 | -2.3816489 | 1.8499402 | cg19097082 |
4 | 53347 | -1.787 | -2.0305863 | 2.2574355 | cg11955727 |
5 | 297838 | -1.761 | -2.1904564 | -2.3868150 | cg00804338 |
6 | 322235 | 1.702 | 2.1473669 | -2.9147459 | cg10631453 |
7 | 53343 | -1.622 | -1.8083044 | 1.6931913 | cg17765025 |
8 | 313251 | 1.531 | 1.9474568 | -3.4606989 | cg18382982 |
9 | 229722 | -1.425 | -1.8738482 | -1.8717857 | cg00167275 |
10 | 188638 | -1.361 | -1.5588641 | 2.1372587 | cg00399683 |
11 | 273633 | -1.324 | -1.5936214 | -2.2746085 | cg03691818 |
12 | 176630 | -1.231 | -1.4317051 | 2.2787448 | cg12949927 |
13 | 65789 | -1.227 | -1.3981023 | -1.8801255 | cg16218221 |
14 | 75042 | -1.173 | -1.4184867 | 3.0337831 | cg11643285 |
15 | 288528 | -1.059 | -1.4924449 | -2.4972840 | cg06710937 |
16 | 337459 | 1.059 | 1.2922211 | 1.3551544 | cg04946709 |
17 | 271146 | -0.983 | -1.2315477 | 0.8309781 | cg08037478 |
18 | 41029 | 0.975 | 1.2717724 | -1.1080107 | cg27540865 |
19 | 410835 | 0.968 | 1.2155384 | -3.6483241 | cg17612569 |
20 | 41030 | 0.912 | 1.2198461 | -1.6897890 | cg00500229 |
21 | 41027 | 0.906 | 1.1517501 | -1.2098140 | cg12691488 |
22 | 81288 | -0.877 | -1.1206602 | -2.7320918 | cg20891225 |
23 | 128407 | -0.872 | -1.2006829 | -0.7352748 | cg17226602 |
24 | 211995 | -0.858 | -1.0462097 | -0.6242773 | cg20926353 |
25 | 193178 | -0.784 | -1.0125337 | 3.2036652 | cg17307919 |
26 | 75043 | -0.761 | -0.9739151 | 2.1217197 | cg17238319 |
27 | 51691 | -0.753 | -0.9784046 | -3.9818948 | cg09725915 |
28 | 148854 | -0.744 | -1.0044218 | -2.2547765 | cg24919522 |
29 | 297839 | -0.733 | -0.9727861 | -3.1990136 | cg23778841 |
30 | 128405 | -0.724 | -0.9228725 | -0.8301097 | cg23950473 |
31 | 322236 | 0.716 | 0.9302795 | -1.7916635 | cg13150977 |
32 | 254009 | 0.706 | 0.9098948 | -3.1550395 | cg25294185 |
33 | 188640 | -0.703 | -0.8810250 | 2.3047020 | cg26914004 |
34 | 370423 | -0.698 | -0.8637668 | -3.3898213 | cg22345911 |
35 | 30377 | -0.679 | -1.0110079 | -0.3819613 | cg20746702 |
36 | 211998 | -0.659 | -0.8304600 | -1.6388716 | cg08656326 |
37 | 306304 | -0.655 | -0.9005378 | -4.1351610 | cg22794378 |
38 | 403868 | -0.645 | -1.4096067 | -1.6930084 | cg14815891 |
39 | 75095 | -0.636 | -0.9517757 | 2.2411141 | cg03911306 |
40 | 250856 | -0.632 | -0.8500472 | -2.3879317 | cg17232883 |
41 | 115950 | -0.628 | -0.8507060 | 0.1072535 | cg15633893 |
42 | 211996 | -0.626 | -0.8532909 | -1.5224504 | cg14095100 |
43 | 141981 | -0.612 | -0.7882406 | 1.5917208 | cg00774458 |
44 | 179533 | -0.581 | -0.7631020 | -3.9471556 | cg17743279 |
45 | 250857 | -0.578 | -0.8124891 | -2.4312169 | cg04858776 |
46 | 352937 | -0.574 | -0.8199050 | 2.0575316 | cg20299935 |
47 | 254556 | 0.573 | 0.9593017 | -3.7638231 | cg12052203 |
48 | 211997 | -0.559 | -0.7969307 | -2.1186953 | cg07852945 |
49 | 101058 | -0.539 | -0.8622674 | -3.4158041 | cg09067967 |
50 | 52402 | 0.533 | 0.7972882 | -4.6529575 | cg06642617 |
make_volcano(dma4a,name = "folate_levels(sex,age)",mx=Mval_flt)
rownames(dma4a)<-dma4a[,1]
make_beeswarms(dm=dma4a ,name="folate_levels(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_beeswarms_confects(confects = confects ,name="folate_levels(sex,age)" , mx=beta_flt , groups=groups , n= 15)
make_heatmap(dm=dma4a , name="folate_levels(sex,age)" , mx=mxs ,n = 50, groups=groups)
make_heatmap2(confects = confects , name="folate_levels(sex,age)",mx=mxs ,n = 50, groups=groups)
samplesheet<-targets
vitb12_levels<- targets$characteristics_ch1.9
vitb12_levels<-strsplit(as.character(samplesheet$characteristics_ch1.9), " ")
vitb12_levels<-sapply(vitb12_levels , "[",6)
vitb12_levels<-as.numeric(vitb12_levels)
sex <- factor(samplesheet$`gender:ch1`)
age<-samplesheet$`age at baseline:ch1`
age<-as.numeric(age)
mx <-Mval_flt
name="vitmin_b12_levels"
groups<-factor(samplesheet$source_name_ch1,levels = c("Buffy coat, placebo, baseline","Buffy coat, FA/vB12, baseline"))
design <- model.matrix(~ age+ sex + vitb12_levels)
mxs <- mx[,which( colnames(mx) %in% rownames(samplesheet) )]
fit.reduced <- lmFit(mxs,design)
fit.reduced <- eBayes(fit.reduced)
summary(decideTests(fit.reduced))
## (Intercept) age sexmale vitb12_levels
## Down 153809 573 6213 0
## NotSig 76635 421750 412723 422374
## Up 191930 51 3438 0
dm <- topTable(fit.reduced,coef=4, number = Inf)
dma <- merge(myann,dm,by=0)
dma5a <- dma[order(dma$P.Value),]
head(dma5a, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
Row.names | UCSC_RefGene_Name | Regulatory_Feature_Group | logFC | AveExpr | t | P.Value | adj.P.Val | B | |
---|---|---|---|---|---|---|---|---|---|
203268 | cg12507502 | -0.0009416 | 5.3800262 | -5.365645 | 0.0000003 | 0.1065226 | 2.1537502 | ||
147408 | cg08736516 | LOC285456;RPL34;RPL34;RPL34 | Promoter_Associated | 0.0005836 | -3.1538320 | 4.681644 | 0.0000057 | 0.7398785 | -0.8662518 |
393251 | cg25807487 | MRGPRF;MRGPRF | Unclassified | -0.0010739 | 1.8937737 | -4.647245 | 0.0000066 | 0.7398785 | -1.0098314 |
276611 | cg17319849 | GBA;GBA;GBA;GBA | Promoter_Associated | 0.0004946 | -3.9746078 | 4.632719 | 0.0000070 | 0.7398785 | -1.0702099 |
369660 | cg24116534 | 0.0007022 | -3.2460840 | 4.481022 | 0.0000134 | 0.7674311 | -1.6918747 | ||
100086 | cg05805987 | EIF3E | Promoter_Associated | 0.0004402 | -3.6338665 | 4.439138 | 0.0000159 | 0.7674311 | -1.8606240 |
231157 | cg14255417 | TRIM8 | Gene_Associated_Cell_type_specific | 0.0007443 | -3.1856978 | 4.438037 | 0.0000160 | 0.7674311 | -1.8650435 |
268315 | cg16717773 | GBA;GBA;GBA;GBA;GBA | Promoter_Associated_Cell_type_specific | 0.0004738 | -3.8451926 | 4.423236 | 0.0000170 | 0.7674311 | -1.9243639 |
26583 | cg01459962 | CCDC101 | Promoter_Associated | 0.0004012 | -3.9998096 | 4.387869 | 0.0000197 | 0.7674311 | -2.0654647 |
389498 | cg25530661 | CLOCK | Gene_Associated_Cell_type_specific | 0.0006179 | -2.0667279 | 4.383782 | 0.0000200 | 0.7674311 | -2.0817132 |
217912 | cg13529619 | RAD18;RAD18 | Promoter_Associated | 0.0004526 | -3.0803031 | 4.376228 | 0.0000207 | 0.7674311 | -2.1117096 |
222818 | cg13801712 | RRAGC | Promoter_Associated | 0.0004206 | -3.3982579 | 4.339208 | 0.0000241 | 0.7674311 | -2.2581163 |
84404 | cg04839664 | Unclassified_Cell_type_specific | 0.0004595 | -4.4607832 | 4.315898 | 0.0000265 | 0.7674311 | -2.3497892 | |
20518 | cg01110552 | MGEA5;MGEA5 | Promoter_Associated | 0.0005150 | -4.0633675 | 4.312453 | 0.0000269 | 0.7674311 | -2.3633034 |
374615 | cg24477193 | ALG14 | Promoter_Associated | 0.0007046 | -3.9064259 | 4.309022 | 0.0000273 | 0.7674311 | -2.3767542 |
44935 | cg02525785 | DLG4;DLG4 | Promoter_Associated | 0.0005586 | -3.7905421 | 4.236954 | 0.0000365 | 0.9259187 | -2.6572796 |
369789 | cg24124753 | GTF2E1;GTF2E1;RABL3 | NonGene_Associated | 0.0005779 | -3.8846718 | 4.218196 | 0.0000394 | 0.9259187 | -2.7296656 |
319418 | cg20409368 | 0.0007158 | 3.1305905 | 4.188720 | 0.0000443 | 0.9259187 | -2.8428800 | ||
45545 | cg02563389 | MED13L | Promoter_Associated | 0.0005532 | -4.2678921 | 4.168437 | 0.0000481 | 0.9259187 | -2.9204064 |
38439 | cg02149069 | IFFO1;IFFO1;IFFO1 | Unclassified | 0.0004986 | -0.8278389 | 4.084808 | 0.0000670 | 0.9259187 | -3.2367902 |
155983 | cg09299381 | DNAL4 | Promoter_Associated | 0.0003822 | -4.5540472 | 4.083046 | 0.0000674 | 0.9259187 | -3.2433985 |
6228 | cg00335286 | MC2R | -0.0007496 | 1.4058116 | -4.080952 | 0.0000680 | 0.9259187 | -3.2512517 | |
189735 | cg11575738 | DLX1;DLX1 | Unclassified | 0.0005220 | -3.3999921 | 4.075813 | 0.0000694 | 0.9259187 | -3.2705023 |
414693 | cg27265630 | PCDH21 | 0.0004658 | 3.1146707 | 4.060414 | 0.0000737 | 0.9259187 | -3.3280775 | |
104375 | cg06073402 | DBF4B;DBF4B;DBF4B;DBF4B | Promoter_Associated | 0.0005517 | -5.5630127 | 4.060091 | 0.0000738 | 0.9259187 | -3.3292855 |
38408 | cg02147443 | Unclassified_Cell_type_specific | 0.0006420 | -3.1155845 | 4.046539 | 0.0000778 | 0.9259187 | -3.3798005 | |
392835 | cg25774116 | TMEM161A | Promoter_Associated | 0.0006194 | -4.6466798 | 4.017679 | 0.0000870 | 0.9259187 | -3.4869123 |
129227 | cg07588308 | ZNF720;ZNF720 | Unclassified | 0.0005300 | -3.7712579 | 4.016968 | 0.0000873 | 0.9259187 | -3.4895420 |
83533 | cg04787325 | SYT17 | 0.0005419 | -4.3903604 | 4.008324 | 0.0000903 | 0.9259187 | -3.5214968 | |
353196 | cg22963133 | ARL15 | 0.0004652 | -2.7234020 | 4.006595 | 0.0000909 | 0.9259187 | -3.5278806 | |
101640 | cg05905482 | NonGene_Associated | 0.0004048 | -3.3762492 | 4.001623 | 0.0000926 | 0.9259187 | -3.5462254 | |
77783 | cg04431990 | BAT1;SNORD84;BAT1 | Unclassified | 0.0004200 | -4.2586832 | 3.992140 | 0.0000961 | 0.9259187 | -3.5811653 |
46151 | cg02595280 | NOS1 | Unclassified | 0.0008573 | -1.7189406 | 3.988757 | 0.0000974 | 0.9259187 | -3.5936136 |
311546 | cg19823793 | SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1;SGOL1 | Promoter_Associated | 0.0002946 | -2.0987417 | 3.986399 | 0.0000983 | 0.9259187 | -3.6022854 |
379225 | cg24792272 | MCM4;MCM4;PRKDC;PRKDC | Promoter_Associated | 0.0004337 | -3.7201160 | 3.973070 | 0.0001034 | 0.9259187 | -3.6512191 |
331173 | cg21266547 | SERPINB8;SERPINB8 | 0.0006143 | 3.0747322 | 3.970049 | 0.0001046 | 0.9259187 | -3.6622894 | |
232280 | cg14317513 | SIM2;SIM2 | 0.0005898 | -1.4087609 | 3.969420 | 0.0001049 | 0.9259187 | -3.6645964 | |
350929 | cg22805909 | PAPOLA | 0.0006367 | -2.8258495 | 3.958628 | 0.0001093 | 0.9259187 | -3.7040848 | |
16682 | cg00906976 | TSNAX-DISC1;TSNAX-DISC1;TSNAX-DISC1;TSNAX;TSNAX-DISC1;TSNAX-DISC1;TSNAX-DISC1;TSNAX-DISC1;TSNAX-DISC1 | Promoter_Associated | 0.0003862 | -3.9548576 | 3.958157 | 0.0001095 | 0.9259187 | -3.7058047 |
1618 | cg00080333 | Unclassified_Cell_type_specific | 0.0006591 | -2.1465860 | 3.946112 | 0.0001147 | 0.9259187 | -3.7497712 | |
116151 | cg06818786 | RNF121;LOC100133315;RNF121;RNF121 | Promoter_Associated | 0.0003323 | -3.6566412 | 3.939152 | 0.0001178 | 0.9259187 | -3.7751208 |
278338 | cg17441062 | GRM5;GRM5 | Unclassified | 0.0003959 | -2.0276002 | 3.931328 | 0.0001214 | 0.9259187 | -3.8035774 |
294635 | cg18597434 | TBC1D4 | Promoter_Associated | 0.0004462 | -3.4612557 | 3.927917 | 0.0001230 | 0.9259187 | -3.8159686 |
97151 | cg05617927 | FAM103A1 | Promoter_Associated | 0.0004792 | -3.9902884 | 3.923137 | 0.0001253 | 0.9259187 | -3.8333160 |
281834 | cg17713910 | PARD3 | -0.0005427 | 1.6129594 | -3.908944 | 0.0001322 | 0.9259187 | -3.8847223 | |
189545 | cg11561665 | Promoter_Associated | 0.0005168 | -3.6222908 | 3.885221 | 0.0001447 | 0.9259187 | -3.9702982 | |
267447 | cg16667631 | 0.0005275 | -2.2090323 | 3.885201 | 0.0001447 | 0.9259187 | -3.9703697 | ||
388208 | cg25432323 | AARS | Promoter_Associated | 0.0004723 | -4.3107747 | 3.884792 | 0.0001449 | 0.9259187 | -3.9718418 |
381205 | cg24926775 | SNX27 | Promoter_Associated | 0.0004397 | -3.6262528 | 3.874580 | 0.0001506 | 0.9259187 | -4.0085416 |
274648 | cg17180977 | WNT9A | 0.0004509 | -3.3265757 | 3.868108 | 0.0001544 | 0.9259187 | -4.0317555 |
dma5a_d<- nrow(subset(dm,adj.P.Val<0.05,logFC<0))
dma5a_u<-nrow(subset(dm,adj.P.Val<0.05,logFC>0))
confects <- limma_confects(fit.reduced, coef=3, fdr=0.05)
head(confects$table, 50) %>% kbl() %>% kable_paper("hover", full_width = F)
rank | index | confect | effect | AveExpr | name |
---|---|---|---|---|---|
1 | 176632 | -2.279 | -2.5433782 | 1.8745849 | cg04462931 |
2 | 324814 | -2.110 | -2.4079759 | 2.6021532 | cg23719534 |
3 | 265197 | -2.045 | -2.3651916 | 1.8499402 | cg19097082 |
4 | 53347 | -1.776 | -2.0224392 | 2.2574355 | cg11955727 |
5 | 297838 | -1.766 | -2.2030100 | -2.3868150 | cg00804338 |
6 | 322235 | 1.693 | 2.1463491 | -2.9147459 | cg10631453 |
7 | 53343 | -1.608 | -1.7966819 | 1.6931913 | cg17765025 |
8 | 313251 | 1.555 | 1.9748795 | -3.4606989 | cg18382982 |
9 | 229722 | -1.415 | -1.8707366 | -1.8717857 | cg00167275 |
10 | 188638 | -1.354 | -1.5546785 | 2.1372587 | cg00399683 |
11 | 273633 | -1.315 | -1.5887049 | -2.2746085 | cg03691818 |
12 | 176630 | -1.226 | -1.4298886 | 2.2787448 | cg12949927 |
13 | 65789 | -1.218 | -1.3922487 | -1.8801255 | cg16218221 |
14 | 75042 | -1.162 | -1.4106724 | 3.0337831 | cg11643285 |
15 | 288528 | -1.053 | -1.4944865 | -2.4972840 | cg06710937 |
16 | 337459 | 1.045 | 1.2840252 | 1.3551544 | cg04946709 |
17 | 41029 | 0.985 | 1.2863989 | -1.1080107 | cg27540865 |
18 | 410835 | 0.980 | 1.2302290 | -3.6483241 | cg17612569 |
19 | 271146 | -0.978 | -1.2290161 | 0.8309781 | cg08037478 |
20 | 41030 | 0.939 | 1.2493632 | -1.6897890 | cg00500229 |
21 | 41027 | 0.901 | 1.1514586 | -1.2098140 | cg12691488 |
22 | 128407 | -0.879 | -1.2157541 | -0.7352748 | cg17226602 |
23 | 81288 | -0.871 | -1.1192663 | -2.7320918 | cg20891225 |
24 | 211995 | -0.853 | -1.0435152 | -0.6242773 | cg20926353 |
25 | 193178 | -0.763 | -0.9925476 | 3.2036652 | cg17307919 |
26 | 75043 | -0.758 | -0.9753124 | 2.1217197 | cg17238319 |
27 | 51691 | -0.744 | -0.9739468 | -3.9818948 | cg09725915 |
28 | 148854 | -0.735 | -0.9999035 | -2.2547765 | cg24919522 |
29 | 297839 | -0.728 | -0.9716996 | -3.1990136 | cg23778841 |
30 | 128405 | -0.718 | -0.9198280 | -0.8301097 | cg23950473 |
31 | 322236 | 0.716 | 0.9341674 | -1.7916635 | cg13150977 |
32 | 254009 | 0.709 | 0.9161505 | -3.1550395 | cg25294185 |
33 | 370423 | -0.698 | -0.8671886 | -3.3898213 | cg22345911 |
34 | 188640 | -0.697 | -0.8773760 | 2.3047020 | cg26914004 |
35 | 30377 | -0.674 | -1.0115557 | -0.3819613 | cg20746702 |
36 | 306304 | -0.657 | -0.9066482 | -4.1351610 | cg22794378 |
37 | 211998 | -0.657 | -0.8307659 | -1.6388716 | cg08656326 |
38 | 403868 | -0.650 | -1.4298864 | -1.6930084 | cg14815891 |
39 | 115950 | -0.631 | -0.8575188 | 0.1072535 | cg15633893 |
40 | 75095 | -0.631 | -0.9514234 | 2.2411141 | cg03911306 |
41 | 250856 | -0.620 | -0.8414512 | -2.3879317 | cg17232883 |
42 | 211996 | -0.619 | -0.8492679 | -1.5224504 | cg14095100 |
43 | 141981 | -0.605 | -0.7845165 | 1.5917208 | cg00774458 |
44 | 179533 | -0.577 | -0.7622108 | -3.9471556 | cg17743279 |
45 | 250857 | -0.562 | -0.8001730 | -2.4312169 | cg04858776 |
46 | 254556 | 0.562 | 0.9550760 | -3.7638231 | cg12052203 |
47 | 352937 | -0.561 | -0.8107545 | 2.0575316 | cg20299935 |
48 | 211997 | -0.558 | -0.8012666 | -2.1186953 | cg07852945 |
49 | 403863 | -0.550 | -1.2525109 | -1.4886381 | cg07753967 |
50 | 306409 | 0.522 | 0.7430095 | 1.1062536 | cg02325951 |
make_volcano(dma5a,name = "vitmin_b12_levels(sex,age)",mx=Mval_flt)
rownames(dma5a)<-dma5a[,1]
make_beeswarms(dm=dma5a ,name="vitmin_b12_levels" , mx=beta_flt , groups=groups , n= 15)
make_beeswarms_confects(confects = confects ,name="vitmin_b12_levels" , mx=beta_flt , groups=groups , n= 15)
make_heatmap(dm=dma5a , name="vitmin_b12_levels(sex,age)" , mx=mxs ,n = 50, groups=groups)
make_heatmap2(confects = confects , name="vitmin_b12_levels(sex,age)",mx=mxs ,n = 50, groups=groups)
downs<-c(dma1a_d,dma2a_d,dma3a_d, dma4a_d,dma5a_d)
ups<-c(dma1a_u,dma2a_u, dma3a_u,dma4a_u,dma5a_u)
my_summary<-data.frame(downs,ups)
row.names(my_summary)<-c("placebo vs supplement follow-up(sex,age)",
"placebo vs supplement Baseline(sex,age)",
"hcy levels(sex,age)",
"folate levels(sex,age)",
"vitb12 levels(sex,age)")
library(knitr)
kable(my_summary)
downs | ups | |
---|---|---|
placebo vs supplement follow-up(sex,age) | 0 | 0 |
placebo vs supplement Baseline(sex,age) | 0 | 0 |
hcy levels(sex,age) | 0 | 0 |
folate levels(sex,age) | 0 | 0 |
vitb12 levels(sex,age) | 0 | 0 |
First, we look at the similarity of dmps altered by fresh and frozen procedures. The overlap is very large. This indicates a high degree of similarity between the profiles.
v1 <- list("plb v sup fl(up)" =dma1a_u ,
"hcy(up)" =dma3a_d ,
"plb v sup fl(dwn)" =dma1a_d ,
"hcy(dwn)" =dma3a_d)
head(v1)
## $`plb v sup fl(up)`
## [1] 0
##
## $`hcy(up)`
## [1] 0
##
## $`plb v sup fl(dwn)`
## [1] 0
##
## $`hcy(dwn)`
## [1] 0
plot(euler(v1, shape = "ellipse"), quantities = TRUE)
Comparison of probes in related to placebo vs supplement in follow-up(sex,age)
v2 <- list("fol(up)" =dma4a_u,
"hcy(up)" =dma3a_u,
"fol(dwn)" =dma4a_d,
"hcy(dwn)" =dma3a_d)
head(v2)
## $`fol(up)`
## [1] 0
##
## $`hcy(up)`
## [1] 0
##
## $`fol(dwn)`
## [1] 0
##
## $`hcy(dwn)`
## [1] 0
str(v2)
## List of 4
## $ fol(up) : int 0
## $ hcy(up) : int 0
## $ fol(dwn): int 0
## $ hcy(dwn): int 0
plot(euler(v2, shape = "ellipse"), quantities = TRUE)
Comparison of probes in related to hcy(sex) vs folate level(sex,age)
v3 <- list("plb v sup fl(up)" =dma1a_u,
"fol(up)" = dma4a_u ,
"plb v sup fl(dwn)" =dma1a_d ,
"fol(dwn)" =dma4a_d)
head(v3)
## $`plb v sup fl(up)`
## [1] 0
##
## $`fol(up)`
## [1] 0
##
## $`plb v sup fl(dwn)`
## [1] 0
##
## $`fol(dwn)`
## [1] 0
plot(euler(v3, shape = "ellipse"), quantities = TRUE)
Comparison of probes in related to hcy(age) vs folate level(sex,age)
v4 <- list("hcy(up)" =dma3a_u,
"fol(up)" = dma4a_u ,
"hcy(dwn)" =dma3a_d ,
"fol(dwn)" =dma4a_d)
head(v4)
## $`hcy(up)`
## [1] 0
##
## $`fol(up)`
## [1] 0
##
## $`hcy(dwn)`
## [1] 0
##
## $`fol(dwn)`
## [1] 0
plot(euler(v4, shape = "ellipse"), quantities = TRUE)
Comparison of probes in related to hcy vs folate level(sex,age)
v5<- list("hcy(up)" =dma3a_u,
"vitb12(up)" = dma5a_u ,
"hcy(dwn)" =dma3a_d ,
"vitb12(dwn)" =dma5a_d)
head(v5)
## $`hcy(up)`
## [1] 0
##
## $`vitb12(up)`
## [1] 0
##
## $`hcy(dwn)`
## [1] 0
##
## $`vitb12(dwn)`
## [1] 0
plot(euler(v5, shape = "ellipse"), quantities = TRUE)
Comparison of probes in related to hcy vs vitb12 level(sex,age)
While the above Venn diagrams are suggestive of similarity between contrasts, the best way to assess this is with correlation analysis. I have chosen Spearman as based on the directional p-value ranking metrics
mycontrasts <- list("placebo_vs_supplement-follow-up(sex,age)"=dma1a,"placebo vs supplement Baseline(sex,age)"=dma2a,"hcy levels(sex,age)"=dma3a,"folate levels(sex,age)"=dma4a,"vitb12 levels(sex,age)"=dma5a)
lapply(mycontrasts, head)
## $`placebo_vs_supplement-follow-up(sex,age)`
## Row.names UCSC_RefGene_Name Regulatory_Feature_Group
## cg11922164 cg11922164 SYT15;SYT15
## cg17055959 cg17055959 RB1 Promoter_Associated
## cg09095400 cg09095400 MCF2L;MCF2L
## cg00079169 cg00079169 THOP1
## cg00485312 cg00485312 RADIL
## cg22907174 cg22907174 Unclassified_Cell_type_specific
## logFC AveExpr t P.Value adj.P.Val B
## cg11922164 -0.3207440 3.062812 -5.466346 4.199545e-07 0.1773779 2.85480963
## cg17055959 -0.2579878 -3.552305 -4.466023 2.345594e-05 0.9999726 0.54841303
## cg09095400 -0.2869663 3.049316 -4.450392 2.489341e-05 0.9999726 0.51395634
## cg00079169 -0.2949458 3.176290 -4.427706 2.713208e-05 0.9999726 0.46405599
## cg00485312 0.4223117 3.455728 4.198764 6.380356e-05 0.9999726 -0.03226350
## cg22907174 -0.2805781 -3.741456 -4.192707 6.524038e-05 0.9999726 -0.04520707
##
## $`placebo vs supplement Baseline(sex,age)`
## Row.names UCSC_RefGene_Name Regulatory_Feature_Group
## cg00596687 cg00596687 C20orf166;MIR1-1 Unclassified_Cell_type_specific
## cg27194173 cg27194173 ADK;ADK
## cg13109300 cg13109300 DHH;DHH Unclassified_Cell_type_specific
## cg05839533 cg05839533 KRT36 Unclassified_Cell_type_specific
## cg13972202 cg13972202 HLA-DRB5
## cg10417218 cg10417218 MT1DP;MT1DP Unclassified
## logFC AveExpr t P.Value adj.P.Val B
## cg00596687 0.4059493 3.6530802 4.738182 8.161892e-06 0.6442329 1.5839252
## cg27194173 -0.1991879 1.6428078 -4.708564 9.168558e-06 0.6442329 1.5111224
## cg13109300 -0.3865678 -3.6526576 -4.662703 1.096931e-05 0.6442329 1.3988109
## cg05839533 -0.3693614 2.5981589 -4.606993 1.362190e-05 0.6442329 1.2630697
## cg13972202 -0.6535618 0.9934635 -4.484811 2.179604e-05 0.6442329 0.9681296
## cg10417218 -0.2437147 -0.3404724 -4.445310 2.533552e-05 0.6442329 0.8736202
##
## $`hcy levels(sex,age)`
## Row.names UCSC_RefGene_Name Regulatory_Feature_Group logFC
## cg04905210 cg04905210 POLR3D -0.2909751
## cg09338148 cg09338148 Unclassified -0.2931696
## cg04247967 cg04247967 -0.2088138
## cg06458106 cg06458106 -0.1899343
## cg26425904 cg26425904 OCA2 Unclassified -0.2521839
## cg09762242 cg09762242 SIPA1;SIPA1 Promoter_Associated -0.2087797
## AveExpr t P.Value adj.P.Val B
## cg04905210 -2.818129 -5.371887 2.477235e-07 0.1046320 5.870238
## cg09338148 -1.159655 -5.108807 8.479561e-07 0.1790773 4.858988
## cg04247967 3.172951 -5.007905 1.344443e-06 0.1892859 4.480509
## cg06458106 1.665604 -4.777115 3.767573e-06 0.2366578 3.635174
## cg26425904 -4.020281 -4.734541 4.539598e-06 0.2366578 3.482403
## cg09762242 -2.523948 -4.718052 4.877913e-06 0.2366578 3.423509
##
## $`folate levels(sex,age)`
## Row.names UCSC_RefGene_Name Regulatory_Feature_Group
## cg24973150 cg24973150 HOXB7 Unclassified
## cg15276500 cg15276500 ADRM1;ADRM1 Promoter_Associated
## cg11754259 cg11754259 ZBTB44;ZBTB44
## cg02601626 cg02601626 CHID1;CHID1;CHID1;CHID1;CHID1
## cg03226872 cg03226872 BLCAP;BLCAP;BLCAP;BLCAP;BLCAP
## cg16337546 cg16337546 LEMD2
## logFC AveExpr t P.Value adj.P.Val B
## cg24973150 0.007123609 -4.858090 4.568118 9.240290e-06 0.9999919 1.0632810
## cg15276500 0.006479704 -3.370503 4.340403 2.396582e-05 0.9999919 0.1470237
## cg11754259 0.004783593 -3.195180 4.200945 4.221986e-05 0.9999919 -0.3954523
## cg02601626 0.004322521 2.003210 4.165838 4.858538e-05 0.9999919 -0.5297401
## cg03226872 0.004538586 2.760858 4.109434 6.077248e-05 0.9999919 -0.7435481
## cg16337546 0.005463556 -3.218903 4.108911 6.089797e-05 0.9999919 -0.7455175
##
## $`vitb12 levels(sex,age)`
## Row.names UCSC_RefGene_Name Regulatory_Feature_Group
## cg12507502 cg12507502
## cg08736516 cg08736516 LOC285456;RPL34;RPL34;RPL34 Promoter_Associated
## cg25807487 cg25807487 MRGPRF;MRGPRF Unclassified
## cg17319849 cg17319849 GBA;GBA;GBA;GBA Promoter_Associated
## cg24116534 cg24116534
## cg05805987 cg05805987 EIF3E Promoter_Associated
## logFC AveExpr t P.Value adj.P.Val B
## cg12507502 -0.0009416097 5.380026 -5.365645 2.521998e-07 0.1065226 2.1537502
## cg08736516 0.0005836199 -3.153832 4.681645 5.671924e-06 0.7398785 -0.8662518
## cg25807487 -0.0010738661 1.893774 -4.647244 6.581756e-06 0.7398785 -1.0098314
## cg17319849 0.0004946383 -3.974608 4.632719 7.006856e-06 0.7398785 -1.0702099
## cg24116534 0.0007022222 -3.246084 4.481022 1.335912e-05 0.7674311 -1.6918747
## cg05805987 0.0004401503 -3.633866 4.439138 1.592144e-05 0.7674311 -1.8606240
myrnks<-lapply(X = mycontrasts, FUN = myranks)
str(myrnks)
## List of 5
## $ placebo_vs_supplement-follow-up(sex,age):'data.frame': 422374 obs. of 2 variables:
## ..$ score: num [1:422374] 1.33 83901.95 83901.95 83901.95 -83901.95 ...
## ..$ rn : 'AsIs' chr [1:422374] "cg11922164" "cg17055959" "cg09095400" "cg00079169" ...
## $ placebo vs supplement Baseline(sex,age) :'data.frame': 422374 obs. of 2 variables:
## ..$ score: num [1:422374] -5.24 5.24 5.24 5.24 5.24 ...
## ..$ rn : 'AsIs' chr [1:422374] "cg00596687" "cg27194173" "cg13109300" "cg05839533" ...
## $ hcy levels(sex,age) :'data.frame': 422374 obs. of 2 variables:
## ..$ score: num [1:422374] 1.02 1.34 1.38 1.6 1.6 ...
## ..$ rn : 'AsIs' chr [1:422374] "cg04905210" "cg09338148" "cg04247967" "cg06458106" ...
## $ folate levels(sex,age) :'data.frame': 422374 obs. of 2 variables:
## ..$ score: num [1:422374] -283373 -283373 -283373 -283373 -283373 ...
## ..$ rn : 'AsIs' chr [1:422374] "cg24973150" "cg15276500" "cg11754259" "cg02601626" ...
## $ vitb12 levels(sex,age) :'data.frame': 422374 obs. of 2 variables:
## ..$ score: num [1:422374] 1.03 -7.64 7.64 -7.64 -8.7 ...
## ..$ rn : 'AsIs' chr [1:422374] "cg12507502" "cg08736516" "cg25807487" "cg17319849" ...
df <- join_all(myrnks,by="rn")
rownames(df) <- df$rn
df$rn=NULL
colnames(df) <- names(mycontrasts)
head(df)
## placebo_vs_supplement-follow-up(sex,age)
## cg11922164 1.33138
## cg17055959 83901.94707
## cg09095400 83901.94707
## cg00079169 83901.94707
## cg00485312 -83901.94707
## cg22907174 83901.94707
## placebo vs supplement Baseline(sex,age) hcy levels(sex,age)
## cg11922164 13.594635 -8.912359
## cg17055959 5.518437 -64.696459
## cg09095400 25.496993 -5.435198
## cg00079169 8.740481 -4.019071
## cg00485312 -10.085751 5.319666
## cg22907174 10.116209 -46.264302
## folate levels(sex,age) vitb12 levels(sex,age)
## cg11922164 283373.2 37.84395
## cg17055959 283373.2 -42.64872
## cg09095400 283373.2 29.91580
## cg00079169 283373.2 29.91580
## cg00485312 -283373.2 -43.55018
## cg22907174 283373.2 29.91580
mycors <- cor(df,method = "spearman")
my_palette <- colorRampPalette(c("darkred","red", "orange", "yellow","white"))(n = 25)
heatmap.2(mycors,scale="none",margin=c(10, 10),cexRow=0.8,trace="none",cexCol=0.8,
col=my_palette,main="Spearman correlations")
Will be done in another Rmd file to reduce the size of the final HTML. The next Rmd file is called AccesionnumberGSE74548_mitch.Rmd
save.image("AccesionnumberGSE74548.Rdata")
sessionInfo()
## R version 4.0.5 (2021-03-31)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.2 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] grid stats4 parallel stats graphics grDevices utils
## [8] datasets methods base
##
## other attached packages:
## [1] knitr_1.33
## [2] ENmix_1.25.1
## [3] doParallel_1.0.16
## [4] qqman_0.1.8
## [5] DMRcatedata_2.6.0
## [6] ExperimentHub_1.14.2
## [7] AnnotationHub_2.20.2
## [8] BiocFileCache_1.12.1
## [9] dbplyr_2.1.1
## [10] RCircos_1.2.1
## [11] beeswarm_0.3.1
## [12] reshape2_1.4.4
## [13] gplots_3.1.1
## [14] eulerr_6.1.0
## [15] R.utils_2.10.1
## [16] R.oo_1.24.0
## [17] R.methodsS3_1.8.1
## [18] plyr_1.8.6
## [19] RColorBrewer_1.1-2
## [20] forestplot_1.10.1
## [21] checkmate_2.0.0
## [22] magrittr_2.0.1
## [23] kableExtra_1.3.4
## [24] mitch_1.0.10
## [25] DMRcate_2.2.3
## [26] IlluminaHumanMethylation450kmanifest_0.4.0
## [27] topconfects_1.4.0
## [28] limma_3.44.3
## [29] GEOquery_2.56.0
## [30] missMethyl_1.22.0
## [31] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
## [32] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0
## [33] minfi_1.34.0
## [34] bumphunter_1.30.0
## [35] locfit_1.5-9.4
## [36] iterators_1.0.13
## [37] foreach_1.5.1
## [38] Biostrings_2.56.0
## [39] XVector_0.28.0
## [40] SummarizedExperiment_1.18.2
## [41] DelayedArray_0.14.1
## [42] matrixStats_0.58.0
## [43] Biobase_2.48.0
## [44] GenomicRanges_1.40.0
## [45] GenomeInfoDb_1.24.2
## [46] IRanges_2.22.2
## [47] S4Vectors_0.26.1
## [48] BiocGenerics_0.34.0
##
## loaded via a namespace (and not attached):
## [1] rappdirs_0.3.3 rtracklayer_1.48.0
## [3] GGally_2.1.1 tidyr_1.1.3
## [5] ggplot2_3.3.3 bit64_4.0.5
## [7] data.table_1.14.0 rpart_4.1-15
## [9] RCurl_1.98-1.3 AnnotationFilter_1.12.0
## [11] generics_0.1.0 GenomicFeatures_1.40.1
## [13] preprocessCore_1.50.0 RSQLite_2.2.7
## [15] bit_4.0.4 webshot_0.5.2
## [17] xml2_1.3.2 httpuv_1.6.1
## [19] assertthat_0.2.1 xfun_0.23
## [21] hms_1.1.0 jquerylib_0.1.4
## [23] evaluate_0.14 promises_1.2.0.1
## [25] fansi_0.4.2 scrime_1.3.5
## [27] progress_1.2.2 caTools_1.18.2
## [29] readxl_1.3.1 DBI_1.1.1
## [31] geneplotter_1.66.0 htmlwidgets_1.5.3
## [33] reshape_0.8.8 purrr_0.3.4
## [35] ellipsis_0.3.2 dplyr_1.0.6
## [37] backports_1.2.1 permute_0.9-5
## [39] calibrate_1.7.7 annotate_1.66.0
## [41] biomaRt_2.44.4 vctrs_0.3.8
## [43] ensembldb_2.12.1 cachem_1.0.5
## [45] Gviz_1.32.0 BSgenome_1.56.0
## [47] GenomicAlignments_1.24.0 prettyunits_1.1.1
## [49] mclust_5.4.7 svglite_2.0.0
## [51] cluster_2.1.2 RPMM_1.25
## [53] lazyeval_0.2.2 crayon_1.4.1
## [55] genefilter_1.70.0 edgeR_3.30.3
## [57] pkgconfig_2.0.3 nlme_3.1-152
## [59] ProtGenerics_1.20.0 nnet_7.3-16
## [61] rlang_0.4.11 lifecycle_1.0.0
## [63] dichromat_2.0-0 polyclip_1.10-0
## [65] cellranger_1.1.0 rngtools_1.5
## [67] base64_2.0 Matrix_1.3-3
## [69] Rhdf5lib_1.10.1 base64enc_0.1-3
## [71] png_0.1-7 viridisLite_0.4.0
## [73] bitops_1.0-7 KernSmooth_2.23-20
## [75] blob_1.2.1 DelayedMatrixStats_1.10.1
## [77] doRNG_1.8.2 stringr_1.4.0
## [79] nor1mix_1.3-0 readr_1.4.0
## [81] jpeg_0.1-8.1 scales_1.1.1
## [83] lpSolve_5.6.15 memoise_2.0.0
## [85] zlibbioc_1.34.0 compiler_4.0.5
## [87] illuminaio_0.30.0 cli_2.5.0
## [89] Rsamtools_2.4.0 DSS_2.36.0
## [91] ps_1.6.0 htmlTable_2.2.1
## [93] Formula_1.2-4 MASS_7.3-54
## [95] tidyselect_1.1.1 stringi_1.6.2
## [97] highr_0.9 yaml_2.2.1
## [99] askpass_1.1 latticeExtra_0.6-29
## [101] sass_0.4.0 VariantAnnotation_1.34.0
## [103] tools_4.0.5 rstudioapi_0.13
## [105] foreign_0.8-81 bsseq_1.24.4
## [107] gridExtra_2.3 digest_0.6.27
## [109] BiocManager_1.30.15 shiny_1.6.0
## [111] quadprog_1.5-8 Rcpp_1.0.6
## [113] siggenes_1.62.0 BiocVersion_3.11.1
## [115] later_1.2.0 org.Hs.eg.db_3.11.4
## [117] httr_1.4.2 AnnotationDbi_1.50.3
## [119] biovizBase_1.36.0 colorspace_2.0-1
## [121] polylabelr_0.2.0 rvest_1.0.0
## [123] XML_3.99-0.6 splines_4.0.5
## [125] statmod_1.4.36 multtest_2.44.0
## [127] irr_0.84.1 systemfonts_1.0.2
## [129] xtable_1.8-4 jsonlite_1.7.2
## [131] dynamicTreeCut_1.63-1 R6_2.5.0
## [133] echarts4r_0.4.0 Hmisc_4.5-0
## [135] pillar_1.6.1 htmltools_0.5.1.1
## [137] mime_0.10 glue_1.4.2
## [139] fastmap_1.1.0 BiocParallel_1.22.0
## [141] interactiveDisplayBase_1.26.3 beanplot_1.2
## [143] codetools_0.2-18 utf8_1.2.1
## [145] lattice_0.20-44 bslib_0.2.5.1
## [147] tibble_3.1.2 curl_4.3.1
## [149] gtools_3.8.2 openssl_1.4.4
## [151] survival_3.2-11 rmarkdown_2.8
## [153] munsell_0.5.0 rhdf5_2.32.4
## [155] GenomeInfoDbData_1.2.3 HDF5Array_1.16.1
## [157] impute_1.62.0 gtable_0.3.0