File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 1. Use r-ver for native Apple Silicon (ARM64) support
2+ FROM rocker/r-ver:latest
3+
4+ # 2. Install system dependencies + Pandoc (Critical for RMarkdown)
5+ RUN apt-get update && apt-get install -y \
6+ libxml2-dev \
7+ libssl-dev \
8+ pandoc \
9+ && rm -rf /var/lib/apt/lists/*
10+
11+ WORKDIR /project
12+
13+ # 3. Setup renv files
14+ COPY renv.lock .Rprofile ./
15+ COPY renv/activate.R renv/activate.R
16+ RUN mkdir -p renv library data
17+
18+ # 4. SPEED BOOST:
19+ # - Use 'jammy' binaries (pre-compiled for the container's Ubuntu base)
20+ # - Use all CPU cores (Ncpus) to install 200+ packages in parallel
21+ RUN R -e "options(repos = c(CRAN = 'https://packagemanager.posit.co/cran/__linux__/jammy/latest'), Ncpus = parallel::detectCores()); renv::restore()"
22+
23+ # 5. Copy your Rmd files and site configuration
24+ # Use a wildcard for _site.yml so it doesn't crash if the file is missing
25+ COPY *.Rmd ./
26+ COPY _site.ym[l] ./
27+
28+ # 6. Render the site
29+ CMD ["R" , "-e" , "rmarkdown::render_site()" ]
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ These are volcano plots of the DEGs.
2626
2727``` {r degs-volcanoplots, results="asis"}
2828# Dynamically generate volcano plots for each data set
29+ # Load the configuration (usually at the start of your index.Rmd or setup chunk)
30+ config <- yaml::read_yaml("configuration.yml")
31+
32+ # Access the toggle
33+ show_fdr <- config$use_fdr
34+
2935global_state$data %>%
3036 purrr::map(~ {
3137 # Create a new environment for each child
@@ -43,7 +49,7 @@ global_state$data %>%
4349 '',
4450 '```{r, echo=FALSE}',
4551 'if (has_data) {',
46- ' volcano_plot(current_data)',
52+ ' volcano_plot(current_data, show_fdr )',
4753 '} else {',
4854 ' cat("No significant data available to display for this comparison.")',
4955 '}',
Original file line number Diff line number Diff line change 11# For instructions on configuring the report see the README
22species : human # [human, rat, mouse]
33gmt : Human_GOALL_with_GO_iea_March_01_2025_symbol.gmt # [Human, Rat, Mouse]
4+
5+ # Statistical Options
6+ use_fdr : true # [true, false] Set to true to show FDR line, false for raw p-value
7+
48data :
59 - group1 : DA
610 group2 : CA
You can’t perform that action at this time.
0 commit comments