Error to run snakemake using conda environment to create a docker image
I am running a docker file using snakemake command wrapped in a bash script, but it does not give the output (just giving a dry run). Not sure what I am missing. I am attaching the files for your reference. Any help would be much appreciated.
Bash script : (test.sh)
#!/bin/bash
snakemake --cores 5 -s test_snk.py
snakemake: (snk.py)
SAMPLES, = glob_wildcards("data/{sample}.fastq.gz")
rule all:
"""
Collect the main outputs of the workflow.
"""
input:
expand("output/{sample}_fastqc.zip", sample = SAMPLES),
rule bbduk_adapter_trim:
"""
run bbduk to trim adapters
"""
input:
fq = "data/{sample}.fastq.gz",
ref="/refs/adapters.fa"
output:
"data/{sample}.fq"
conda:
"environment.yml"
shell:
"""
bbduk.sh in={input.fq} outu={output} ref={input.ref} ktrim=r k=23 mink=11 hdist=1 tpe tbo
"""
rule fastqc:
"""
fastqc does a quick quality control checks
"""
input:
"data/{sample}.fq"
output:
"output/{sample}_fastqc.zip"
shell:
"fastqc -o output/ {input}"
dockerfile:
FROM continuumio/miniconda:latest
WORKDIR /work
COPY env.yml ./
COPY snk.py ./
COPY test.sh ./
COPY data/L001.fastq.gz ./
COPY data/L002.fastq.gz ./
RUN chmod +x test.sh
RUN conda env create -f env.yml
RUN echo "source activate myenv"; /bin/bash
ENV PATH /opt/conda/envs/myenv/bin:$PATH
CMD ["sh","./test.sh"]
• 184 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Please use the formatting bar (especially the
codeoption) to present your post better. You can use backticks for inline code (`text` becomestext), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.