-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile #179
Open
fgypas
wants to merge
1
commit into
docs-describe-zarp-outputs
Choose a base branch
from
add-dockerfile
base: docs-describe-zarp-outputs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Dockerfile #179
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM continuumio/miniconda3:24.7.1-0 | ||
|
||
|
||
COPY install/environment.yml /environment.yml | ||
COPY workflow /workflow | ||
COPY resources /resources | ||
COPY tests/input_files/config.yaml /config.yaml | ||
COPY tests/input_files/samples.tsv /samples.tsv | ||
COPY tests/input_files/rule_config.yaml /rule_config.yaml | ||
COPY tests/input_files/project1/synthetic.mate_1.fastq.gz /project1/synthetic.mate_1.fastq.gz | ||
COPY tests/input_files/project1/synthetic.mate_2.fastq.gz /project1/synthetic.mate_2.fastq.gz | ||
COPY tests/input_files/project2/synthetic.mate_1.fastq.gz /project2/synthetic.mate_1.fastq.gz | ||
COPY tests/input_files/homo_sapiens/annotation.gtf /annotation.gtf | ||
COPY tests/input_files/homo_sapiens/genome.fa /genome.fa | ||
|
||
RUN sed -i 's# - conda-forge##' workflow/envs/STAR.yaml && \ | ||
sed -i 's#2.7.11#2.7.10#' workflow/envs/STAR.yaml && \ | ||
sed -i 's#../input_files/project1/#/project1/#g' /samples.tsv && \ | ||
sed -i 's#../input_files/project2/#/project2/#g' /samples.tsv && \ | ||
sed -i 's#../input_files/homo_sapiens/##g' /samples.tsv && \ | ||
sed -i 's#../input_files/##' /config.yaml | ||
|
||
RUN conda install -c conda-forge mamba --yes && \ | ||
mamba env create -f /environment.yml && \ | ||
conda clean --all --yes | ||
|
||
RUN echo "source activate zarp" > ~/.bashrc | ||
|
||
ENV SNAKEMAKE_CONDA_PREFIX="/conda_envs" | ||
ENV PATH=/opt/conda/envs/zarp/bin:$PATH | ||
|
||
RUN snakemake -p --snakefile /workflow/Snakefile --configfile /config.yaml --cores 4 --use-conda --conda-create-envs-only --verbose && \ | ||
conda clean --all --yes | ||
|
||
RUN rm /config.yaml /samples.tsv /rule_config.yaml /project1/synthetic.mate_1.fastq.gz /project1/synthetic.mate_2.fastq.gz /project2/synthetic.mate_1.fastq.gz | ||
|
||
RUN mkdir -p /data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# Required fields | ||
samples: "data/samples_docker.tsv" | ||
output_dir: "data/results" | ||
log_dir: "data/logs" | ||
cluster_log_dir: "data/logs/cluster" | ||
kallisto_indexes: "data/results/kallisto_indexes" | ||
salmon_indexes: "data/results/salmon_indexes" | ||
star_indexes: "data/results/star_indexes" | ||
alfa_indexes: "data/results/alfa_indexes" | ||
# Optional fields | ||
rule_config: "data/rule_config.yaml" | ||
report_description: "No description provided by user" | ||
report_logo: "../../images/logo.128px.png" | ||
report_url: "https://zavolan.biozentrum.unibas.ch/" | ||
author_name: "NA" | ||
author_email: "NA" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sample seqmode fq1 index_size kmer fq1_3p fq1_5p organism gtf genome sd mean libtype fq1_polya_3p fq1_polya_5p fq2 fq2_3p fq2_5p fq2_polya_3p fq2_polya_5p | ||
synthetic_10_reads_paired_synthetic_10_reads_paired pe data/project1/synthetic.mate_1.fastq.gz 75 31 AGATCGGAAGAGCACA XXXXXXXXXXXXX homo_sapiens data/annotation.gtf data/genome.fa 100 250 ISF AAAAAAAAAAAAAAAAA XXXXXXXXXXXXXXXXX data/project1/synthetic.mate_2.fastq.gz AGATCGGAAGAGCGT XXXXXXXXXXXXX XXXXXXXXXXXXXXXXX TTTTTTTTTTTTTTTTT | ||
synthetic_10_reads_mate_1_synthetic_10_reads_mate_1 se data/project2/synthetic.mate_1.fastq.gz 75 31 AGATCGGAAGAGCACA XXXXXXXXXXXXX homo_sapiens data/annotation.gtf data/genome.fa 100 250 SF AAAAAAAAAAAAAAAAA XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# Tear down test environment | ||
cleanup () { | ||
rc=$? | ||
rm -rf .cache/ | ||
rm -rf .config/ | ||
rm -rf .fontconfig/ | ||
rm -rf .java/ | ||
rm -rf .snakemake/ | ||
cd $user_dir | ||
echo "Exit status: $rc" | ||
} | ||
trap cleanup EXIT | ||
|
||
# Set up test environment | ||
set -eo pipefail # ensures that script exits at first command that exits with non-zero status | ||
set -u # ensures that script exits when unset variables are used | ||
set -x # facilitates debugging by printing out executed commands | ||
user_dir=$PWD | ||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
cd $script_dir | ||
|
||
mkdir -p data | ||
cp ../../tests/input_files/homo_sapiens/genome.fa data/genome.fa | ||
cp ../../tests/input_files/homo_sapiens/annotation.gtf data/annotation.gtf | ||
cp -r ../../tests/input_files/project1 data/project1 | ||
cp -r ../../tests/input_files/project2 data/project2 | ||
cp -r ../../tests/input_files/config_docker.yaml data/config_docker.yaml | ||
cp ../../tests/input_files/rule_config.yaml data/rule_config.yaml | ||
cp ../../tests/input_files/samples_docker.tsv data/samples_docker.tsv | ||
|
||
# Pull the zarp container | ||
docker pull zavolab/zarp:1.0.0-rc.1 | ||
|
||
# Run tests with Docker | ||
docker run \ | ||
--platform linux/x86_64 \ | ||
--mount type=bind,source=$script_dir/data,target=/data \ | ||
zavolab/zarp:1.0.0-rc.1 \ | ||
snakemake \ | ||
-p \ | ||
--snakefile /workflow/Snakefile \ | ||
--configfile data/config_docker.yaml \ | ||
--cores 4 --use-conda --verbose |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Mac and Linux.