source("meth_functions.R")

Obtaining array annotations

anno <- getAnnotation(IlluminaHumanMethylationEPICanno.ilm10b4.hg19)
myann <- data.frame(anno[,c("UCSC_RefGene_Name","Regulatory_Feature_Group","Islands_Name","Relation_to_Island")])
promoters <- grep("Prom",myann$Regulatory_Feature_Group)

Introduction

This report is the reanalysis of first analysed DNA methylation data by [Novakovic et al (2019)] (https://doi.org/10.1038/s41467-019-11929-9)

In this study, DNA methylation status was generated for 149 neonatal (84♀ 65♂) and 158 adult (87♀ 71♂) ART-conceived individuals and for 58 neonatal (37♀, 21♂) and 75 adult (51♀, 24♂) non-ART conceived individuals.

WORKING_DIR="GSE131433"
ARRAY_DATA="GSE131433_RAW.tar"
DEST=paste(WORKING_DIR,"/",ARRAY_DATA,sep="")

if(!dir.exists(WORKING_DIR)){
  dir.create(WORKING_DIR)
  download.file("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131433/suppl/GSE131433_RAW.tar",
    destfile=DEST) 
  untar(exdir = "IDAT", tarfile = WORKING_DIR)
}
  SERIES_MATRIX=paste(WORKING_DIR,"/","GSE131433_series_matrix.txt.gz",sep="")
download.file("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE131nnn/GSE131433/matrix/GSE131433_series_matrix.txt.gz", 
  destfile=SERIES_MATRIX)

gse <- getGEO(filename=SERIES_MATRIX)
## Using locally cached version of GPL21145 found here:
## /tmp/Rtmpp8fd2J/GPL21145.soft.gz
baseDir <- "."
sample_metadata <- pData(phenoData(gse))
targets <- sample_metadata

files <- list.files(WORKING_DIR,pattern = "GSM",recursive = TRUE)
mybase <- unique(gsub("_Red.idat.gz" ,"", gsub("_Grn.idat.gz", "" ,files)))
mybase <- paste(WORKING_DIR,"/",mybase,sep="")
targets$Basename <- mybase
head(targets)
##                          title geo_accession                status
## GSM3780106 neonate_ART_Donor_1    GSM3780106 Public on Jul 29 2019
## GSM3780107 neonate_ART_Donor_2    GSM3780107 Public on Jul 29 2019
## GSM3780108 neonate_ART_Donor_3    GSM3780108 Public on Jul 29 2019
## GSM3780109 neonate_ART_Donor_4    GSM3780109 Public on Jul 29 2019
## GSM3780110 neonate_ART_Donor_5    GSM3780110 Public on Jul 29 2019
## GSM3780111 neonate_ART_Donor_6    GSM3780111 Public on Jul 29 2019
##            submission_date last_update_date    type channel_count
## GSM3780106     May 17 2019      Jul 31 2019 genomic             1
## GSM3780107     May 17 2019      Jul 31 2019 genomic             1
## GSM3780108     May 17 2019      Jul 31 2019 genomic             1
## GSM3780109     May 17 2019      Jul 31 2019 genomic             1
## GSM3780110     May 17 2019      Jul 31 2019 genomic             1
## GSM3780111     May 17 2019      Jul 31 2019 genomic             1
##            source_name_ch1 organism_ch1 characteristics_ch1
## GSM3780106     ART_Donor_1 Homo sapiens           gender: F
## GSM3780107     ART_Donor_2 Homo sapiens           gender: M
## GSM3780108     ART_Donor_3 Homo sapiens           gender: F
## GSM3780109     ART_Donor_4 Homo sapiens           gender: M
## GSM3780110     ART_Donor_5 Homo sapiens           gender: F
## GSM3780111     ART_Donor_6 Homo sapiens           gender: F
##                      characteristics_ch1.1 characteristics_ch1.2
## GSM3780106 sample type: Guthrie blood spot       art status: ART
## GSM3780107 sample type: Guthrie blood spot       art status: ART
## GSM3780108 sample type: Guthrie blood spot       art status: ART
## GSM3780109 sample type: Guthrie blood spot       art status: ART
## GSM3780110 sample type: Guthrie blood spot       art status: ART
## GSM3780111 sample type: Guthrie blood spot       art status: ART
##                 characteristics_ch1.3     characteristics_ch1.4 molecule_ch1
## GSM3780106 art subtype: Frozen embryo time of collection: birth  genomic DNA
## GSM3780107            art subtype: NA time of collection: birth  genomic DNA
## GSM3780108  art subtype: Fresh embryo time of collection: birth  genomic DNA
## GSM3780109 art subtype: Frozen embryo time of collection: birth  genomic DNA
## GSM3780110  art subtype: Fresh embryo time of collection: birth  genomic DNA
## GSM3780111  art subtype: Fresh embryo time of collection: birth  genomic DNA
##                                                                                            extract_protocol_ch1
## GSM3780106 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
## GSM3780107 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
## GSM3780108 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
## GSM3780109 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
## GSM3780110 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
## GSM3780111 DNA was extracted using the Zymo Research ZR DNA-Card Extraction Kit following manufacturer protocol
##              label_ch1         label_protocol_ch1 taxid_ch1
## GSM3780106 Cy5 and Cy3 Standard Illumina Protocol      9606
## GSM3780107 Cy5 and Cy3 Standard Illumina Protocol      9606
## GSM3780108 Cy5 and Cy3 Standard Illumina Protocol      9606
## GSM3780109 Cy5 and Cy3 Standard Illumina Protocol      9606
## GSM3780110 Cy5 and Cy3 Standard Illumina Protocol      9606
## GSM3780111 Cy5 and Cy3 Standard Illumina Protocol      9606
##                                                                                                                                                hyb_protocol
## GSM3780106 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
## GSM3780107 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
## GSM3780108 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
## GSM3780109 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
## GSM3780110 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
## GSM3780111 bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium MethylationEPIC Beadchip using standard Illumina protocol
##                                                                                            scan_protocol
## GSM3780106 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
## GSM3780107 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
## GSM3780108 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
## GSM3780109 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
## GSM3780110 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
## GSM3780111 Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting
##                                                 description
## GSM3780106 guthrie blood spot from ART conceived individual
## GSM3780107 guthrie blood spot from ART conceived individual
## GSM3780108 guthrie blood spot from ART conceived individual
## GSM3780109 guthrie blood spot from ART conceived individual
## GSM3780110 guthrie blood spot from ART conceived individual
## GSM3780111 guthrie blood spot from ART conceived individual
##                     data_processing
## GSM3780106 BeadStudio software v3.2
## GSM3780107 BeadStudio software v3.2
## GSM3780108 BeadStudio software v3.2
## GSM3780109 BeadStudio software v3.2
## GSM3780110 BeadStudio software v3.2
## GSM3780111 BeadStudio software v3.2
##                                                             data_processing.1
## GSM3780106 matrix processed includes: Normalized (SWAN) Average Beta and detP
## GSM3780107 matrix processed includes: Normalized (SWAN) Average Beta and detP
## GSM3780108 matrix processed includes: Normalized (SWAN) Average Beta and detP
## GSM3780109 matrix processed includes: Normalized (SWAN) Average Beta and detP
## GSM3780110 matrix processed includes: Normalized (SWAN) Average Beta and detP
## GSM3780111 matrix processed includes: Normalized (SWAN) Average Beta and detP
##                                                                                          data_processing.2
## GSM3780106 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
## GSM3780107 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
## GSM3780108 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
## GSM3780109 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
## GSM3780110 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
## GSM3780111 matrix signal intensities includes: The Methylated and unmethylated signal intensities and detP
##            platform_id     contact_name               contact_email
## GSM3780106    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
## GSM3780107    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
## GSM3780108    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
## GSM3780109    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
## GSM3780110    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
## GSM3780111    GPL21145 Boris,,Novakovic boris.novakovic@mcri.edu.au
##            contact_phone contact_laboratory contact_department
## GSM3780106 +610434980073        Epigenetics       Cell Biology
## GSM3780107 +610434980073        Epigenetics       Cell Biology
## GSM3780108 +610434980073        Epigenetics       Cell Biology
## GSM3780109 +610434980073        Epigenetics       Cell Biology
## GSM3780110 +610434980073        Epigenetics       Cell Biology
## GSM3780111 +610434980073        Epigenetics       Cell Biology
##            contact_institute      contact_address contact_city contact_state
## GSM3780106              MCRI RCH, Flemington Road    Parkville      Victoria
## GSM3780107              MCRI RCH, Flemington Road    Parkville      Victoria
## GSM3780108              MCRI RCH, Flemington Road    Parkville      Victoria
## GSM3780109              MCRI RCH, Flemington Road    Parkville      Victoria
## GSM3780110              MCRI RCH, Flemington Road    Parkville      Victoria
## GSM3780111              MCRI RCH, Flemington Road    Parkville      Victoria
##            contact_zip/postal_code contact_country
## GSM3780106                    3052       Australia
## GSM3780107                    3052       Australia
## GSM3780108                    3052       Australia
## GSM3780109                    3052       Australia
## GSM3780110                    3052       Australia
## GSM3780111                    3052       Australia
##                                                                                                       supplementary_file
## GSM3780106 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780106/suppl/GSM3780106_202818860092_R07C01_Grn.idat.gz
## GSM3780107 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780107/suppl/GSM3780107_202822930094_R07C01_Grn.idat.gz
## GSM3780108 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780108/suppl/GSM3780108_202818860162_R01C01_Grn.idat.gz
## GSM3780109 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780109/suppl/GSM3780109_202818860162_R03C01_Grn.idat.gz
## GSM3780110 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780110/suppl/GSM3780110_202822930046_R01C01_Grn.idat.gz
## GSM3780111 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780111/suppl/GSM3780111_202818860100_R01C01_Grn.idat.gz
##                                                                                                     supplementary_file.1
## GSM3780106 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780106/suppl/GSM3780106_202818860092_R07C01_Red.idat.gz
## GSM3780107 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780107/suppl/GSM3780107_202822930094_R07C01_Red.idat.gz
## GSM3780108 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780108/suppl/GSM3780108_202818860162_R01C01_Red.idat.gz
## GSM3780109 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780109/suppl/GSM3780109_202818860162_R03C01_Red.idat.gz
## GSM3780110 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780110/suppl/GSM3780110_202822930046_R01C01_Red.idat.gz
## GSM3780111 ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM3780nnn/GSM3780111/suppl/GSM3780111_202818860100_R01C01_Red.idat.gz
##            data_row_count art status:ch1 art subtype:ch1 gender:ch1
## GSM3780106              0            ART   Frozen embryo          F
## GSM3780107              0            ART              NA          M
## GSM3780108              0            ART    Fresh embryo          F
## GSM3780109              0            ART   Frozen embryo          M
## GSM3780110              0            ART    Fresh embryo          F
## GSM3780111              0            ART    Fresh embryo          F
##               sample type:ch1 time of collection:ch1
## GSM3780106 Guthrie blood spot                  birth
## GSM3780107 Guthrie blood spot                  birth
## GSM3780108 Guthrie blood spot                  birth
## GSM3780109 Guthrie blood spot                  birth
## GSM3780110 Guthrie blood spot                  birth
## GSM3780111 Guthrie blood spot                  birth
##                                            Basename
## GSM3780106 GSE131433/GSM3780106_202818860092_R07C01
## GSM3780107 GSE131433/GSM3780107_202822930094_R07C01
## GSM3780108 GSE131433/GSM3780108_202818860162_R01C01
## GSM3780109 GSE131433/GSM3780109_202818860162_R03C01
## GSM3780110 GSE131433/GSM3780110_202822930046_R01C01
## GSM3780111 GSE131433/GSM3780111_202818860100_R01C01
# filter time of birth as were not interested in follow up samples
targets <- subset(targets,`time of collection:ch1`=="birth")

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

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls

## Warning in readChar(con, nchars = n): truncating string with embedded nuls
rgSet
## class: RGChannelSet 
## dim: 1051815 207 
## metadata(0):
## assays(2): Green Red
## rownames(1051815): 1600101 1600111 ... 99810990 99810992
## rowData names(0):
## colnames(207): GSM3780106_202818860092_R07C01
##   GSM3780107_202822930094_R07C01 ... GSM3780311_202822930170_R07C01
##   GSM3780312_202822930058_R05C01
## colData names(47): title geo_accession ... Basename filenames
## Annotation
##   array: IlluminaHumanMethylationEPIC
##   annotation: ilm10b4.hg19
mSet <- preprocessRaw(rgSet)
## Loading required package: IlluminaHumanMethylationEPICmanifest
mSetSw <- SWAN(mSet,verbose=FALSE)
## [SWAN] Preparing normalization subset
## EPIC
## [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.

Figure 1. Normalisation of bead-array data with SWAN.

# 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)

# exclude sex chromosomes
xyprobes <- anno$Name[anno$chr %in% c("chrX","chrY")]
mSetFlt <- mSetSw[which(!rownames(mSetSw) %in% xyprobes),]
# include sex chromosomes
meth <- getMeth(mSetSw)
unmeth <- getUnmeth(mSetSw)
Mval <- log2((meth + 100)/(unmeth + 100))
beta <- getBeta(mSetSw)
dim(Mval)
## [1] 810518    207
# exclude sex chromosomes
meth <- getMeth(mSetFlt)
unmeth <- getUnmeth(mSetFlt)
Mval_flt <- log2((meth + 100)/(unmeth + 100))
beta_flt <- getBeta(mSetFlt)
dim(Mval_flt)
## [1] 793844    207

MDS analysis

par(mfrow=c(2,1))  
myscree(Mval,main="incl sex chr")
myscree(Mval_flt,main="excl sex chr")
Figure 2. Screeplot shows contribution of top principal components to the overall variation in the experiment.

Figure 2. Screeplot shows contribution of top principal components to the overall variation in the experiment.

#MDS plot 1

colnames(targets) <- gsub(" ","_",colnames(targets)) 
colnames(targets) <- gsub(":","_",colnames(targets))
targets$sex<-factor(targets$`gender_ch1`)
targets$art<-factor(targets$`art_subtype`)
sample_groups <- factor(targets$art)
colour_palette=brewer.pal(n = length(levels(sample_groups)), name = "Paired")
colours <- colour_palette[as.integer(factor(targets$art))]
plot(1,axes = FALSE,xlab="",ylab="",main="MDS by ART type")
legend("center",legend=levels(sample_groups),pch=16,cex=1.2,col=colour_palette)
Figure 3. MDS plot coloured by ART classification.

Figure 3. MDS plot coloured by ART classification.

mydist <- plotMDS(Mval, labels=targets$Sample_Name,col=colours,main="sex chromosomes included")
Figure 3. MDS plot coloured by ART classification.

Figure 3. MDS plot coloured by ART classification.

mydist_flt <- plotMDS(Mval_flt, labels=targets$Sample_Name,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by ART classification.

Figure 3. MDS plot coloured by ART classification.

colnames(mydist_flt@.Data[[5]])  <- sapply(strsplit(colnames(mydist_flt@.Data[[5]]),"_"),"[[",1)
plotMDS(mydist_flt, labels=targets$Sample_Name,col=colours,main="sex chromosomes excluded")
Figure 3. MDS plot coloured by ART classification.

Figure 3. MDS plot coloured by ART classification.

#save data object

save.image("Novakovic.Rdata")

#Differential analysis

  1. non-ART Vs Fresh embryo

  2. non-ART Vs Frozen embryo

  3. non-ART Vs GIFT

  4. non-ART Vs FX

  5. GIFT Vs FX

  6. non-ART Vs ART

  7. Fresh Vs Frozen

non-ART Vs Fresh embryo

# sex chromosomes excluded
beta <- beta_flt
Mval <- Mval_flt
colnames(beta) <- sapply(strsplit(colnames(beta),"_"),"[[",1)
colnames(Mval) <- sapply(strsplit(colnames(Mval),"_"),"[[",1)

#targets$Basename <- gsub("IDAT/","",targets$Basename)  
birth<-targets[which(targets$`time_of_collection`=="birth"),]
birth$Basename <- sapply(strsplit(birth$Basename,"/"),"[[",2)
birth$Basename <- sapply(strsplit(birth$Basename,"_"),"[[",1)

samplesheet<-subset(birth,art_subtype_ch1=="non-ART"|art_subtype_ch1=="Fresh embryo")
groups <- factor(samplesheet$art_subtype,levels=c("non-ART","Fresh embryo"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]
dim(Mvals)
## [1] 793844    133
dim(betas)
## [1] 793844    133
top_nat_vs_fh <- dm_analysis(samplesheet=samplesheet,
  sex=sex,groups=groups,mx=Mvals,name="top_nat_vs_fh",
  myann=myann ,beta= betas) 
## Your contrast returned 6292 individually significant probes. We recommend the default setting of pcutoff in dmrcate().
## Fitting chr1...
## Fitting chr2...
## Fitting chr3...
## Fitting chr4...
## Fitting chr5...
## Fitting chr6...
## Fitting chr7...
## Fitting chr8...
## Fitting chr9...
## Fitting chr10...
## Fitting chr11...
## Fitting chr12...
## Fitting chr13...
## Fitting chr14...
## Fitting chr15...
## Fitting chr16...
## Fitting chr17...
## Fitting chr18...
## Fitting chr19...
## Fitting chr20...
## Fitting chr21...
## Fitting chr22...
## Demarcating regions...
## Done!
## snapshotDate(): 2022-04-26
## see ?DMRcatedata and browseVignettes('DMRcatedata') for documentation
## loading from cache

## 
## RCircos.Core.Components initialized.
## Type ?RCircos.Reset.Plot.Parameters to see how to modify the core components.

head(top_nat_vs_fh$dma,10)
##         Row.names    UCSC_RefGene_Name Regulatory_Feature_Group
## 743573 cg25867694                 SELM      Promoter_Associated
## 510348 cg16794867     AADACL2;MIR548H2                         
## 11452  cg00352360        RPL23;SNORA21                         
## 564284 cg18789663                 PLD5                         
## 213076 cg06826756 NUP153;NUP153;NUP153                         
## 533323 cg17602885        CLSTN1;CLSTN1                         
## 656385 cg22481606              SUPT4H1      Promoter_Associated
## 457675 cg14985987          TAF1A;TAF1A      Promoter_Associated
## 666703 cg22883995                CXXC5                         
## 200896 cg06438056      AK2;AK2;AK2;AK2      Promoter_Associated
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 743573  chr22:31503236-31503871             Island -0.3170932 -3.1637864
## 510348                                     OpenSea -0.3194548 -0.8937958
## 11452   chr17:37009471-37010118            N_Shore -0.3840541 -2.6531641
## 564284 chr1:242687922-242688682             Island -0.3323787 -2.7624449
## 213076   chr6:17706292-17707339            S_Shore -0.2449454 -2.0577696
## 533323                                     OpenSea  0.3437550  5.0682947
## 656385  chr17:56429455-56429906             Island -0.3552362 -2.7157295
## 457675 chr1:222763021-222763270            S_Shore -0.2840357 -3.0323278
## 666703 chr5:139060555-139060934            N_Shore  0.5241212  3.9920277
## 200896   chr1:33502201-33502719             Island -0.5592441 -1.8461297
##                t      P.Value    adj.P.Val         B
## 743573 -6.740188 4.001417e-10 0.0002526207 12.260124
## 510348 -6.650166 6.364493e-10 0.0002526207 11.843891
## 11452  -6.328140 3.265725e-09 0.0006264789 10.377097
## 564284 -6.326298 3.296038e-09 0.0006264789 10.368810
## 213076 -6.248221 4.869770e-09 0.0006264789 10.018736
## 533323  6.240780 5.053675e-09 0.0006264789  9.985491
## 656385 -6.217291 5.680221e-09 0.0006264789  9.880674
## 457675 -6.156272 7.686986e-09 0.0006264789  9.609362
## 666703  6.112320 9.549404e-09 0.0006264789  9.414819
## 200896 -6.108507 9.730500e-09 0.0006264789  9.397973
head(top_nat_vs_fh$dmr,10)
## GRanges object with 10 ranges and 8 metadata columns:
##        seqnames              ranges strand |   no.cpgs min_smoothed_fdr
##           <Rle>           <IRanges>  <Rle> | <integer>        <numeric>
##    [1]    chr17     4803684-4805392      * |         6      2.04703e-11
##    [2]    chr19   20348926-20349303      * |         5      9.93835e-13
##    [3]    chr13   27295928-27296010      * |         3      1.73882e-09
##    [4]    chr17   19265610-19266474      * |        12      1.42466e-13
##    [5]    chr21   40759534-40759694      * |         5      2.76602e-10
##    [6]    chr19   21949968-21950478      * |         8      2.14391e-11
##    [7]    chr15   94218934-94218949      * |         2      1.74203e-07
##    [8]     chr1 247453113-247453569      * |         2      1.29806e-06
##    [9]     chr4   69215305-69215675      * |         3      6.15497e-13
##   [10]    chr11 130298267-130298435      * |         2      3.83144e-09
##           Stouffer      HMFDR      Fisher    maxdiff    meandiff
##          <numeric>  <numeric>   <numeric>  <numeric>   <numeric>
##    [1] 1.70522e-08 0.00749017 3.12842e-07 -0.1121621 -0.06749122
##    [2] 2.84043e-05 0.00604191 4.34660e-05 -0.0444664 -0.02807448
##    [3] 2.18305e-05 0.00893351 8.67309e-05  0.1002679  0.09675393
##    [4] 3.73948e-04 0.00665419 1.67791e-04 -0.0195797 -0.00910014
##    [5] 3.11609e-05 0.02876306 2.30971e-04 -0.0681944 -0.04943169
##    [6] 2.66012e-03 0.01446882 2.88773e-04 -0.0247105 -0.01386096
##    [7] 1.86089e-04 0.00530867 3.86888e-04  0.0316250  0.02886711
##    [8] 2.72796e-04 0.00468855 5.19405e-04  0.0276802  0.02063989
##    [9] 1.45125e-03 0.00270115 5.28181e-04 -0.0191426 -0.00900630
##   [10] 3.44430e-04 0.00257109 5.28491e-04 -0.0390076 -0.02393158
##        overlapping.genes
##              <character>
##    [1]  C17orf107, CHRNE
##    [2]       CTC-260E6.6
##    [3]              <NA>
##    [4]              B9D1
##    [5]               WRB
##    [6]            ZNF100
##    [7]      RP11-739G5.1
##    [8]              <NA>
##    [9]            YTHDC1
##   [10]           ADAMTS8
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
# Allele
top_nat_vs_fh$dma$unmeth <- "T"
top_nat_vs_fh$dma$meth <- "C"
top_nat_vs_fh$fit$SE <- sqrt(top_nat_vs_fh$fit$s2.post) * top_nat_vs_fh$fit$stdev.unscaled

# Extract required columns from dma
top_nat_vs_fh_metal <-top_nat_vs_fh$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_nat_vs_fh_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 743573 cg25867694    C      T -3.1637864 4.001417e-10
## 510348 cg16794867    C      T -0.8937958 6.364493e-10
## 11452  cg00352360    C      T -2.6531641 3.265725e-09
## 564284 cg18789663    C      T -2.7624449 3.296038e-09
## 213076 cg06826756    C      T -2.0577696 4.869770e-09
## 533323 cg17602885    C      T  5.0682947 5.053675e-09
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_nat_vs_fh$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_nat_vs_fh$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_nat_vs_fh_metal <- merge(top_nat_vs_fh_metal, fitCE)
top_nat_vs_fh_metal <- merge(top_nat_vs_fh_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_nat_vs_fh_metal$N <- Neff

# Output for Meta-analysis
write.table(top_nat_vs_fh_metal, file="novakovic_top_nat_vs_fh_metal.tsv",
  sep="\t",quote=FALSE, row.names = FALSE)

head(top_nat_vs_fh$dma)
##         Row.names    UCSC_RefGene_Name Regulatory_Feature_Group
## 743573 cg25867694                 SELM      Promoter_Associated
## 510348 cg16794867     AADACL2;MIR548H2                         
## 11452  cg00352360        RPL23;SNORA21                         
## 564284 cg18789663                 PLD5                         
## 213076 cg06826756 NUP153;NUP153;NUP153                         
## 533323 cg17602885        CLSTN1;CLSTN1                         
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 743573  chr22:31503236-31503871             Island -0.3170932 -3.1637864
## 510348                                     OpenSea -0.3194548 -0.8937958
## 11452   chr17:37009471-37010118            N_Shore -0.3840541 -2.6531641
## 564284 chr1:242687922-242688682             Island -0.3323787 -2.7624449
## 213076   chr6:17706292-17707339            S_Shore -0.2449454 -2.0577696
## 533323                                     OpenSea  0.3437550  5.0682947
##                t      P.Value    adj.P.Val         B unmeth meth
## 743573 -6.740188 4.001417e-10 0.0002526207 12.260124      T    C
## 510348 -6.650166 6.364493e-10 0.0002526207 11.843891      T    C
## 11452  -6.328140 3.265725e-09 0.0006264789 10.377097      T    C
## 564284 -6.326298 3.296038e-09 0.0006264789 10.368810      T    C
## 213076 -6.248221 4.869770e-09 0.0006264789 10.018736      T    C
## 533323  6.240780 5.053675e-09 0.0006264789  9.985491      T    C
head(top_nat_vs_fh$dmr)
## GRanges object with 6 ranges and 8 metadata columns:
##       seqnames            ranges strand |   no.cpgs min_smoothed_fdr
##          <Rle>         <IRanges>  <Rle> | <integer>        <numeric>
##   [1]    chr17   4803684-4805392      * |         6      2.04703e-11
##   [2]    chr19 20348926-20349303      * |         5      9.93835e-13
##   [3]    chr13 27295928-27296010      * |         3      1.73882e-09
##   [4]    chr17 19265610-19266474      * |        12      1.42466e-13
##   [5]    chr21 40759534-40759694      * |         5      2.76602e-10
##   [6]    chr19 21949968-21950478      * |         8      2.14391e-11
##          Stouffer      HMFDR      Fisher    maxdiff    meandiff
##         <numeric>  <numeric>   <numeric>  <numeric>   <numeric>
##   [1] 1.70522e-08 0.00749017 3.12842e-07 -0.1121621 -0.06749122
##   [2] 2.84043e-05 0.00604191 4.34660e-05 -0.0444664 -0.02807448
##   [3] 2.18305e-05 0.00893351 8.67309e-05  0.1002679  0.09675393
##   [4] 3.73948e-04 0.00665419 1.67791e-04 -0.0195797 -0.00910014
##   [5] 3.11609e-05 0.02876306 2.30971e-04 -0.0681944 -0.04943169
##   [6] 2.66012e-03 0.01446882 2.88773e-04 -0.0247105 -0.01386096
##       overlapping.genes
##             <character>
##   [1]  C17orf107, CHRNE
##   [2]       CTC-260E6.6
##   [3]              <NA>
##   [4]              B9D1
##   [5]               WRB
##   [6]            ZNF100
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
head(top_nat_vs_fh_metal)
##    Row.names meth unmeth    AveExpr    P.Value coefficient         SE        N
## 1 cg00000103    C      T  2.7941256 0.01707402 -0.21317088 0.08828895 130.8271
## 2 cg00000109    C      T  1.7999550 0.48096235 -0.06095312 0.08625292 130.8271
## 3 cg00000155    C      T  3.1170105 0.30944103 -0.07000145 0.06861755 130.8271
## 4 cg00000158    C      T  3.1718838 0.51086363  0.05333879 0.08091315 130.8271
## 5 cg00000165    C      T -2.1091998 0.50776928  0.04413382 0.06646136 130.8271
## 6 cg00000221    C      T  0.9858254 0.86693019 -0.01957153 0.11658556 130.8271
saveRDS(top_nat_vs_fh,file="novakovic_nat_vs_fh.rds")

non-ART Vs Frozen embryo

samplesheet<-subset(birth,art_subtype_ch1=="non-ART"|art_subtype_ch1=="Frozen embryo")
groups <- factor(samplesheet$art_subtype,levels=c("non-ART","Frozen embryo"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_nat_vs_fz <- dm_analysis(samplesheet=samplesheet,
  sex=sex,groups=groups,mx=Mvals,name="top_nat_vs_fz",
  myann=myann ,beta= betas)

head(top_nat_vs_fz$dma,10)
##         Row.names                   UCSC_RefGene_Name Regulatory_Feature_Group
## 256518 cg08242354                                                             
## 752334 cg26210521                       SLC2A9;SLC2A9                         
## 338484 cg10992198                         WDR62;WDR62          Gene_Associated
## 462440 cg15147113 SERPINE2;SERPINE2;SERPINE2;SERPINE2             Unclassified
## 510348 cg16794867                    AADACL2;MIR548H2                         
## 216261 cg06924355                               PAQR3      Promoter_Associated
## 682894 cg23516310                                                             
## 588078 cg19738653                      EGR3;EGR3;EGR3                         
## 675978 cg23244910                                                             
## 745548 cg25950293                ADGRE5;ADGRE5;ADGRE5                         
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 256518                                     OpenSea -0.3138346  0.8773421
## 752334                                     OpenSea -0.3017469  1.7053825
## 338484                                     OpenSea -0.2225205  1.2244064
## 462440                                     OpenSea -1.7977189 -2.7771016
## 510348                                     OpenSea -0.2954307 -0.8113974
## 216261   chr4:79860213-79860745            S_Shore -0.4309532 -3.4925078
## 682894                                     OpenSea -0.3836119 -3.3768613
## 588078   chr8:22547486-22553427             Island -0.4294140 -3.8348854
## 675978 chr6:106433984-106434459             Island -0.5353793 -4.0623968
## 745548                                     OpenSea -0.3629615 -1.1301961
##                t      P.Value   adj.P.Val        B
## 256518 -6.452959 4.986651e-09 0.003958623 9.175902
## 752334 -5.883411 6.378324e-08 0.025316969 7.084233
## 338484 -5.753709 1.125016e-07 0.028051800 6.617274
## 462440 -5.701196 1.413467e-07 0.028051800 6.429353
## 510348 -5.558471 2.616479e-07 0.041541529 5.922101
## 216261 -5.489762 3.510678e-07 0.046448840 5.679816
## 682894 -5.422309 4.677691e-07 0.053047961 5.443222
## 588078 -5.219237 1.098778e-06 0.090784146 4.738920
## 675978 -5.139775 1.528205e-06 0.090784146 4.466763
## 745548 -5.100644 1.796128e-06 0.090784146 4.333486
head(top_nat_vs_fz$dmr,10)
## NULL
# Allele
top_nat_vs_fz$dma$unmeth <- "T"
top_nat_vs_fz$dma$meth <- "C"
top_nat_vs_fz$fit$SE <- sqrt(top_nat_vs_fz$fit$s2.post) * top_nat_vs_fz$fit$stdev.unscaled

# Extract required columns from dma
top_nat_vs_fz_metal <-top_nat_vs_fz$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_nat_vs_fz_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 256518 cg08242354    C      T  0.8773421 4.986651e-09
## 752334 cg26210521    C      T  1.7053825 6.378324e-08
## 338484 cg10992198    C      T  1.2244064 1.125016e-07
## 462440 cg15147113    C      T -2.7771016 1.413467e-07
## 510348 cg16794867    C      T -0.8113974 2.616479e-07
## 216261 cg06924355    C      T -3.4925078 3.510678e-07
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_nat_vs_fz$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_nat_vs_fz$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_nat_vs_fz_metal <- merge(top_nat_vs_fz_metal, fitCE)
top_nat_vs_fz_metal <- merge(top_nat_vs_fz_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_nat_vs_fz_metal$N <- Neff

# Output for Meta-analysis
write.table(top_nat_vs_fz_metal, file="novakovic_top_nat_vs_fz_metal.tsv",
  sep="\t",quote=FALSE, row.names = FALSE)

head(top_nat_vs_fz$dma)
##         Row.names                   UCSC_RefGene_Name Regulatory_Feature_Group
## 256518 cg08242354                                                             
## 752334 cg26210521                       SLC2A9;SLC2A9                         
## 338484 cg10992198                         WDR62;WDR62          Gene_Associated
## 462440 cg15147113 SERPINE2;SERPINE2;SERPINE2;SERPINE2             Unclassified
## 510348 cg16794867                    AADACL2;MIR548H2                         
## 216261 cg06924355                               PAQR3      Promoter_Associated
##                  Islands_Name Relation_to_Island      logFC    AveExpr
## 256518                                   OpenSea -0.3138346  0.8773421
## 752334                                   OpenSea -0.3017469  1.7053825
## 338484                                   OpenSea -0.2225205  1.2244064
## 462440                                   OpenSea -1.7977189 -2.7771016
## 510348                                   OpenSea -0.2954307 -0.8113974
## 216261 chr4:79860213-79860745            S_Shore -0.4309532 -3.4925078
##                t      P.Value   adj.P.Val        B unmeth meth
## 256518 -6.452959 4.986651e-09 0.003958623 9.175902      T    C
## 752334 -5.883411 6.378324e-08 0.025316969 7.084233      T    C
## 338484 -5.753709 1.125016e-07 0.028051800 6.617274      T    C
## 462440 -5.701196 1.413467e-07 0.028051800 6.429353      T    C
## 510348 -5.558471 2.616479e-07 0.041541529 5.922101      T    C
## 216261 -5.489762 3.510678e-07 0.046448840 5.679816      T    C
head(top_nat_vs_fz$dmr)
## NULL
head(top_nat_vs_fz_metal)
##    Row.names meth unmeth   AveExpr    P.Value coefficient         SE        N
## 1 cg00000103    C      T  2.864475 0.17322851 -0.14651932 0.10675318 79.09091
## 2 cg00000109    C      T  1.853818 0.66357334  0.04976370 0.11403549 79.09091
## 3 cg00000155    C      T  3.156122 0.84994416 -0.01460600 0.07698685 79.09091
## 4 cg00000158    C      T  3.208639 0.02739279  0.18323593 0.08174972 79.09091
## 5 cg00000165    C      T -2.113859 0.35658757  0.07840474 0.08462248 79.09091
## 6 cg00000221    C      T  1.069706 0.13036495  0.21043962 0.13788074 79.09091
saveRDS(top_nat_vs_fz,file="novakovic_nat_vs_fz.rds")

non-ART Vs GIFT

samplesheet<-subset(birth,art_subtype_ch1=="non-ART"|art_subtype_ch1=="GIFT")
groups <- factor(samplesheet$art_subtype,levels=c("non-ART","GIFT"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_nat_vs_GIFT <- dm_analysis(samplesheet=samplesheet,
sex=sex,groups=groups,mx=Mvals,name="top_nat_vs_GIFT",
myann=myann ,beta= betas)

head(top_nat_vs_GIFT$dma,10)
##         Row.names                                  UCSC_RefGene_Name
## 733585 cg25472804                                                   
## 272999 cg08792630                                        FOXO3;FOXO3
## 534372 cg17643276 LRRC8A;LRRC8A;LRRC8A;CCBL1;CCBL1;CCBL1;CCBL1;CCBL1
## 633406 cg21538355                                                   
## 24396  cg00744351                                    CHRNE;C17orf107
## 398954 cg13101990                                                   
## 452798 cg14817867                                            PRPSAP2
## 286154 cg09230221                                               SIK3
## 415481 cg13644640                                             NSMCE2
## 421788 cg13844500                                                   
##                      Regulatory_Feature_Group             Islands_Name
## 733585                           Unclassified                         
## 272999        Unclassified_Cell_type_specific chr6:108878830-108883404
## 534372                    Promoter_Associated chr9:131643911-131644749
## 633406                                         chr12:38557328-38557693
## 24396  Promoter_Associated_Cell_type_specific    chr17:4802265-4805402
## 398954                                                                
## 452798                                                                
## 286154                                                                
## 415481                                                                
## 421788                                                                
##        Relation_to_Island      logFC    AveExpr         t      P.Value
## 733585            OpenSea  0.4356252  1.7479511  5.301601 7.164697e-07
## 272999            S_Shore  0.4881967 -0.2386603  5.194972 1.124579e-06
## 534372             Island -0.3645621 -2.5177243 -5.088019 1.759364e-06
## 633406            N_Shore  0.5043693  1.2883817  5.087971 1.759713e-06
## 24396              Island -1.0546937 -2.5461840 -5.030487 2.233807e-06
## 398954            OpenSea  0.3606594  2.2927293  5.022182 2.311865e-06
## 452798            OpenSea  0.3825603  1.3429254  5.014475 2.386682e-06
## 286154            OpenSea  0.3291795  3.1207657  5.003397 2.498367e-06
## 415481            OpenSea  0.3655282  2.5811810  4.994330 2.593555e-06
## 421788            OpenSea  0.5308018  1.7474254  4.963437 2.945164e-06
##        adj.P.Val        B
## 733585 0.1866203 5.134791
## 272999 0.1866203 4.760186
## 534372 0.1866203 4.388291
## 633406 0.1866203 4.388126
## 24396  0.1866203 4.189897
## 398954 0.1866203 4.161357
## 452798 0.1866203 4.134893
## 286154 0.1866203 4.096893
## 415481 0.1866203 4.065823
## 421788 0.1866203 3.960190
head(top_nat_vs_GIFT$dmr,10)
## NULL
# Allele
top_nat_vs_GIFT$dma$unmeth <- "T"
top_nat_vs_GIFT$dma$meth <- "C"
top_nat_vs_GIFT$fit$SE <- sqrt(top_nat_vs_GIFT$fit$s2.post) * top_nat_vs_GIFT$fit$stdev.unscaled

# Extract required columns from dma
top_nat_vs_GIFT_metal <-top_nat_vs_GIFT$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_nat_vs_GIFT_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 733585 cg25472804    C      T  1.7479511 7.164697e-07
## 272999 cg08792630    C      T -0.2386603 1.124579e-06
## 534372 cg17643276    C      T -2.5177243 1.759364e-06
## 633406 cg21538355    C      T  1.2883817 1.759713e-06
## 24396  cg00744351    C      T -2.5461840 2.233807e-06
## 398954 cg13101990    C      T  2.2927293 2.311865e-06
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_nat_vs_GIFT$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_nat_vs_GIFT$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_nat_vs_GIFT_metal <- merge(top_nat_vs_GIFT_metal, fitCE)
top_nat_vs_GIFT_metal <- merge(top_nat_vs_GIFT_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_nat_vs_GIFT_metal$N <- Neff

# Output for Meta-analysis
write.table(top_nat_vs_GIFT_metal, file="novakovic_top_nat_vs_GIFT_metal.tsv",
  sep="\t",quote=FALSE, row.names = FALSE)

head(top_nat_vs_GIFT$dma)
##         Row.names                                  UCSC_RefGene_Name
## 733585 cg25472804                                                   
## 272999 cg08792630                                        FOXO3;FOXO3
## 534372 cg17643276 LRRC8A;LRRC8A;LRRC8A;CCBL1;CCBL1;CCBL1;CCBL1;CCBL1
## 633406 cg21538355                                                   
## 24396  cg00744351                                    CHRNE;C17orf107
## 398954 cg13101990                                                   
##                      Regulatory_Feature_Group             Islands_Name
## 733585                           Unclassified                         
## 272999        Unclassified_Cell_type_specific chr6:108878830-108883404
## 534372                    Promoter_Associated chr9:131643911-131644749
## 633406                                         chr12:38557328-38557693
## 24396  Promoter_Associated_Cell_type_specific    chr17:4802265-4805402
## 398954                                                                
##        Relation_to_Island      logFC    AveExpr         t      P.Value
## 733585            OpenSea  0.4356252  1.7479511  5.301601 7.164697e-07
## 272999            S_Shore  0.4881967 -0.2386603  5.194972 1.124579e-06
## 534372             Island -0.3645621 -2.5177243 -5.088019 1.759364e-06
## 633406            N_Shore  0.5043693  1.2883817  5.087971 1.759713e-06
## 24396              Island -1.0546937 -2.5461840 -5.030487 2.233807e-06
## 398954            OpenSea  0.3606594  2.2927293  5.022182 2.311865e-06
##        adj.P.Val        B unmeth meth
## 733585 0.1866203 5.134791      T    C
## 272999 0.1866203 4.760186      T    C
## 534372 0.1866203 4.388291      T    C
## 633406 0.1866203 4.388126      T    C
## 24396  0.1866203 4.189897      T    C
## 398954 0.1866203 4.161357      T    C
head(top_nat_vs_GIFT$dmr)
## NULL
head(top_nat_vs_GIFT_metal)
##    Row.names meth unmeth   AveExpr    P.Value coefficient         SE        N
## 1 cg00000103    C      T  2.928434 0.54594002  0.05933121 0.09791007 87.31183
## 2 cg00000109    C      T  1.917816 0.02799813  0.22695322 0.10174236 87.31183
## 3 cg00000155    C      T  3.196455 0.21254799  0.09970849 0.07946058 87.31183
## 4 cg00000158    C      T  3.206763 0.01713958  0.18061338 0.07447168 87.31183
## 5 cg00000165    C      T -2.145394 0.71985416 -0.03213346 0.08933536 87.31183
## 6 cg00000221    C      T  1.119977 0.00673560  0.34399602 0.12423815 87.31183
saveRDS(top_nat_vs_GIFT,file="novakovic_nat_vs_GIFT.rds")

non-ART Vs FX

samplesheet <- subset(birth,art_subtype_ch1=="non-ART"|art_subtype_ch1=="Frozen embryo" | art_subtype_ch1=="Fresh embryo")
samplesheet$art_subtype <- gsub("Fresh embryo","FX",samplesheet$art_subtype)
samplesheet$art_subtype <- gsub("Frozen embryo","FX",samplesheet$art_subtype)
groups <- factor(samplesheet$art_subtype,levels=c("non-ART","FX"))

sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_nat_vs_FX <- dm_analysis(samplesheet=samplesheet,
  sex=sex,groups=groups,mx=Mvals,name="top_nat_vs_FX",
  myann=myann ,beta= betas)
## Your contrast returned 10345 individually significant probes. We recommend the default setting of pcutoff in dmrcate().
## Fitting chr1...
## Fitting chr2...
## Fitting chr3...
## Fitting chr4...
## Fitting chr5...
## Fitting chr6...
## Fitting chr7...
## Fitting chr8...
## Fitting chr9...
## Fitting chr10...
## Fitting chr11...
## Fitting chr12...
## Fitting chr13...
## Fitting chr14...
## Fitting chr15...
## Fitting chr16...
## Fitting chr17...
## Fitting chr18...
## Fitting chr19...
## Fitting chr20...
## Fitting chr21...
## Fitting chr22...
## Demarcating regions...
## Done!
## snapshotDate(): 2022-04-26
## see ?DMRcatedata and browseVignettes('DMRcatedata') for documentation
## loading from cache

## 
## RCircos.Core.Components initialized.
## Type ?RCircos.Reset.Plot.Parameters to see how to modify the core components.

head(top_nat_vs_FX$dma,10)
##         Row.names UCSC_RefGene_Name               Regulatory_Feature_Group
## 510348 cg16794867  AADACL2;MIR548H2                                       
## 656385 cg22481606           SUPT4H1                    Promoter_Associated
## 564284 cg18789663              PLD5                                       
## 12931  cg00397324           MX1;MX1 Promoter_Associated_Cell_type_specific
## 256518 cg08242354                                                         
## 11452  cg00352360     RPL23;SNORA21                                       
## 529461 cg17465697            TRIM11                    Promoter_Associated
## 363209 cg11847929           TXNDC15                    Promoter_Associated
## 774705 cg27039610                                                         
## 200896 cg06438056   AK2;AK2;AK2;AK2                    Promoter_Associated
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 510348                                     OpenSea -0.3125414 -0.9119653
## 656385  chr17:56429455-56429906             Island -0.3530952 -2.7371318
## 564284 chr1:242687922-242688682             Island -0.3227375 -2.7791271
## 12931   chr21:42798146-42798884             Island -0.5905909 -4.3832792
## 256518                                     OpenSea -0.2737494  0.8079667
## 11452   chr17:37009471-37010118            N_Shore -0.3676741 -2.6696850
## 529461 chr1:228593811-228594713             Island -0.4843081 -2.3824655
## 363209 chr5:134209887-134210504             Island -0.4979404 -4.0450930
## 774705  chr17:19015446-19015696            S_Shore -0.3706330 -3.3733946
## 200896   chr1:33502201-33502719             Island -0.5274924 -1.8619758
##                t      P.Value    adj.P.Val        B
## 510348 -7.127362 2.904946e-11 2.306074e-05 14.72537
## 656385 -6.832775 1.473793e-10 4.880089e-05 13.25324
## 564284 -6.791587 1.844225e-10 4.880089e-05 13.05000
## 12931  -6.647830 4.010728e-10 6.412515e-05 12.34583
## 256518 -6.617196 4.727368e-10 6.412515e-05 12.19683
## 11452  -6.612545 4.846681e-10 6.412515e-05 12.17424
## 529461 -6.385911 1.613488e-09 1.668646e-04 11.08445
## 363209 -6.351908 1.928643e-09 1.668646e-04 10.92281
## 774705 -6.333653 2.122030e-09 1.668646e-04 10.83625
## 200896 -6.319919 2.279976e-09 1.668646e-04 10.77122
head(top_nat_vs_FX$dmr,10)
## GRanges object with 10 ranges and 8 metadata columns:
##        seqnames              ranges strand |   no.cpgs min_smoothed_fdr
##           <Rle>           <IRanges>  <Rle> | <integer>        <numeric>
##    [1]    chr17     4804104-4805392      * |         5      1.40964e-13
##    [2]    chr19   21949968-21950478      * |         8      3.19202e-14
##    [3]    chr13   27295928-27296010      * |         3      3.71637e-11
##    [4]    chr20   32255052-32256071      * |         4      2.18229e-10
##    [5]     chr1   92949337-92950836      * |        29      1.58506e-23
##    [6]    chr17   19265610-19266474      * |        12      8.66653e-15
##    [7]     chr1     3567986-3569046      * |        14      1.78043e-18
##    [8]    chr22   38141814-38142561      * |        10      3.09090e-15
##    [9]     chr4       330865-332198      * |        14      1.13558e-13
##   [10]    chr12 105724039-105724818      * |         8      2.84113e-14
##           Stouffer      HMFDR      Fisher    maxdiff    meandiff
##          <numeric>  <numeric>   <numeric>  <numeric>   <numeric>
##    [1] 1.37601e-09 0.00240195 2.08525e-08 -0.1074677 -0.07196229
##    [2] 1.32966e-04 0.00513093 6.24658e-06 -0.0256360 -0.01386635
##    [3] 1.36793e-06 0.00337543 6.35969e-06  0.1029182  0.10085782
##    [4] 1.43599e-06 0.00547058 9.05215e-06 -0.1365313 -0.08319813
##    [5] 1.06137e-03 0.00208177 1.06585e-05 -0.0273865 -0.00748298
##    [6] 2.91341e-05 0.00250399 1.12376e-05 -0.0182193 -0.00871875
##    [7] 4.35303e-05 0.01212177 3.21754e-05 -0.0368901 -0.01325273
##    [8] 3.24082e-05 0.02255293 3.50961e-05 -0.0196740 -0.01237661
##    [9] 6.26856e-04 0.02059544 5.00050e-05 -0.0125315 -0.00659573
##   [10] 7.31081e-04 0.00666399 5.06946e-05 -0.0215764 -0.00877279
##           overlapping.genes
##                 <character>
##    [1]     C17orf107, CHRNE
##    [2]               ZNF100
##    [3]                 <NA>
##    [4]       ACTL10, NECAB3
##    [5]                 GFI1
##    [6]                 B9D1
##    [7]               WRAP73
##    [8]        NOL12, TRIOBP
##    [9] ZNF141, RP11-478C6.2
##   [10]             C12orf75
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
# Allele
top_nat_vs_FX$dma$unmeth <- "T"
top_nat_vs_FX$dma$meth <- "C"
top_nat_vs_FX$fit$SE <- sqrt(top_nat_vs_FX$fit$s2.post) * top_nat_vs_FX$fit$stdev.unscaled

# Extract required columns from dma
top_nat_vs_FX_metal <-top_nat_vs_FX$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_nat_vs_FX_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 510348 cg16794867    C      T -0.9119653 2.904946e-11
## 656385 cg22481606    C      T -2.7371318 1.473793e-10
## 564284 cg18789663    C      T -2.7791271 1.844225e-10
## 12931  cg00397324    C      T -4.3832792 4.010728e-10
## 256518 cg08242354    C      T  0.8079667 4.727368e-10
## 11452  cg00352360    C      T -2.6696850 4.846681e-10
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_nat_vs_FX$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_nat_vs_FX$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_nat_vs_FX_metal <- merge(top_nat_vs_FX_metal, fitCE)
top_nat_vs_FX_metal <- merge(top_nat_vs_FX_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_nat_vs_FX_metal$N <- Neff

# Output for Meta-analysis
write.table(top_nat_vs_FX_metal, file="novakovic_top_nat_vs_FX_metal.tsv",sep="\t",quote=FALSE, row.names = FALSE)

head(top_nat_vs_FX$dma)
##         Row.names UCSC_RefGene_Name               Regulatory_Feature_Group
## 510348 cg16794867  AADACL2;MIR548H2                                       
## 656385 cg22481606           SUPT4H1                    Promoter_Associated
## 564284 cg18789663              PLD5                                       
## 12931  cg00397324           MX1;MX1 Promoter_Associated_Cell_type_specific
## 256518 cg08242354                                                         
## 11452  cg00352360     RPL23;SNORA21                                       
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 510348                                     OpenSea -0.3125414 -0.9119653
## 656385  chr17:56429455-56429906             Island -0.3530952 -2.7371318
## 564284 chr1:242687922-242688682             Island -0.3227375 -2.7791271
## 12931   chr21:42798146-42798884             Island -0.5905909 -4.3832792
## 256518                                     OpenSea -0.2737494  0.8079667
## 11452   chr17:37009471-37010118            N_Shore -0.3676741 -2.6696850
##                t      P.Value    adj.P.Val        B unmeth meth
## 510348 -7.127362 2.904946e-11 2.306074e-05 14.72537      T    C
## 656385 -6.832775 1.473793e-10 4.880089e-05 13.25324      T    C
## 564284 -6.791587 1.844225e-10 4.880089e-05 13.05000      T    C
## 12931  -6.647830 4.010728e-10 6.412515e-05 12.34583      T    C
## 256518 -6.617196 4.727368e-10 6.412515e-05 12.19683      T    C
## 11452  -6.612545 4.846681e-10 6.412515e-05 12.17424      T    C
head(top_nat_vs_FX$dmr)
## GRanges object with 6 ranges and 8 metadata columns:
##       seqnames            ranges strand |   no.cpgs min_smoothed_fdr
##          <Rle>         <IRanges>  <Rle> | <integer>        <numeric>
##   [1]    chr17   4804104-4805392      * |         5      1.40964e-13
##   [2]    chr19 21949968-21950478      * |         8      3.19202e-14
##   [3]    chr13 27295928-27296010      * |         3      3.71637e-11
##   [4]    chr20 32255052-32256071      * |         4      2.18229e-10
##   [5]     chr1 92949337-92950836      * |        29      1.58506e-23
##   [6]    chr17 19265610-19266474      * |        12      8.66653e-15
##          Stouffer      HMFDR      Fisher    maxdiff    meandiff
##         <numeric>  <numeric>   <numeric>  <numeric>   <numeric>
##   [1] 1.37601e-09 0.00240195 2.08525e-08 -0.1074677 -0.07196229
##   [2] 1.32966e-04 0.00513093 6.24658e-06 -0.0256360 -0.01386635
##   [3] 1.36793e-06 0.00337543 6.35969e-06  0.1029182  0.10085782
##   [4] 1.43599e-06 0.00547058 9.05215e-06 -0.1365313 -0.08319813
##   [5] 1.06137e-03 0.00208177 1.06585e-05 -0.0273865 -0.00748298
##   [6] 2.91341e-05 0.00250399 1.12376e-05 -0.0182193 -0.00871875
##       overlapping.genes
##             <character>
##   [1]  C17orf107, CHRNE
##   [2]            ZNF100
##   [3]              <NA>
##   [4]    ACTL10, NECAB3
##   [5]              GFI1
##   [6]              B9D1
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
head(top_nat_vs_FX_metal)
##    Row.names meth unmeth   AveExpr    P.Value coefficient         SE        N
## 1 cg00000103    C      T  2.788711 0.01457338 -0.20117921 0.08149987 149.4479
## 2 cg00000109    C      T  1.816570 0.69070778 -0.03233653 0.08112867 149.4479
## 3 cg00000155    C      T  3.123791 0.38430129 -0.05258101 0.06027962 149.4479
## 4 cg00000158    C      T  3.202209 0.21636225  0.08988066 0.07242942 149.4479
## 5 cg00000165    C      T -2.102856 0.42851169  0.05103917 0.06430800 149.4479
## 6 cg00000221    C      T  1.025903 0.69346438  0.04175624 0.10575527 149.4479
saveRDS(top_nat_vs_FX,file="novakovic_nat_vs_FX.rds")

GIFT Vs FX

samplesheet <- subset(birth,art_subtype_ch1=="GIFT"|art_subtype_ch1=="Frozen embryo" | art_subtype_ch1=="Fresh embryo")
samplesheet$art_subtype <- gsub("Fresh embryo","FX",samplesheet$art_subtype)
samplesheet$art_subtype <- gsub("Frozen embryo","FX",samplesheet$art_subtype)
groups <- factor(samplesheet$art_subtype,levels=c("GIFT","FX"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_GIFT_vs_FX <- dm_analysis(samplesheet=samplesheet,
sex=sex,groups=groups,mx=Mvals,name="top_GIFT_vs_FX",
myann=myann ,beta= betas)

head(top_GIFT_vs_FX$dma,10)
##         Row.names                                 UCSC_RefGene_Name
## 649276 cg22179564                                                  
## 253124 cg08129561                SLC4A8;SLC4A8;SLC4A8;SLC4A8;SLC4A8
## 599622 cg20185668                                         RBM6;RBM6
## 13056  cg00400743                                            PRMT10
## 268646 cg08646202                               ALG9;ALG9;ALG9;ALG9
## 338870 cg11005961                                              LTN1
## 280404 cg09035199 RARB;RARB;RARB;RARB;RARB;RARB;RARB;RARB;RARB;RARB
## 430093 cg14099387                                            FAXDC2
## 179576 cg05723277                                                  
## 45900  cg01421264                                      TRIM72;PYDC1
##               Regulatory_Feature_Group             Islands_Name
## 649276 Unclassified_Cell_type_specific                         
## 253124                                                         
## 599622                                                         
## 13056                                  chr4:148604954-148605625
## 268646                                                         
## 338870             Promoter_Associated  chr21:30364965-30365342
## 280404              NonGene_Associated                         
## 430093                                                         
## 179576                                                         
## 45900                                   chr16:31225956-31228264
##        Relation_to_Island      logFC    AveExpr         t      P.Value
## 649276            OpenSea -0.3709180 -0.6268766 -5.250773 5.309413e-07
## 253124            OpenSea -0.5467845  2.5479203 -5.017068 1.517715e-06
## 599622            OpenSea -0.3859477  2.7935255 -5.000686 1.631815e-06
## 13056             N_Shore -0.4221099  1.7096600 -4.881273 2.755152e-06
## 268646            OpenSea -0.2876797  0.3169785 -4.873246 2.853048e-06
## 338870            S_Shore -0.3242807  0.3819812 -4.862545 2.988812e-06
## 280404            OpenSea -0.5665031  1.4683072 -4.842339 3.262435e-06
## 430093            OpenSea -0.5108562  2.1106915 -4.803883 3.851799e-06
## 179576            OpenSea -0.4766184  1.8207891 -4.786548 4.150035e-06
## 45900              Island -0.4286995 -3.1723902 -4.777763 4.309584e-06
##        adj.P.Val        B
## 649276 0.1787759 5.414453
## 253124 0.1787759 4.533066
## 599622 0.1787759 4.472272
## 13056  0.1787759 4.033151
## 268646 0.1787759 4.003891
## 338870 0.1787759 3.964934
## 280404 0.1787759 3.891535
## 430093 0.1787759 3.752414
## 179576 0.1787759 3.689951
## 45900  0.1787759 3.658357
head(top_GIFT_vs_FX$dmr,10)
## NULL
write.table(top_GIFT_vs_FX$dma,file="novakovic_top_GIFT_vs_FX.tsv",sep="\t",quote=FALSE)

# Allele
top_GIFT_vs_FX$dma$unmeth <- "T"
top_GIFT_vs_FX$dma$meth <- "C"
top_GIFT_vs_FX$fit$SE <- sqrt(top_GIFT_vs_FX$fit$s2.post) * top_GIFT_vs_FX$fit$stdev.unscaled

# Extract required columns from dma
top_GIFT_vs_FX_metal <-top_GIFT_vs_FX$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_GIFT_vs_FX_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 649276 cg22179564    C      T -0.6268766 5.309413e-07
## 253124 cg08129561    C      T  2.5479203 1.517715e-06
## 599622 cg20185668    C      T  2.7935255 1.631815e-06
## 13056  cg00400743    C      T  1.7096600 2.755152e-06
## 268646 cg08646202    C      T  0.3169785 2.853048e-06
## 338870 cg11005961    C      T  0.3819812 2.988812e-06
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_GIFT_vs_FX$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_GIFT_vs_FX$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_GIFT_vs_FX_metal <- merge(top_GIFT_vs_FX_metal, fitCE)
top_GIFT_vs_FX_metal <- merge(top_GIFT_vs_FX_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_GIFT_vs_FX_metal$N <- Neff

# Output for Meta-analysis
write.table(top_GIFT_vs_FX_metal, file="novakovic_top_GIFT_vs_FX_metal.tsv",sep="\t",quote=FALSE, row.names = FALSE)

head(top_GIFT_vs_FX$dma)
##         Row.names                  UCSC_RefGene_Name
## 649276 cg22179564                                   
## 253124 cg08129561 SLC4A8;SLC4A8;SLC4A8;SLC4A8;SLC4A8
## 599622 cg20185668                          RBM6;RBM6
## 13056  cg00400743                             PRMT10
## 268646 cg08646202                ALG9;ALG9;ALG9;ALG9
## 338870 cg11005961                               LTN1
##               Regulatory_Feature_Group             Islands_Name
## 649276 Unclassified_Cell_type_specific                         
## 253124                                                         
## 599622                                                         
## 13056                                  chr4:148604954-148605625
## 268646                                                         
## 338870             Promoter_Associated  chr21:30364965-30365342
##        Relation_to_Island      logFC    AveExpr         t      P.Value
## 649276            OpenSea -0.3709180 -0.6268766 -5.250773 5.309413e-07
## 253124            OpenSea -0.5467845  2.5479203 -5.017068 1.517715e-06
## 599622            OpenSea -0.3859477  2.7935255 -5.000686 1.631815e-06
## 13056             N_Shore -0.4221099  1.7096600 -4.881273 2.755152e-06
## 268646            OpenSea -0.2876797  0.3169785 -4.873246 2.853048e-06
## 338870            S_Shore -0.3242807  0.3819812 -4.862545 2.988812e-06
##        adj.P.Val        B unmeth meth
## 649276 0.1787759 5.414453      T    C
## 253124 0.1787759 4.533066      T    C
## 599622 0.1787759 4.472272      T    C
## 13056  0.1787759 4.033151      T    C
## 268646 0.1787759 4.003891      T    C
## 338870 0.1787759 3.964934      T    C
head(top_GIFT_vs_FX$dmr)
## NULL
head(top_GIFT_vs_FX_metal)
##    Row.names meth unmeth   AveExpr     P.Value coefficient         SE   N
## 1 cg00000103    C      T  2.775991 0.020682295 -0.22193837 0.09486855 105
## 2 cg00000109    C      T  1.868567 0.008603958 -0.24286527 0.09117302 105
## 3 cg00000155    C      T  3.144300 0.025332151 -0.15634435 0.06918670 105
## 4 cg00000158    C      T  3.254767 0.359191538 -0.07767706 0.08444672 105
## 5 cg00000165    C      T -2.105229 0.353503424  0.08144448 0.08749840 105
## 6 cg00000221    C      T  1.109474 0.017068470 -0.27655479 0.11460397 105
saveRDS(top_GIFT_vs_FX,file="novakovic_GIFT_vs_FX.rds")

non-ART Vs ART

samplesheet<-birth
groups <- factor(samplesheet$art_status,levels=c("non-ART","ART"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_nat_vs_ART <- dm_analysis(samplesheet=samplesheet,
sex=sex,groups=groups,mx=Mvals,name="top_nat_vs_ART",
myann=myann ,beta= betas)
## Your contrast returned 13368 individually significant probes. We recommend the default setting of pcutoff in dmrcate().
## Fitting chr1...
## Fitting chr2...
## Fitting chr3...
## Fitting chr4...
## Fitting chr5...
## Fitting chr6...
## Fitting chr7...
## Fitting chr8...
## Fitting chr9...
## Fitting chr10...
## Fitting chr11...
## Fitting chr12...
## Fitting chr13...
## Fitting chr14...
## Fitting chr15...
## Fitting chr16...
## Fitting chr17...
## Fitting chr18...
## Fitting chr19...
## Fitting chr20...
## Fitting chr21...
## Fitting chr22...
## Demarcating regions...
## Done!
## snapshotDate(): 2022-04-26
## see ?DMRcatedata and browseVignettes('DMRcatedata') for documentation
## loading from cache

## 
## RCircos.Core.Components initialized.
## Type ?RCircos.Reset.Plot.Parameters to see how to modify the core components.

head(top_nat_vs_ART$dma,10)
##         Row.names       UCSC_RefGene_Name
## 656385 cg22481606                 SUPT4H1
## 153960 cg04891094          GGA1;GGA1;GGA1
## 11452  cg00352360           RPL23;SNORA21
## 413802 cg13592399               NID2;NID2
## 232993 cg07465122 DERL1;DERL1;DERL1;DERL1
## 52374  cg01627351                        
## 195777 cg06262436                    ISM1
## 45699  cg01414687                   FABP3
## 226991 cg07267166   ZNF323;ZNF323;ZKSCAN3
## 564284 cg18789663                    PLD5
##                      Regulatory_Feature_Group             Islands_Name
## 656385                    Promoter_Associated  chr17:56429455-56429906
## 153960                    Promoter_Associated  chr22:38004443-38005271
## 11452                                          chr17:37009471-37010118
## 413802        Unclassified_Cell_type_specific  chr14:52534581-52536722
## 232993                    Promoter_Associated chr8:124054057-124054733
## 52374         Unclassified_Cell_type_specific                         
## 195777                                         chr20:13200670-13202616
## 45699                            Unclassified                         
## 226991 Promoter_Associated_Cell_type_specific                         
## 564284                                        chr1:242687922-242688682
##        Relation_to_Island      logFC   AveExpr         t      P.Value
## 656385             Island -0.3339464 -2.749103 -6.877678 6.744491e-11
## 153960            N_Shore -0.2845107 -3.487678 -6.750162 1.395542e-10
## 11452             N_Shore -0.3472372 -2.680899 -6.684368 2.024335e-10
## 413802             Island -0.4446331 -3.667192 -6.606711 3.131111e-10
## 232993             Island -0.4421342 -4.561650 -6.600575 3.240447e-10
## 52374             OpenSea -0.3262284 -2.623784 -6.597397 3.298558e-10
## 195777             Island -0.3606570 -2.228232 -6.559690 4.071225e-10
## 45699             OpenSea -0.4031644 -1.283429 -6.536978 4.619780e-10
## 226991            OpenSea -0.4578230 -2.122062 -6.511942 5.308787e-10
## 564284             Island -0.2854060 -2.776226 -6.465623 6.859886e-10
##           adj.P.Val        B
## 656385 4.364235e-05 14.04220
## 153960 4.364235e-05 13.37721
## 11452  4.364235e-05 13.03712
## 413802 4.364235e-05 12.63840
## 232993 4.364235e-05 12.60703
## 52374  4.364235e-05 12.59078
## 195777 4.584231e-05 12.39842
## 45699  4.584231e-05 12.28289
## 226991 4.682610e-05 12.15584
## 564284 5.445680e-05 11.92161
head(top_nat_vs_ART$dmr,10)
## GRanges object with 10 ranges and 8 metadata columns:
##        seqnames              ranges strand |   no.cpgs min_smoothed_fdr
##           <Rle>           <IRanges>  <Rle> | <integer>        <numeric>
##    [1]    chr17     4803684-4805392      * |         6      4.76415e-17
##    [2]     chr1   92949337-92950836      * |        29      3.93667e-23
##    [3]     chr6   44238228-44238905      * |         4      1.28097e-12
##    [4]    chr19   21949968-21950478      * |         8      3.86533e-14
##    [5]    chr22   38141814-38142561      * |        10      2.46143e-16
##    [6]     chr1 150551593-150552817      * |        14      8.74187e-22
##    [7]    chr22   38597691-38599166      * |        14      9.01588e-12
##    [8]    chr13   27295928-27296010      * |         3      1.57290e-10
##    [9]    chr17   19265610-19266474      * |        12      1.77821e-14
##   [10]    chr19   53465830-53466414      * |        13      7.50511e-16
##           Stouffer       HMFDR      Fisher    maxdiff    meandiff
##          <numeric>   <numeric>   <numeric>  <numeric>   <numeric>
##    [1] 7.43642e-13 0.000540807 1.70183e-11 -0.1053286 -0.06622385
##    [2] 9.29272e-05 0.002278879 6.97756e-07 -0.0274507 -0.00744223
##    [3] 4.85155e-07 0.001470802 1.62224e-06 -0.0230363 -0.02030476
##    [4] 6.01004e-05 0.003365381 2.12967e-06 -0.0256890 -0.01330783
##    [5] 4.39717e-06 0.012776526 3.65383e-06 -0.0197268 -0.01201911
##    [6] 2.39984e-03 0.000478644 4.17578e-06 -0.0277339 -0.01009005
##    [7] 2.40933e-06 0.009611601 5.27150e-06 -0.0265885 -0.01172901
##    [8] 1.15075e-06 0.002976441 5.31738e-06  0.0945277  0.09405572
##    [9] 8.37441e-05 0.001412716 5.82999e-06 -0.0179540 -0.00810600
##   [10] 9.38077e-05 0.011161533 8.37236e-06 -0.0243631 -0.01190277
##             overlapping.genes
##                   <character>
##    [1]       C17orf107, CHRNE
##    [2]                   GFI1
##    [3]               TMEM151B
##    [4]                 ZNF100
##    [5]          NOL12, TRIOBP
##    [6]                   MCL1
##    [7]           MAFF, PLA2G6
##    [8]                   <NA>
##    [9]                   B9D1
##   [10] ZNF816, ZNF321P, CTD..
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
write.table(top_nat_vs_ART$dma,file="novakovic_top_nat_vs_ART.tsv",sep="\t",quote=FALSE)

# Allele
top_nat_vs_ART$dma$unmeth <- "T"
top_nat_vs_ART$dma$meth <- "C"
top_nat_vs_ART$fit$SE <- sqrt(top_nat_vs_ART$fit$s2.post) * top_nat_vs_ART$fit$stdev.unscaled

# Extract required columns from dma
top_nat_vs_ART_metal <-top_nat_vs_ART$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_nat_vs_ART_metal)
##         Row.names meth unmeth   AveExpr      P.Value
## 656385 cg22481606    C      T -2.749103 6.744491e-11
## 153960 cg04891094    C      T -3.487678 1.395542e-10
## 11452  cg00352360    C      T -2.680899 2.024335e-10
## 413802 cg13592399    C      T -3.667192 3.131111e-10
## 232993 cg07465122    C      T -4.561650 3.240447e-10
## 52374  cg01627351    C      T -2.623784 3.298558e-10
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_nat_vs_ART$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_nat_vs_ART$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_nat_vs_ART_metal <- merge(top_nat_vs_ART_metal, fitCE)
top_nat_vs_ART_metal <- merge(top_nat_vs_ART_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_nat_vs_ART_metal$N <- Neff

# Output for Meta-analysis
write.table(top_nat_vs_ART_metal, file="novakovic_top_nat_vs_ART_metal.tsv",sep="\t",quote=FALSE, row.names = FALSE)

head(top_nat_vs_ART$dma)
##         Row.names       UCSC_RefGene_Name        Regulatory_Feature_Group
## 656385 cg22481606                 SUPT4H1             Promoter_Associated
## 153960 cg04891094          GGA1;GGA1;GGA1             Promoter_Associated
## 11452  cg00352360           RPL23;SNORA21                                
## 413802 cg13592399               NID2;NID2 Unclassified_Cell_type_specific
## 232993 cg07465122 DERL1;DERL1;DERL1;DERL1             Promoter_Associated
## 52374  cg01627351                         Unclassified_Cell_type_specific
##                    Islands_Name Relation_to_Island      logFC   AveExpr
## 656385  chr17:56429455-56429906             Island -0.3339464 -2.749103
## 153960  chr22:38004443-38005271            N_Shore -0.2845107 -3.487678
## 11452   chr17:37009471-37010118            N_Shore -0.3472372 -2.680899
## 413802  chr14:52534581-52536722             Island -0.4446331 -3.667192
## 232993 chr8:124054057-124054733             Island -0.4421342 -4.561650
## 52374                                      OpenSea -0.3262284 -2.623784
##                t      P.Value    adj.P.Val        B unmeth meth
## 656385 -6.877678 6.744491e-11 4.364235e-05 14.04220      T    C
## 153960 -6.750162 1.395542e-10 4.364235e-05 13.37721      T    C
## 11452  -6.684368 2.024335e-10 4.364235e-05 13.03712      T    C
## 413802 -6.606711 3.131111e-10 4.364235e-05 12.63840      T    C
## 232993 -6.600575 3.240447e-10 4.364235e-05 12.60703      T    C
## 52374  -6.597397 3.298558e-10 4.364235e-05 12.59078      T    C
head(top_nat_vs_ART$dmr)
## GRanges object with 6 ranges and 8 metadata columns:
##       seqnames              ranges strand |   no.cpgs min_smoothed_fdr
##          <Rle>           <IRanges>  <Rle> | <integer>        <numeric>
##   [1]    chr17     4803684-4805392      * |         6      4.76415e-17
##   [2]     chr1   92949337-92950836      * |        29      3.93667e-23
##   [3]     chr6   44238228-44238905      * |         4      1.28097e-12
##   [4]    chr19   21949968-21950478      * |         8      3.86533e-14
##   [5]    chr22   38141814-38142561      * |        10      2.46143e-16
##   [6]     chr1 150551593-150552817      * |        14      8.74187e-22
##          Stouffer       HMFDR      Fisher    maxdiff    meandiff
##         <numeric>   <numeric>   <numeric>  <numeric>   <numeric>
##   [1] 7.43642e-13 0.000540807 1.70183e-11 -0.1053286 -0.06622385
##   [2] 9.29272e-05 0.002278879 6.97756e-07 -0.0274507 -0.00744223
##   [3] 4.85155e-07 0.001470802 1.62224e-06 -0.0230363 -0.02030476
##   [4] 6.01004e-05 0.003365381 2.12967e-06 -0.0256890 -0.01330783
##   [5] 4.39717e-06 0.012776526 3.65383e-06 -0.0197268 -0.01201911
##   [6] 2.39984e-03 0.000478644 4.17578e-06 -0.0277339 -0.01009005
##       overlapping.genes
##             <character>
##   [1]  C17orf107, CHRNE
##   [2]              GFI1
##   [3]          TMEM151B
##   [4]            ZNF100
##   [5]     NOL12, TRIOBP
##   [6]              MCL1
##   -------
##   seqinfo: 22 sequences from an unspecified genome; no seqlengths
head(top_nat_vs_ART_metal)
##    Row.names meth unmeth   AveExpr    P.Value  coefficient         SE        N
## 1 cg00000103    C      T  2.804009 0.04755867 -0.158040608 0.07930231 166.9952
## 2 cg00000109    C      T  1.851047 0.81633363  0.018094667 0.07780892 166.9952
## 3 cg00000155    C      T  3.156911 0.96844098 -0.002294823 0.05793466 166.9952
## 4 cg00000158    C      T  3.224772 0.07503602  0.113970693 0.06370433 166.9952
## 5 cg00000165    C      T -2.104843 0.53035004  0.041074941 0.06535324 166.9952
## 6 cg00000221    C      T  1.088065 0.19420162  0.126508047 0.09713588 166.9952
saveRDS(top_nat_vs_ART,file="novakovic_nat_vs_ART.rds")

Fresh embryo Vs Frozen embryo

samplesheet <- subset(birth,art_subtype_ch1=="Fresh embryo"|art_subtype_ch1=="Frozen embryo")
groups <- factor(samplesheet$art_subtype,levels=c("Fresh embryo","Frozen embryo"))
sex <- factor(samplesheet$sex,levels=c("M","F"))
Mvals<-Mval[,colnames(Mval)%in% samplesheet$Basename]
betas<-beta[,colnames(beta)%in% samplesheet$Basename]

top_fh_vs_fz <- dm_analysis(samplesheet=samplesheet,
sex=sex,groups=groups,mx=Mvals,name="top_fh_vs_fz",
myann=myann ,beta= betas)

head(top_fh_vs_fz$dma,10)
##         Row.names                  UCSC_RefGene_Name
## 84778  cg02660277               PTPRN2;PTPRN2;PTPRN2
## 741713 cg25789405                                   
## 655472 cg22442197                       RPS2;SNORA10
## 225683 cg07224221                               RTP3
## 93377  cg02932204                              PDZD7
## 594607 cg19983118                                   
## 450713 cg14745383                    TRAPPC9;TRAPPC9
## 297858 cg09616692                        GFOD2;GFOD2
## 387340 cg12687426 KCNMB3;KCNMB3;KCNMB3;KCNMB3;KCNMB3
## 199370 cg06385817              KCTD21-AS1;KCTD21-AS1
##               Regulatory_Feature_Group             Islands_Name
## 84778                                  chr7:157440024-157442721
## 741713                                                         
## 655472                                    chr16:2014164-2015451
## 225683                                                         
## 93377  Unclassified_Cell_type_specific                         
## 594607             Promoter_Associated chr8:103822614-103823263
## 450713                 Gene_Associated                         
## 297858                                                         
## 387340                                 chr3:178978948-178979364
## 199370                                                         
##        Relation_to_Island      logFC    AveExpr         t      P.Value
## 84778             N_Shore -0.5795926  0.6172685 -5.062995 1.681695e-06
## 741713            OpenSea -0.4077803  3.5052246 -5.016527 2.047776e-06
## 655472            N_Shore -0.3887436  1.6464037 -4.874825 3.709926e-06
## 225683            OpenSea -0.3855097  2.7283251 -4.872687 3.743061e-06
## 93377             OpenSea  0.9753297 -0.8077276  4.849703 4.117929e-06
## 594607             Island -0.3887698 -3.1597680 -4.837678 4.328347e-06
## 450713            OpenSea -0.3503416  3.5933304 -4.799757 5.062525e-06
## 297858            OpenSea -0.4298725  2.8216829 -4.755132 6.081972e-06
## 387340            N_Shore -1.0536454  2.5230583 -4.662790 8.861886e-06
## 199370            OpenSea -0.2985104  1.6034168 -4.653318 9.208502e-06
##        adj.P.Val         B
## 84778  0.5726721 1.8239294
## 741713 0.5726721 1.7148261
## 655472 0.5726721 1.3850595
## 225683 0.5726721 1.3801189
## 93377  0.5726721 1.3270746
## 594607 0.5726721 1.2993706
## 450713 0.5741221 1.2122349
## 297858 0.6035171 1.1101359
## 387340 0.6767864 0.9004316
## 199370 0.6767864 0.8790417
head(top_fh_vs_fz$dmr,10)
## NULL
# Allele
top_fh_vs_fz$dma$unmeth <- "T"
top_fh_vs_fz$dma$meth <- "C"
top_fh_vs_fz$fit$SE <- sqrt(top_fh_vs_fz$fit$s2.post) * top_fh_vs_fz$fit$stdev.unscaled

# Extract required columns from dma
top_fh_vs_fz_metal <-top_fh_vs_fz$dma[,c("Row.names", "meth", "unmeth", "AveExpr", "P.Value")]
head(top_fh_vs_fz_metal)
##         Row.names meth unmeth    AveExpr      P.Value
## 84778  cg02660277    C      T  0.6172685 1.681695e-06
## 741713 cg25789405    C      T  3.5052246 2.047776e-06
## 655472 cg22442197    C      T  1.6464037 3.709926e-06
## 225683 cg07224221    C      T  2.7283251 3.743061e-06
## 93377  cg02932204    C      T -0.8077276 4.117929e-06
## 594607 cg19983118    C      T -3.1597680 4.328347e-06
# Convert fit outputs to dataframes
fitCE <- as.data.frame(top_fh_vs_fz$fit$coefficients)
fitCE$Row.names <- row.names(fitCE)
fitCE <- fitCE[,c(4,3)]
names(fitCE)[2]<- "coefficient"

fitSE <- as.data.frame(top_fh_vs_fz$fit$SE)
fitSE$Row.names <- row.names(fitSE)
fitSE <- fitSE[,c(4,3)]
names(fitSE)[2]<- "SE"

# Merge Datasets
top_fh_vs_fz_metal <- merge(top_fh_vs_fz_metal, fitCE)
top_fh_vs_fz_metal <- merge(top_fh_vs_fz_metal, fitSE)

# Number of effective participants
Neff = 4/sum(1/table(groups))
top_fh_vs_fz_metal$N <- Neff

# Output for Meta-analysis
write.table(top_fh_vs_fz_metal, file="novakovic_top_fh_vs_fz_metal.tsv",sep="\t",quote=FALSE, row.names = FALSE)

head(top_fh_vs_fz$dma)
##         Row.names    UCSC_RefGene_Name        Regulatory_Feature_Group
## 84778  cg02660277 PTPRN2;PTPRN2;PTPRN2                                
## 741713 cg25789405                                                     
## 655472 cg22442197         RPS2;SNORA10                                
## 225683 cg07224221                 RTP3                                
## 93377  cg02932204                PDZD7 Unclassified_Cell_type_specific
## 594607 cg19983118                                  Promoter_Associated
##                    Islands_Name Relation_to_Island      logFC    AveExpr
## 84778  chr7:157440024-157442721            N_Shore -0.5795926  0.6172685
## 741713                                     OpenSea -0.4077803  3.5052246
## 655472    chr16:2014164-2015451            N_Shore -0.3887436  1.6464037
## 225683                                     OpenSea -0.3855097  2.7283251
## 93377                                      OpenSea  0.9753297 -0.8077276
## 594607 chr8:103822614-103823263             Island -0.3887698 -3.1597680
##                t      P.Value adj.P.Val        B unmeth meth
## 84778  -5.062995 1.681695e-06 0.5726721 1.823929      T    C
## 741713 -5.016527 2.047776e-06 0.5726721 1.714826      T    C
## 655472 -4.874825 3.709926e-06 0.5726721 1.385060      T    C
## 225683 -4.872687 3.743061e-06 0.5726721 1.380119      T    C
## 93377   4.849703 4.117929e-06 0.5726721 1.327075      T    C
## 594607 -4.837678 4.328347e-06 0.5726721 1.299371      T    C
head(top_fh_vs_fz$dmr)
## NULL
head(top_fh_vs_fz_metal)
##    Row.names meth unmeth   AveExpr   P.Value coefficient         SE        N
## 1 cg00000103    C      T  2.718354 0.6835324  0.04405606 0.10778622 85.71429
## 2 cg00000109    C      T  1.806397 0.3133241  0.10598048 0.10462686 85.71429
## 3 cg00000155    C      T  3.105284 0.3734648  0.06970295 0.07799718 85.71429
## 4 cg00000158    C      T  3.235231 0.1800816  0.13702828 0.10156833 85.71429
## 5 cg00000165    C      T -2.085600 0.8718349  0.01483428 0.09173564 85.71429
## 6 cg00000221    C      T  1.039956 0.1013793  0.22321925 0.13511198 85.71429
saveRDS(top_fh_vs_fz,file="novakovic_fh_vs_fz.rds")

Venn diagrams of the differential methylated probes for each contrast

v1 <- list("FH up" = top_nat_vs_fh$dm_up , 
           "FZ up" = top_nat_vs_fz$dm_up ,
           "FH dn" = top_nat_vs_fh$dm_dn ,
           "FZ dn" = top_nat_vs_fz$dm_dn )
plot(euler(v1, shape = "ellipse"), quantities = TRUE)
## Warning in colSums(id & !empty) == 0 | merged_sets: longer object length is not
## a multiple of shorter object length
Comparison of probes altered by fresh and frozen IVF procedures

Comparison of probes altered by fresh and frozen IVF procedures

v2 <- list("FH up" = top_nat_vs_fh$dm_up , 
           "FH dn" = top_nat_vs_fh$dm_dn ,
           "GIFT up" = top_nat_vs_GIFT$dm_up ,
           "GIFT dn" = top_nat_vs_GIFT$dm_dn )
plot(euler(v2, shape = "ellipse"), quantities = TRUE)
Comparison of probes altered by GIFT, fresh and frozen IVF procedures

Comparison of probes altered by GIFT, fresh and frozen IVF procedures

v3 <- list("FZ up" = top_nat_vs_fz$dm_up , 
           "FZ dn" = top_nat_vs_fz$dm_dn ,
           "GIFT up" = top_nat_vs_GIFT$dm_up ,
           "GIFT dn" = top_nat_vs_GIFT$dm_dn )
plot(euler(v3, shape = "ellipse"), quantities = FALSE)
Comparison of probes altered by GIFT, fresh and frozen IVF procedures

Comparison of probes altered by GIFT, fresh and frozen IVF procedures

Spearman correlations of each contrast

mycontrasts <- list("top_nat_vs_fh"=top_nat_vs_fh, "top_nat_vs_fz"=top_nat_vs_fz, "top_nat_vs_FX"=top_nat_vs_FX ,
  "top_nat_vs_GIFT"=top_nat_vs_GIFT, "top_fh_vs_fz"=top_fh_vs_fz, "top_GIFT_vs_FX"=top_GIFT_vs_FX, "top_nat_vs_ART"=top_nat_vs_ART)
myrnks <- lapply(X = mycontrasts, FUN = myranks)
df <- join_all(myrnks,by="rn")
rownames(df) <- df$rn
df$rn=NULL
colnames(df) <- names(mycontrasts)
head(df)
##            top_nat_vs_fh top_nat_vs_fz top_nat_vs_FX top_nat_vs_GIFT
## cg25867694     0.2779684     3.6763299     0.3011779        2.759463
## cg16794867     0.2779684     0.7238417     0.2156508        1.880424
## cg00352360     0.3121982     1.2842258     0.2384943        1.464365
## cg18789663     0.3121982     1.0390963     0.2319340        1.906319
## cg06826756     0.3121982     1.5535760     0.2660528        1.586588
## cg17602885    -0.3121982    -1.5672834    -0.2647158       -1.821118
##            top_fh_vs_fz top_GIFT_vs_FX top_nat_vs_ART
## cg25867694    -5.898023       1.436621      0.2972941
## cg16794867   -39.704466       1.345870      0.2552747
## cg00352360   -14.842332       2.300222      0.2293530
## cg18789663   -34.365614       1.342284      0.2345244
## cg06826756    -7.176904       2.301847      0.2912689
## cg17602885     7.280737      -2.042617     -0.2781630
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")

mycors
##                 top_nat_vs_fh top_nat_vs_fz top_nat_vs_FX top_nat_vs_GIFT
## top_nat_vs_fh      1.00000000   0.045031346    0.52110291      0.03585764
## top_nat_vs_fz      0.04503135   1.000000000    0.13361141      0.11050972
## top_nat_vs_FX      0.52110291   0.133611413    1.00000000      0.03893099
## top_nat_vs_GIFT    0.03585764   0.110509724    0.03893099      1.00000000
## top_fh_vs_fz      -0.09323598   0.154258825   -0.03726622      0.08111275
## top_GIFT_vs_FX     0.05932582  -0.005131548    0.02715909     -0.16774856
## top_nat_vs_ART     0.26887275   0.196212113    0.42314333      0.12099776
##                 top_fh_vs_fz top_GIFT_vs_FX top_nat_vs_ART
## top_nat_vs_fh   -0.093235981    0.059325821    0.268872746
## top_nat_vs_fz    0.154258825   -0.005131548    0.196212113
## top_nat_vs_FX   -0.037266217    0.027159091    0.423143327
## top_nat_vs_GIFT  0.081112749   -0.167748564    0.120997764
## top_fh_vs_fz     1.000000000   -0.039962971    0.004837958
## top_GIFT_vs_FX  -0.039962971    1.000000000   -0.002127211
## top_nat_vs_ART   0.004837958   -0.002127211    1.000000000

Mitch analysis

library (mitch) 
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
if (! file.exists("ReactomePathways.gmt") ) {
  download.file("https://reactome.org/download/current/ReactomePathways.gmt.zip", 
  destfile="ReactomePathways.gmt.zip")
  unzip("ReactomePathways.gmt.zip",overwrite = TRUE)
}

genesets <- gmt_import("ReactomePathways.gmt") 

top_nat_vs_fh_mitch  <- run_mitch_1d(dma=top_nat_vs_fh$dma,name="nat_vs_fh") 
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_nat_vs_fh_mitch,20)
##                                              set setSize      pANOVA
## 885        Role of phospholipids in phagocytosis      16 0.001606699
## 367     Generation of second messenger molecules      15 0.003459456
## 534                  Metabolism of carbohydrates     178 0.003529133
## 715                Pre-NOTCH Processing in Golgi      15 0.003830771
## 743                            RAC1 GTPase cycle     109 0.004066208
## 766                            RHOD GTPase cycle      36 0.004368299
## 485                              Ion homeostasis      26 0.004817678
## 552                  MicroRNA (miRNA) biogenesis      20 0.005152500
## 745                            RAC3 GTPase cycle      59 0.005945712
## 698                 Platelet calcium homeostasis      17 0.007069312
## 924                      Semaphorin interactions      39 0.008846170
## 752                             RHO GTPase cycle     287 0.009202805
## 760                            RHOA GTPase cycle      90 0.009317369
## 11  APC/C:Cdc20 mediated degradation of Cyclin B      22 0.010671950
## 428                                Immune System    1144 0.012941277
## 279           Elevation of cytosolic Ca2+ levels      10 0.013013159
## 721     Processing of Capped Intronless Pre-mRNA      22 0.014269355
## 684             Peptide ligand-binding receptors      19 0.014993847
## 714          Pre-NOTCH Expression and Processing      44 0.016434257
## 608                  Negative regulation of FLT3      13 0.016842328
##          s.dist p.adjustANOVA
## 885 -0.45561234     0.7677224
## 367  0.43608801     0.7677224
## 534 -0.12724500     0.7677224
## 715 -0.43133369     0.7677224
## 743  0.15963532     0.7677224
## 766  0.27468507     0.7677224
## 485 -0.31953292     0.7677224
## 552 -0.36143224     0.7677224
## 745  0.20728913     0.7694877
## 698 -0.37743883     0.7694877
## 924  0.24243706     0.7694877
## 752  0.08990242     0.7694877
## 760  0.15886900     0.7694877
## 11   0.31458006     0.7694877
## 428  0.04474548     0.7694877
## 279 -0.45359512     0.7694877
## 721 -0.30191155     0.7694877
## 684  0.32246043     0.7694877
## 714 -0.20922074     0.7694877
## 608  0.38294137     0.7694877
top_nat_vs_fz_mitch  <- run_mitch_1d(dma=top_nat_vs_fz$dma,name="nat_vs_fz")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_nat_vs_fz_mitch,20)
##                                                                                       set
## 366                                                       Gene expression (Transcription)
## 368                                                         Generic Transcription Pathway
## 31                                         Activation of HOX genes during differentiation
## 35   Activation of anterior HOX genes in hindbrain development during early embryogenesis
## 787                                                       RNA Polymerase II Transcription
## 286                                                    Estrogen-dependent gene expression
## 48                                     Anchoring of the basal body to the plasma membrane
## 275                                                                ESR-mediated signaling
## 1004                                                     Signaling by TGFB family members
## 595                                   NOTCH4 Intracellular Domain Regulates Transcription
## 228                                                                               Disease
## 984                                                                   Signaling by NOTCH3
## 978                                                                    Signaling by NOTCH
## 242      Diseases of signal transduction by growth factor receptors and second messengers
## 249                                         Downregulation of TGF-beta receptor signaling
## 991                                                        Signaling by Nuclear Receptors
## 985                                                                   Signaling by NOTCH4
## 167                               Constitutive Signaling by NOTCH1 HD+PEST Domain Mutants
## 168                                  Constitutive Signaling by NOTCH1 PEST Domain Mutants
## 980                                  Signaling by NOTCH1 HD+PEST Domain Mutants in Cancer
##      setSize       pANOVA      s.dist p.adjustANOVA
## 366     1023 0.0002113954 -0.07010984     0.1971999
## 368      814 0.0003362461 -0.07530573     0.1971999
## 31        40 0.0007584256 -0.30791434     0.1971999
## 35        40 0.0007584256 -0.30791434     0.1971999
## 787      912 0.0008271809 -0.06665507     0.1971999
## 286       68 0.0013503445 -0.22505007     0.2644566
## 48        78 0.0015530171 -0.20756934     0.2644566
## 275      113 0.0019447059 -0.16911944     0.2897612
## 1004      84 0.0029147379 -0.18819126     0.3860408
## 595       14 0.0037730684 -0.44718848     0.4451666
## 228     1075 0.0041080811 -0.05311535     0.4451666
## 984       30 0.0055376159 -0.29277340     0.4783713
## 978      133 0.0058120446 -0.13889337     0.4783713
## 242      295 0.0069470602 -0.09194000     0.4783713
## 249       26 0.0073826582 -0.30367958     0.4783713
## 991      149 0.0075289235 -0.12723914     0.4783713
## 985       68 0.0075486847 -0.18760622     0.4783713
## 167       41 0.0088290006 -0.23653086     0.4783713
## 168       41 0.0088290006 -0.23653086     0.4783713
## 980       41 0.0088290006 -0.23653086     0.4783713
top_nat_vs_GIFT_mitch  <- run_mitch_1d(dma=top_nat_vs_GIFT$dma,name="nat_vs_GIFT")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_nat_vs_GIFT_mitch,20)
##                                                         set setSize
## 368                           Generic Transcription Pathway     814
## 366                         Gene expression (Transcription)    1023
## 1004                       Signaling by TGFB family members      84
## 225                                        Deubiquitination     197
## 1103                     Transcriptional Regulation by TP53     297
## 787                         RNA Polymerase II Transcription     912
## 1142                                        UCH proteinases      74
## 941                                    Signaling by Activin      11
## 486                         Ion transport by P-type ATPases      27
## 1059       TP53 Regulates Transcription of DNA Repair Genes      51
## 82                       Bile acid and bile salt metabolism      15
## 1107                    Transcriptional regulation by RUNX1     133
## 599                NRIF signals cell death from the nucleus      14
## 901  SMAD2/SMAD3:SMAD4 heterotrimer regulates transcription      27
## 249           Downregulation of TGF-beta receptor signaling      26
## 904               SUMO E3 ligases SUMOylate target proteins     132
## 684                        Peptide ligand-binding receptors      19
## 1143                       Ub-specific processing proteases     133
## 985                                     Signaling by NOTCH4      68
## 96                              CLEC7A (Dectin-1) signaling      84
##            pANOVA      s.dist p.adjustANOVA
## 368  0.0002143287 -0.07773747     0.2189629
## 366  0.0003673875 -0.06741430     0.2189629
## 1004 0.0010568687 -0.20704514     0.3239407
## 225  0.0012945258 -0.13348884     0.3239407
## 1103 0.0013588116 -0.10873710     0.3239407
## 787  0.0017287908 -0.06246491     0.3434531
## 1142 0.0024102432 -0.20430490     0.3653802
## 941  0.0025219145 -0.52604410     0.3653802
## 486  0.0027767323 -0.33274940     0.3653802
## 1059 0.0030652703 -0.23991326     0.3653802
## 82   0.0049268131  0.41940659     0.5221744
## 1107 0.0054247835 -0.14002415     0.5221744
## 599  0.0056948546 -0.42686518     0.5221744
## 901  0.0065629896 -0.30237181     0.5587917
## 249  0.0077567597 -0.30179925     0.6164038
## 904  0.0095390316 -0.13101963     0.6507784
## 684  0.0097473452  0.34262236     0.6507784
## 1143 0.0110441548 -0.12797417     0.6507784
## 985  0.0120192679 -0.17637123     0.6507784
## 96   0.0120728323 -0.15870119     0.6507784
top_nat_vs_FX_mitch  <- run_mitch_1d(dma=top_nat_vs_FX$dma,name="nat_vs_FX")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_nat_vs_FX_mitch,20)
##                                                                                       set
## 534                                                           Metabolism of carbohydrates
## 485                                                                       Ion homeostasis
## 715                                                         Pre-NOTCH Processing in Golgi
## 885                                                 Role of phospholipids in phagocytosis
## 228                                                                               Disease
## 367                                              Generation of second messenger molecules
## 366                                                       Gene expression (Transcription)
## 552                                                           MicroRNA (miRNA) biogenesis
## 760                                                                     RHOA GTPase cycle
## 698                                                          Platelet calcium homeostasis
## 684                                                      Peptide ligand-binding receptors
## 743                                                                     RAC1 GTPase cycle
## 31                                         Activation of HOX genes during differentiation
## 35   Activation of anterior HOX genes in hindbrain development during early embryogenesis
## 48                                     Anchoring of the basal body to the plasma membrane
## 766                                                                     RHOD GTPase cycle
## 150                                                  Class A/1 (Rhodopsin-like receptors)
## 1057                                     TP53 Regulates Transcription of Cell Cycle Genes
## 714                                                   Pre-NOTCH Expression and Processing
## 787                                                       RNA Polymerase II Transcription
##      setSize      pANOVA      s.dist p.adjustANOVA
## 534      178 0.002535029 -0.13167825     0.5997978
## 485       26 0.002712972 -0.33987587     0.5997978
## 715       15 0.003252534 -0.43894296     0.5997978
## 885       16 0.003608389 -0.42036103     0.5997978
## 228     1075 0.003639521 -0.05381998     0.5997978
## 367       15 0.004183287  0.42719283     0.5997978
## 366     1023 0.004320860 -0.05400806     0.5997978
## 552       20 0.004479889 -0.36723024     0.5997978
## 760       90 0.005838662  0.16842928     0.5997978
## 698       17 0.006469335 -0.38156169     0.5997978
## 684       19 0.006666762  0.35963515     0.5997978
## 743      109 0.006853844  0.15024164     0.5997978
## 31        40 0.007044605 -0.24641749     0.5997978
## 35        40 0.007044605 -0.24641749     0.5997978
## 48        78 0.008671977 -0.17217062     0.6891331
## 766       36 0.009982619  0.24830344     0.6974241
## 150       47 0.010436442  0.21611886     0.6974241
## 1057      43 0.011229207 -0.22365517     0.6974241
## 714       44 0.011650227 -0.21998258     0.6974241
## 787      912 0.011701746 -0.05026303     0.6974241
top_GIFT_vs_FX_mitch  <- run_mitch_1d(dma=top_GIFT_vs_FX$dma,name="GIFT_vs_FX")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_GIFT_vs_FX_mitch,20)
##                                                            set setSize
## 745                                          RAC3 GTPase cycle      59
## 721                   Processing of Capped Intronless Pre-mRNA      22
## 367                   Generation of second messenger molecules      15
## 850  Regulation of actin dynamics for phagocytic cup formation      44
## 373                                            Gluconeogenesis      24
## 1018                         Sphingolipid de novo biosynthesis      22
## 1000                                  Signaling by Rho GTPases     429
## 769                                          RHOH GTPase cycle      29
## 428                                              Immune System    1144
## 756                       RHO GTPases Activate WASPs and WAVEs      29
## 751                                       RHO GTPase Effectors     187
## 534                                Metabolism of carbohydrates     178
## 561                               Mitochondrial protein import      47
## 992                                          Signaling by PDGF      25
## 961                              Signaling by FGFR2 in disease      24
## 1001        Signaling by Rho GTPases, Miro GTPases and RHOBTB3     441
## 1142                                           UCH proteinases      74
## 744                                          RAC2 GTPase cycle      56
## 1024                              Sulfur amino acid metabolism      15
## 531                                                 Metabolism    1235
##           pANOVA      s.dist p.adjustANOVA
## 745  0.001407298  0.24061233     0.9171940
## 721  0.001538916 -0.39019679     0.9171940
## 367  0.004263388  0.42629623     0.9449736
## 850  0.004816679  0.24582873     0.9449736
## 373  0.005516085 -0.32739308     0.9449736
## 1018 0.006802370 -0.33343797     0.9449736
## 1000 0.007413908  0.07609155     0.9449736
## 769  0.007438322  0.28731152     0.9449736
## 428  0.007852202  0.04785876     0.9449736
## 756  0.007985077  0.28475158     0.9449736
## 751  0.010120490  0.10948105     0.9449736
## 534  0.010804527 -0.11117836     0.9449736
## 561  0.010846794 -0.21498612     0.9449736
## 992  0.011098684 -0.29356004     0.9449736
## 961  0.012193246 -0.29569940     0.9689566
## 1001 0.013040917  0.06962344     0.9715483
## 1142 0.016145324  0.16198187     0.9976463
## 744  0.019194693  0.18111497     0.9976463
## 1024 0.021659485 -0.34253524     0.9976463
## 531  0.023316256 -0.03948031     0.9976463
top_nat_vs_ART_mitch  <- run_mitch_1d(dma=top_nat_vs_ART$dma,name="nat_vs_ART")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_nat_vs_ART_mitch,20)
##                                                     set setSize       pANOVA
## 366                     Gene expression (Transcription)    1023 0.0007377169
## 885               Role of phospholipids in phagocytosis      16 0.0021797310
## 787                     RNA Polymerase II Transcription     912 0.0027098866
## 228                                             Disease    1075 0.0028066524
## 684                    Peptide ligand-binding receptors      19 0.0036651398
## 368                       Generic Transcription Pathway     814 0.0042538245
## 534                         Metabolism of carbohydrates     178 0.0054065940
## 485                                     Ion homeostasis      26 0.0054355926
## 715                       Pre-NOTCH Processing in Golgi      15 0.0058173847
## 1057   TP53 Regulates Transcription of Cell Cycle Genes      43 0.0061574242
## 48   Anchoring of the basal body to the plasma membrane      78 0.0064636100
## 698                        Platelet calcium homeostasis      17 0.0068993737
## 760                                   RHOA GTPase cycle      90 0.0092210271
## 390                             HATs acetylate histones      60 0.0106030231
## 656                       Other semaphorin interactions      10 0.0114313765
## 150                Class A/1 (Rhodopsin-like receptors)      47 0.0119299956
## 367            Generation of second messenger molecules      15 0.0119963524
## 128      Cell surface interactions at the vascular wall      57 0.0120937665
## 924                             Semaphorin interactions      39 0.0121375269
## 552                         MicroRNA (miRNA) biogenesis      20 0.0126059302
##           s.dist p.adjustANOVA
## 366  -0.06387173     0.6853378
## 885  -0.44260464     0.6853378
## 787  -0.05978675     0.6853378
## 228  -0.05530624     0.6853378
## 684   0.38515434     0.6853378
## 368  -0.06004462     0.6853378
## 534  -0.12132895     0.6853378
## 485  -0.31511824     0.6853378
## 715  -0.41137262     0.6853378
## 1057 -0.24162613     0.6853378
## 48   -0.17863392     0.6853378
## 698  -0.37857366     0.6853378
## 760   0.15908673     0.7309770
## 390  -0.19097747     0.7309770
## 656   0.46196162     0.7309770
## 150   0.21216938     0.7309770
## 367   0.37474193     0.7309770
## 128   0.19237793     0.7309770
## 924   0.23226977     0.7309770
## 552  -0.32234221     0.7309770
top_fh_vs_fz_mitch  <- run_mitch_1d(dma=top_fh_vs_fz$dma,name="fh_vs_fz")
## Note: When prioritising by significance (ie: small
##             p-values), large effect sizes might be missed.
head(top_fh_vs_fz_mitch,20)
##                                                                                                           set
## 14   APC/C:Cdh1 mediated degradation of Cdc20 and other APC/C:Cdh1 targeted proteins in late mitosis/early G1
## 122                                                                                                Cell Cycle
## 368                                                                             Generic Transcription Pathway
## 886                                                                                                   S Phase
## 124                                                                                       Cell Cycle, Mitotic
## 985                                                                                       Signaling by NOTCH4
## 957                                                                                        Signaling by FGFR1
## 1030                                                                                         Synthesis of DNA
## 984                                                                                       Signaling by NOTCH3
## 10                                                          APC/C-mediated degradation of cell cycle proteins
## 860                                                                          Regulation of mitotic cell cycle
## 962                                                                                        Signaling by FGFR3
## 1136                                                Transport of vitamins, nucleosides, and related molecules
## 69                                                                      Autodegradation of Cdh1 by Cdh1:APC/C
## 932                                                                                       Signal Transduction
## 12                                                                APC/C:Cdc20 mediated degradation of Securin
## 175                                                          Cyclin A:Cdk2-associated events at S phase entry
## 80                                                                     Beta-catenin independent WNT signaling
## 901                                                    SMAD2/SMAD3:SMAD4 heterotrimer regulates transcription
## 366                                                                           Gene expression (Transcription)
##      setSize       pANOVA      s.dist p.adjustANOVA
## 14        64 0.0006664414 -0.24625378     0.2628011
## 122      521 0.0008574973 -0.08631796     0.2628011
## 368      814 0.0009769290 -0.06924850     0.2628011
## 886      138 0.0012759637 -0.15927509     0.2628011
## 124      418 0.0018288559 -0.08967549     0.2628011
## 985       68 0.0019722228 -0.21728206     0.2628011
## 957       29 0.0023761430 -0.32616877     0.2628011
## 1030     103 0.0027884009 -0.17086825     0.2628011
## 984       30 0.0030976169 -0.31217625     0.2628011
## 10        77 0.0034594752 -0.19300504     0.2628011
## 860       77 0.0034594752 -0.19300504     0.2628011
## 962       27 0.0034979531 -0.32483023     0.2628011
## 1136      21 0.0036226410  0.36684709     0.2628011
## 69        56 0.0044041820 -0.22023228     0.2628011
## 932     1333 0.0050843283 -0.04716534     0.2628011
## 12        58 0.0055026970 -0.21097911     0.2628011
## 175       74 0.0055210755 -0.18684298     0.2628011
## 80       106 0.0055982195 -0.15608154     0.2628011
## 901       27 0.0057072186 -0.30747630     0.2628011
## 366     1023 0.0060404237 -0.05196186     0.2628011

SessionInfo

sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
## 
## 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      parallel  stats4    stats     graphics  grDevices utils    
##  [8] datasets  methods   base     
## 
## other attached packages:
##  [1] mitch_1.8.0                                        
##  [2] IlluminaHumanMethylationEPICmanifest_0.3.0         
##  [3] ENmix_1.32.0                                       
##  [4] doParallel_1.0.17                                  
##  [5] qqman_0.1.8                                        
##  [6] RCircos_1.2.2                                      
##  [7] beeswarm_0.4.0                                     
##  [8] forestplot_2.0.1                                   
##  [9] checkmate_2.1.0                                    
## [10] magrittr_2.0.3                                     
## [11] reshape2_1.4.4                                     
## [12] gplots_3.1.3                                       
## [13] eulerr_6.1.1                                       
## [14] GEOquery_2.64.2                                    
## [15] RColorBrewer_1.1-3                                 
## [16] IlluminaHumanMethylation450kmanifest_0.4.0         
## [17] topconfects_1.12.0                                 
## [18] DMRcatedata_2.14.0                                 
## [19] ExperimentHub_2.4.0                                
## [20] AnnotationHub_3.4.0                                
## [21] BiocFileCache_2.4.0                                
## [22] dbplyr_2.1.1                                       
## [23] DMRcate_2.10.0                                     
## [24] limma_3.52.1                                       
## [25] missMethyl_1.30.0                                  
## [26] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
## [27] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1 
## [28] minfi_1.42.0                                       
## [29] bumphunter_1.38.0                                  
## [30] locfit_1.5-9.5                                     
## [31] iterators_1.0.14                                   
## [32] foreach_1.5.2                                      
## [33] Biostrings_2.64.0                                  
## [34] XVector_0.36.0                                     
## [35] SummarizedExperiment_1.26.1                        
## [36] Biobase_2.56.0                                     
## [37] MatrixGenerics_1.8.0                               
## [38] matrixStats_0.62.0                                 
## [39] GenomicRanges_1.48.0                               
## [40] GenomeInfoDb_1.32.2                                
## [41] IRanges_2.30.0                                     
## [42] S4Vectors_0.34.0                                   
## [43] BiocGenerics_0.42.0                                
## [44] R.utils_2.11.0                                     
## [45] R.oo_1.24.0                                        
## [46] R.methodsS3_1.8.1                                  
## [47] plyr_1.8.7                                         
## 
## loaded via a namespace (and not attached):
##   [1] rappdirs_0.3.3                rtracklayer_1.56.0           
##   [3] GGally_2.1.2                  tidyr_1.2.0                  
##   [5] ggplot2_3.3.6                 bit64_4.0.5                  
##   [7] knitr_1.39                    DelayedArray_0.22.0          
##   [9] data.table_1.14.2             rpart_4.1.16                 
##  [11] KEGGREST_1.36.0               RCurl_1.98-1.6               
##  [13] AnnotationFilter_1.20.0       generics_0.1.2               
##  [15] GenomicFeatures_1.48.1        preprocessCore_1.58.0        
##  [17] RSQLite_2.2.14                bit_4.0.4                    
##  [19] tzdb_0.3.0                    xml2_1.3.3                   
##  [21] httpuv_1.6.5                  assertthat_0.2.1             
##  [23] xfun_0.31                     hms_1.1.1                    
##  [25] jquerylib_0.1.4               evaluate_0.15                
##  [27] promises_1.2.0.1              fansi_1.0.3                  
##  [29] restfulr_0.0.13               scrime_1.3.5                 
##  [31] progress_1.2.2                caTools_1.18.2               
##  [33] readxl_1.4.0                  DBI_1.1.2                    
##  [35] geneplotter_1.74.0            htmlwidgets_1.5.4            
##  [37] reshape_0.8.9                 purrr_0.3.4                  
##  [39] ellipsis_0.3.2                dplyr_1.0.9                  
##  [41] backports_1.4.1               permute_0.9-7                
##  [43] calibrate_1.7.7               annotate_1.74.0              
##  [45] biomaRt_2.52.0                sparseMatrixStats_1.8.0      
##  [47] vctrs_0.4.1                   ensembldb_2.20.1             
##  [49] cachem_1.0.6                  withr_2.5.0                  
##  [51] Gviz_1.40.1                   BSgenome_1.64.0              
##  [53] GenomicAlignments_1.32.0      prettyunits_1.1.1            
##  [55] mclust_5.4.9                  cluster_2.1.3                
##  [57] RPMM_1.25                     lazyeval_0.2.2               
##  [59] crayon_1.5.1                  genefilter_1.78.0            
##  [61] edgeR_3.38.1                  pkgconfig_2.0.3              
##  [63] nlme_3.1-157                  ProtGenerics_1.28.0          
##  [65] nnet_7.3-17                   rlang_1.0.2                  
##  [67] lifecycle_1.0.1               filelock_1.0.2               
##  [69] dichromat_2.0-0.1             polyclip_1.10-0              
##  [71] cellranger_1.1.0              rngtools_1.5.2               
##  [73] base64_2.0                    Matrix_1.4-1                 
##  [75] Rhdf5lib_1.18.2               base64enc_0.1-3              
##  [77] png_0.1-7                     rjson_0.2.21                 
##  [79] bitops_1.0-7                  KernSmooth_2.23-20           
##  [81] rhdf5filters_1.8.0            blob_1.2.3                   
##  [83] DelayedMatrixStats_1.18.0     doRNG_1.8.2                  
##  [85] stringr_1.4.0                 nor1mix_1.3-0                
##  [87] readr_2.1.2                   jpeg_0.1-9                   
##  [89] scales_1.2.0                  memoise_2.0.1                
##  [91] zlibbioc_1.42.0               compiler_4.2.0               
##  [93] BiocIO_1.6.0                  illuminaio_0.38.0            
##  [95] Rsamtools_2.12.0              cli_3.3.0                    
##  [97] DSS_2.44.0                    htmlTable_2.4.0              
##  [99] Formula_1.2-4                 MASS_7.3-57                  
## [101] tidyselect_1.1.2              stringi_1.7.6                
## [103] highr_0.9                     yaml_2.3.5                   
## [105] askpass_1.1                   latticeExtra_0.6-29          
## [107] sass_0.4.1                    VariantAnnotation_1.42.1     
## [109] tools_4.2.0                   rstudioapi_0.13              
## [111] foreign_0.8-82                bsseq_1.32.0                 
## [113] gridExtra_2.3                 digest_0.6.29                
## [115] BiocManager_1.30.17           shiny_1.7.1                  
## [117] quadprog_1.5-8                Rcpp_1.0.8.3                 
## [119] siggenes_1.70.0               BiocVersion_3.15.2           
## [121] later_1.3.0                   org.Hs.eg.db_3.15.0          
## [123] httr_1.4.3                    AnnotationDbi_1.58.0         
## [125] biovizBase_1.44.0             colorspace_2.0-3             
## [127] polylabelr_0.2.0              XML_3.99-0.9                 
## [129] splines_4.2.0                 statmod_1.4.36               
## [131] multtest_2.52.0               xtable_1.8-4                 
## [133] jsonlite_1.8.0                dynamicTreeCut_1.63-1        
## [135] R6_2.5.1                      echarts4r_0.4.3              
## [137] Hmisc_4.7-0                   pillar_1.7.0                 
## [139] htmltools_0.5.2               mime_0.12                    
## [141] glue_1.6.2                    fastmap_1.1.0                
## [143] BiocParallel_1.30.2           interactiveDisplayBase_1.34.0
## [145] beanplot_1.3.1                codetools_0.2-18             
## [147] utf8_1.2.2                    lattice_0.20-45              
## [149] bslib_0.3.1                   tibble_3.1.7                 
## [151] curl_4.3.2                    gtools_3.9.2                 
## [153] openssl_2.0.1                 survival_3.3-1               
## [155] rmarkdown_2.14                munsell_0.5.0                
## [157] rhdf5_2.40.0                  GenomeInfoDbData_1.2.8       
## [159] HDF5Array_1.24.0              impute_1.70.0                
## [161] gtable_0.3.0