Skip to content

Commit 1f01e75

Browse files
Snakemake pipeline fixes and downstream data updates from PR #166
- Replace dedent/cd/wget pattern with curl --create-dirs throughout Snakefile to fix silent failures where shell sections would exit without running commands - Update Ensembl download to use may2025.archive.ensembl.org (main site broken) and move query string to download_ensembl_curl_config.txt - Update CGI biomarkers download URL (changed upstream, no longer zipped) - Add Dockerfile.snakemake: multi-stage build with npm rebuild to fix Node version compilation issues with native deps (node-expat/xml-stream) - Add downloadCosmic.sh helper script for COSMIC download auth flow - Fix fdaSrs/index.js: UNII file header renamed 'PT' -> 'Display Name' upstream, causing all 168k records to be skipped silently - Update data/signatures.json: add sourceIdVersion '3' to all COSMIC signatures (DBS/ID/SBS series) and add name field for proper versioned record lookup Co-authored-by: Matthew Stuart-Edwards <m.stuartedwards@uleth.ca>
1 parent fe5ca2f commit 1f01e75

5 files changed

Lines changed: 171 additions & 131 deletions

File tree

Dockerfile.snakemake

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM node:18 AS node_stage
2+
WORKDIR /usr/src/app
3+
# Bundle app source
4+
COPY package*.json ./
5+
RUN rm -rf node_modules
6+
RUN npm install
7+
RUN npm ci --only=production
8+
# COPY everything not in dockerignore file
9+
COPY . .
10+
# set to avoid errors when singularity overloads working dir
11+
ENV NODE_PATH=/usr/src/app/node_modules
12+
13+
FROM ubuntu:noble
14+
WORKDIR /usr/src/app
15+
COPY --from=node_stage /usr/src/app/package*.json ./
16+
COPY --from=node_stage /usr/src/app/node_modules ./node_modules
17+
18+
RUN apt-get update && \
19+
apt-get install -y curl && \
20+
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
21+
apt-get install -y nodejs python3 python3-pip python3-pulp python3-wheel snakemake unzip wget nano
22+
23+
# Verify Node.js version
24+
RUN node -v
25+
26+
#RUN pip3 install --upgrade setuptools pip wheel && \
27+
#pip3 install "pulp<2.3.1" && \
28+
#pip3 install snakemake
29+
30+
RUN mkdir /usr/src/app/snakemake_data
31+
RUN mkdir /usr/src/app/snakemake_logs
32+
RUN chmod 777 /usr/src/app/snakemake_data
33+
RUN chmod 777 /usr/src/app/snakemake_logs
34+
35+
# Copy the Snakefile to the working directory (assuming it's already in the build context)
36+
COPY . .
37+
COPY ./download_ensembl_curl_config.txt /usr/src/app/
38+
COPY ./downloadCosmic.sh /usr/src/app
39+
40+
# Still getting NODE version errors, but a rebuild is quick and helps.
41+
RUN npm rebuild
42+
43+
# Run the Snakefile using Snakemake
44+
#CMD [ "sh", "-c", "snakemake --debug -j 1 --config gkb_url=$GKB_URL gkb_user=$GKB_USER gkb_pass=$GKB_PASS --until $GKB_LOADER"]
45+
CMD [ "sh", "-c", "snakemake --debug -j 1 --config gkb_url=$GKB_URL gkb_user=$GKB_USER gkb_pass=$GKB_PASS"]
46+

0 commit comments

Comments
 (0)