Last updated: 2021-09-24

Checks: 7 0

Knit directory: femNATCD_MethSeq/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210128) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 56bb68f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.Rhistory
    Ignored:    code/.Rhistory
    Ignored:    data/Epicounts.csv
    Ignored:    data/Epimeta.csv
    Ignored:    data/Epitpm.csv
    Ignored:    data/KangUnivers.txt
    Ignored:    data/Kang_DataPreprocessing.RData
    Ignored:    data/Kang_dataset_genesMod_version2.txt
    Ignored:    data/PatMeta.csv
    Ignored:    data/ProcessedData.RData
    Ignored:    data/RTrawdata/
    Ignored:    data/SNPCommonFilt.csv
    Ignored:    data/femNAT_PC20.txt
    Ignored:    output/BrainMod_Enrichemnt.pdf
    Ignored:    output/Brain_Module_Heatmap.pdf
    Ignored:    output/DMR_Results.csv
    Ignored:    output/GOres.xlsx
    Ignored:    output/LME_GOplot.pdf
    Ignored:    output/LME_Results.csv
    Ignored:    output/LME_Results_Sig.csv
    Ignored:    output/LME_tophit.svg
    Ignored:    output/ProcessedData.RData
    Ignored:    output/RNAvsMETplots.pdf
    Ignored:    output/Regions_GOplot.pdf
    Ignored:    output/ResultsgroupComp.txt
    Ignored:    output/SEM_summary_groupEpi_M15.txt
    Ignored:    output/SEM_summary_groupEpi_M2.txt
    Ignored:    output/SEM_summary_groupEpi_M_all.txt
    Ignored:    output/SEM_summary_groupEpi_TopHit.txt
    Ignored:    output/SEM_summary_groupEpi_all.txt
    Ignored:    output/SEMplot_Epi_M15.html
    Ignored:    output/SEMplot_Epi_M15.png
    Ignored:    output/SEMplot_Epi_M15_files/
    Ignored:    output/SEMplot_Epi_M2.html
    Ignored:    output/SEMplot_Epi_M2.png
    Ignored:    output/SEMplot_Epi_M2_files/
    Ignored:    output/SEMplot_Epi_M_all.html
    Ignored:    output/SEMplot_Epi_M_all.png
    Ignored:    output/SEMplot_Epi_M_all_files/
    Ignored:    output/SEMplot_Epi_TopHit.html
    Ignored:    output/SEMplot_Epi_TopHit.png
    Ignored:    output/SEMplot_Epi_TopHit_files/
    Ignored:    output/SEMplot_Epi_all.html
    Ignored:    output/SEMplot_Epi_all.png
    Ignored:    output/SEMplot_Epi_all_files/
    Ignored:    output/barplots.pdf
    Ignored:    output/circos_DMR_tags.svg
    Ignored:    output/circos_LME_tags.svg
    Ignored:    output/clinFact.RData
    Ignored:    output/dds_filt_analyzed.RData
    Ignored:    output/designh0.RData
    Ignored:    output/designh1.RData
    Ignored:    output/envFact.RData
    Ignored:    output/functional_Enrichemnt.pdf
    Ignored:    output/gostres.pdf
    Ignored:    output/modelFact.RData
    Ignored:    output/resdmr.RData
    Ignored:    output/resultsdmr_table.RData
    Ignored:    output/table1_filtered.Rmd
    Ignored:    output/table1_filtered.docx
    Ignored:    output/table1_unfiltered.Rmd
    Ignored:    output/table1_unfiltered.docx
    Ignored:    setup_built.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/02_2_Main_DMR.Rmd) and HTML (docs/02_2_Main_DMR.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 43333cc achiocch 2021-09-24 adds new build
html b497cc9 achiocch 2021-09-17 Build site.
html ccbc9e4 achiocch 2021-08-10 Build site.
html 70cd649 achiocch 2021-08-06 Build site.
html 2a53a87 achiocch 2021-08-06 Build site.
Rmd e4425b8 achiocch 2021-08-06 wflow_publish(c(“analysis/", "code/”, "docs/*"))
html e3a9ae3 achiocch 2021-08-04 Build site.
html f6bbdc0 achiocch 2021-08-04 Build site.
html 710904a achiocch 2021-08-03 Build site.
Rmd 16112c3 achiocch 2021-08-03 wflow_publish(c(“analysis/", "code/”, “docs/”))
html 16112c3 achiocch 2021-08-03 wflow_publish(c(“analysis/", "code/”, “docs/”))
html cde8384 achiocch 2021-08-03 Build site.
html d761be4 achiocch 2021-07-31 Build site.
html b452d2f achiocch 2021-07-30 wflow_publish(c(“analysis/", "code/”, "docs/*"))
html 2734c4e achiocch 2021-05-08 Build site.
html a847823 achiocch 2021-05-08 wflow_publish(c(“analysis/", "code/”, "docs/*"))
html 9cc52f7 achiocch 2021-05-08 Build site.
html 158d0b4 achiocch 2021-05-08 wflow_publish(c(“analysis/", "code/”, "docs/*"))
html 0f262d1 achiocch 2021-05-07 Build site.
html 5167b90 achiocch 2021-05-07 wflow_publish(c(“analysis/", "code/”, "docs/*"))
html b5b9b9f achiocch 2021-05-07 maual commit
html 05aac7f achiocch 2021-04-23 Build site.
html f5c5265 achiocch 2021-04-19 Build site.
html 17f1eec achiocch 2021-04-10 Build site.
html 91de221 achiocch 2021-04-05 Build site.
html 4ea1bba achiocch 2021-02-25 Build site.
Rmd 6c21638 achiocch 2021-02-25 wflow_publish(c(“analysis/", "code/”, "docs/*"), update = F)
html 6c21638 achiocch 2021-02-25 wflow_publish(c(“analysis/", "code/”, "docs/*"), update = F)

## load Data  ####
load(paste0(Home,"/output/dds_filt_analyzed.RData"))

bumphunting

ranges=as.data.frame(rowRanges(dds_filt))
log_cpm = log2(counts(dds_filt, normalized=T)+1)

BootN = 250
GapSize = 500 


if (reanalyze){
    cl <- clusterMaker(ranges$seqnames, ranges$start, maxGap = GapSize)
    tab=table(cl)
    designmatrix = model.matrix(design(dds_filt), colData(dds_filt))
    resdmr = bumphunter(log_cpm, 
                        design=designmatrix,
                        pos=ranges$start,
                        chr=ranges$seqnames,
                        coef=ncol(designmatrix), cluster=cl, cutoff=0.5, nullMethod = "bootstrap", B=BootN)
    
    bumphunter:::foreachCleanup()
    
    save(resdmr, file=paste0(Home,"/output/resdmr.RData")) 
} else {
  if(file.exists(paste0(Home,"/output/resdmr.RData"))){
    load(paste0(Home,"/output/resdmr.RData"))
  } else {
    cl <- clusterMaker(ranges$seqnames, ranges$start, maxGap = GapSize)
    tab=table(cl)
    designmatrix = model.matrix(design(dds_filt), colData(dds_filt))
    resdmr = bumphunter(log_cpm, 
                        design=designmatrix,
                        pos=ranges$start,
                        chr=ranges$seqnames,
                        coef=ncol(designmatrix), cluster=cl, cutoff=0.5, nullMethod = "bootstrap", B=BootN)
    
  }
}

subject = annotateTranscripts(txdb = TxDb.Hsapiens.UCSC.hg19.knownGene, 
                              by="gene")
No annotationPackage supplied. Trying org.Hs.eg.db.
Lade nötiges Paket: org.Hs.eg.db
Getting TSS and TSE.
  403 genes were dropped because they have exons located on both strands
  of the same reference sequence or on more than one reference sequence,
  so cannot be represented by a single genomic range.
  Use 'single.strand.genes.only=FALSE' to get all the genes in a
  GRangesList object, or use suppressMessages() to suppress this message.
Getting CSS and CSE.
Getting exons.
Annotating genes.
resultsdmr_table = resdmr$table

subject = subject[subject@seqnames %in% unique(resultsdmr_table$chr),]

chck = matchGenes(resultsdmr_table, subject, type ="any", promoterDist = 2000)
.................................................................................
resultsdmr_table = cbind(resultsdmr_table, chck)

display_tab_simple(head(resultsdmr_table, n=10))
chr start end value area cluster indexStart indexEnd L clusterL p.value fwer p.valueArea fwerArea name annotation description region distance subregion insideDistance exonnumber nexons UTR strand geneL codingL Geneid subjectHits
3194 chr3 24561792 24561792 -1.365 1.365 16970 35466 35466 1 1 0.000 0.268 0.004 0.980 NA NA close to 3’ close to 3’ 1134 NA NA NA 1 NA
73 NA 100616448 1791
6414 chr16 87636490 87636843 -0.647 1.941 75725 158341 158343 3 10 0.000 0.420 0.000 0.464 JPH3 NM_001271604 NM_001271605 NM_020655 NP_001258533 NP_001258534 NP_065706 NR_073379 overlaps exon upstream inside 1049 overlaps exon upstream 0 2 7 overlaps 5’ UTR
96320 NA 57338 15750
6516 chr17 5403095 5403469 -0.640 1.919 76781 160823 160825 3 8 0.000 0.444 0.000 0.488 LOC728392 NM_001162371 NP_001155843 overlaps two exons inside 850 overlaps two exons 0 2 2 3’UTR
1572 NA 728392 18663
5076 chr10 135088739 135088739 -1.289 1.289 52539 109119 109119 1 14 0.000 0.472 0.006 0.996 ADAM8 NM_001109 NM_001164489 NM_001164490 NP_001100 NP_001157961 NP_001157962 XM_011539117 XM_017015465 XM_017015466 XP_011537419 XP_016870954 XP_016870955 inside intron inside 1668 inside intron 248 3 23 inside transcription region
14487 NA 101 2152
2559 chr1 68151243 68151858 -0.537 1.610 4738 10048 10050 3 11 0.000 0.756 0.001 0.856 GADD45A NM_001199741 NM_001199742 NM_001924 NP_001186670 NP_001186671 NP_001915 covers exon(s) inside 383 covers exon(s) 0 1 4 inside transcription region
3161 NA 1647 5589
3396 chr3 195943548 195943548 -1.192 1.192 21455 44421 44421 1 5 0.001 0.808 0.010 1.000 SLC51A NM_152672 NP_689885 inside exon inside 165 inside exon 0 1 8 5’ UTR
16918 NA 200931 6115
5489 chr12 50348045 50348422 -0.778 1.555 60025 125369 125370 2 5 0.001 0.812 0.001 0.896 AQP2 NM_000486 NP_000477 overlaps two exons inside 3521 overlaps two exons 0 2 4 inside transcription region
8140 NA 359 10625
7597 chr21 34696824 34696854 -0.776 1.552 93519 199373 199374 2 5 0.001 0.812 0.001 0.896 IFNAR1 NM_000629 NM_001384498 NM_001384499 NM_001384500 NM_001384501 NM_001384502 NM_001384503 NM_001384504 NP_000620 NP_001371427 NP_001371428 NP_001371429 NP_001371430 NP_001371431 NP_001371432 NP_001371433 XM_011529552 XP_011527854 inside exon inside 90 inside exon 0 1 12 5’ UTR
35394 NA 3454 10411
5983 chr15 31652488 31652665 -0.768 1.536 68659 143276 143277 2 7 0.001 0.824 0.001 0.904 KLF13 NM_001302461 NM_015995 NP_001289390 NP_057079 NR_033741 inside intron inside 33405 inside intron 11547 2 2 inside transcription region
51019 NA 51621 13653
5730 chr13 88324376 88324376 -1.187 1.187 64598 134778 134778 1 10 0.001 0.828 0.010 1.000 SLITRK5 NM_001384609 NM_001384610 NM_015567 NP_001371538 NP_001371539 NP_056382 promoter promoter 494 NA NA NA 2 NA
7000 NA 26050 8052
Nsig_region = sum(resultsdmr_table$fwer<=0.2)

Sighits = resultsdmr_table[resultsdmr_table$fwer<=0.2,]

save(resultsdmr_table, file=paste0(Home,"/output/resultsdmr_table.RData"))
save(resdmr, file=paste0(Home,"/output/resdmr.RData"))

res_dmr_filtered = resultsdmr_table %>% dplyr::select(-annotation)
write.csv(resultsdmr_table, file = paste0(Home,"/output/DMR_Results.csv"), row.names = T)

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] org.Hs.eg.db_3.12.0                    
 [2] scales_1.1.1                           
 [3] RCircos_1.2.1                          
 [4] compareGroups_4.4.6                    
 [5] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [6] GenomicFeatures_1.42.1                 
 [7] AnnotationDbi_1.52.0                   
 [8] bumphunter_1.32.0                      
 [9] locfit_1.5-9.4                         
[10] doParallel_1.0.16                      
[11] iterators_1.0.13                       
[12] foreach_1.5.1                          
[13] kableExtra_1.3.1                       
[14] forcats_0.5.0                          
[15] stringr_1.4.0                          
[16] dplyr_1.0.2                            
[17] purrr_0.3.4                            
[18] readr_1.4.0                            
[19] tidyr_1.1.2                            
[20] tibble_3.0.4                           
[21] ggplot2_3.3.3                          
[22] tidyverse_1.3.0                        
[23] DESeq2_1.30.0                          
[24] SummarizedExperiment_1.20.0            
[25] Biobase_2.50.0                         
[26] MatrixGenerics_1.2.0                   
[27] matrixStats_0.57.0                     
[28] GenomicRanges_1.42.0                   
[29] GenomeInfoDb_1.26.2                    
[30] IRanges_2.24.1                         
[31] S4Vectors_0.28.1                       
[32] BiocGenerics_0.36.0                    
[33] RColorBrewer_1.1-2                     
[34] knitr_1.30                             
[35] workflowr_1.6.2                        

loaded via a namespace (and not attached):
  [1] readxl_1.3.1             uuid_0.1-4               backports_1.2.0         
  [4] systemfonts_0.3.2        BiocFileCache_1.14.0     splines_4.0.3           
  [7] BiocParallel_1.24.1      digest_0.6.27            htmltools_0.5.1.1       
 [10] fansi_0.4.1              magrittr_2.0.1           Rsolnp_1.16             
 [13] memoise_2.0.0            Biostrings_2.58.0        annotate_1.68.0         
 [16] modelr_0.1.8             officer_0.3.16           askpass_1.1             
 [19] prettyunits_1.1.1        colorspace_2.0-0         blob_1.2.1              
 [22] rvest_0.3.6              rappdirs_0.3.1           haven_2.3.1             
 [25] xfun_0.20                crayon_1.3.4             RCurl_1.98-1.2          
 [28] jsonlite_1.7.2           genefilter_1.72.0        survival_3.2-7          
 [31] glue_1.4.2               gtable_0.3.0             zlibbioc_1.36.0         
 [34] XVector_0.30.0           webshot_0.5.2            DelayedArray_0.16.0     
 [37] DBI_1.1.1                rngtools_1.5             Rcpp_1.0.5              
 [40] viridisLite_0.3.0        xtable_1.8-4             progress_1.2.2          
 [43] bit_4.0.4                truncnorm_1.0-8          httr_1.4.2              
 [46] ellipsis_0.3.1           mice_3.12.0              pkgconfig_2.0.3         
 [49] XML_3.99-0.5             dbplyr_2.0.0             tidyselect_1.1.0        
 [52] rlang_0.4.10             later_1.1.0.1            munsell_0.5.0           
 [55] cellranger_1.1.0         tools_4.0.3              cachem_1.0.1            
 [58] cli_2.2.0                generics_0.1.0           RSQLite_2.2.2           
 [61] broom_0.7.3              evaluate_0.14            fastmap_1.1.0           
 [64] yaml_2.2.1               bit64_4.0.5              fs_1.5.0                
 [67] zip_2.1.1                doRNG_1.8.2              whisker_0.4             
 [70] xml2_1.3.2               biomaRt_2.46.2           compiler_4.0.3          
 [73] rstudioapi_0.13          curl_4.3                 reprex_1.0.0            
 [76] geneplotter_1.68.0       stringi_1.5.3            HardyWeinberg_1.7.1     
 [79] highr_0.8                ps_1.5.0                 gdtools_0.2.3           
 [82] lattice_0.20-41          Matrix_1.2-18            vctrs_0.3.6             
 [85] pillar_1.4.7             lifecycle_0.2.0          data.table_1.13.6       
 [88] bitops_1.0-6             flextable_0.6.2          httpuv_1.5.5            
 [91] rtracklayer_1.49.5       R6_2.5.0                 promises_1.1.1          
 [94] writexl_1.3.1            codetools_0.2-18         assertthat_0.2.1        
 [97] chron_2.3-56             openssl_1.4.3            rprojroot_2.0.2         
[100] withr_2.4.1              GenomicAlignments_1.26.0 Rsamtools_2.6.0         
[103] GenomeInfoDbData_1.2.4   hms_1.0.0                grid_4.0.3              
[106] rmarkdown_2.6            git2r_0.28.0             base64enc_0.1-3         
[109] lubridate_1.7.9.2