Skip to content

Commit 5d69317

Browse files
committed
added dockerfile
1 parent 42536eb commit 5d69317

3 files changed

Lines changed: 40 additions & 1 deletion

File tree

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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()"]

chapters/02-degs.Rmd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
2935
global_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
'}',

configuration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# For instructions on configuring the report see the README
22
species: human # [human, rat, mouse]
33
gmt: 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+
48
data:
59
- group1: DA
610
group2: CA

0 commit comments

Comments
 (0)