diff --git a/Dockerfile b/Dockerfile index b6f7913..b1d9ce0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,26 +7,9 @@ RUN conda config --set channel_priority strict ## install snakemake RUN mamba install -y -c conda-forge -c bioconda snakemake graphviz -# install chrome dependencies (for kaleido/plotly to export plot .png/.svg) -RUN apt update && apt-get install -y \ - libnss3 \ - libatk-bridge2.0-0 \ - libcups2 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxrandr2 \ - libgbm1 \ - libxkbcommon0 \ - libpango-1.0-0 \ - libcairo2 - -# install python packages -RUN pip install --upgrade pip -RUN pip install kaleido - -# install chrome for kaleido -RUN kaleido_get_chrome +# download + install Google Chrome (for kaleido/plotly to export plot .png/.svg) +RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +RUN apt-get update && apt install -y ./google-chrome-stable_current_amd64.deb ## copy the pipeline code into the container WORKDIR /app diff --git a/app/workflow/Snakefile b/app/workflow/Snakefile index 16e8e13..6844c77 100644 --- a/app/workflow/Snakefile +++ b/app/workflow/Snakefile @@ -103,7 +103,7 @@ VERSION_ENVS = [ # ********** Quarto reports ********** QMD_FILES = glob(os.path.join(REPORTS_DIR, "**", "*.qmd"), recursive=True) if REPORTS_DIR else [] -QUARTO_HTML_FILES = [STEP_QUARTO_DIR + os.path.basename(os.path.dirname(f)) + "/" + os.path.splitext(os.path.basename(f))[0] + ".html" for f in QMD_FILES] +QUARTO_HTML_FILES = [STEP_QUARTO_DIR + os.path.splitext(os.path.basename(qmd))[0] + ".html" for qmd in QMD_FILES] # ********** helper functions to get R1/R2 FASTQ files ********** def get_r1(wildcards): @@ -990,14 +990,16 @@ rule prose: ############# Last step: Re-generate user-defined Quarto reports ############# rule render_quarto: input: - qmd_path=REPORTS_DIR + "{dir_name}/{qmd_name}.qmd", + qmd_path=REPORTS_DIR + "{qmd_name}.qmd", methods=STEP_PROSE_DIR + "methods.md", # not used; runs Quarto as the last step output: - STEP_QUARTO_DIR + "{dir_name}/{qmd_name}.html", + STEP_QUARTO_DIR + "{qmd_name}.html", + threads: + CORES conda: "envs/quarto.yml" log: - LOGS + Path(STEP_QUARTO_DIR).name + "/{dir_name}/{qmd_name}.log", + LOGS + Path(STEP_QUARTO_DIR).name + "/{qmd_name}.log", shell: # Quarto writes the rendered HTML next to the source .qmd; move it into # the results reports dir so it matches the declared output. (Quarto's @@ -1005,6 +1007,5 @@ rule render_quarto: # pointed straight at an arbitrary results path.) """ quarto render {input.qmd_path} -M embed-resources:true &> {log} - mkdir -p "$(dirname {output})" mv "$(dirname {input.qmd_path})/{wildcards.qmd_name}.html" "{output}" """