Skip to content
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

Rubicon #123

Merged
merged 33 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
338bf22
[FEATURE] nested attribute access for config dictionary in vpipe
uweschmitt Oct 26, 2021
3167377
first attempt to write summary.json
uweschmitt Oct 26, 2021
b7e04d3
ran smakefmt
uweschmitt Oct 26, 2021
d12c34f
first attempt
uweschmitt Nov 10, 2021
dc4d4f4
create index of human genome if needed
uweschmitt Nov 10, 2021
b51c187
minor cleanup
uweschmitt Dec 14, 2021
8184d2f
ran smakefmt
uweschmitt Oct 26, 2021
ccdf01e
dehuman: use incoming raw data files + tempdirs for intermediate files
uweschmitt Jan 17, 2022
ea9fb1b
moved dehuman task to separate file
uweschmitt Jan 17, 2022
8c02c1a
Code reuse: Temp prefix function in common
DrYak Jan 21, 2022
511e97f
new strategy: prepare upload folder
uweschmitt Jan 28, 2022
664dc86
Splitting dehuman into sub-rules
DrYak Feb 17, 2022
2737e3d
Making prepare_upload more generic:
DrYak Feb 18, 2022
7ade4cb
prepare_upload relies on external script
DrYak Feb 18, 2022
7a8fd3c
keep the linters happy
DrYak Feb 18, 2022
9ff1fb5
Who let the cats out?
DrYak Feb 21, 2022
e96ca9c
Circumventing snakefmt regression
DrYak Feb 21, 2022
f9d0320
More code reuse: temp prefix
DrYak Feb 21, 2022
05543ed
Bug detected by HIV end-to-end testing
DrYak Feb 21, 2022
bd911d1
Reorganize dehuman to reuse main aligner
DrYak Feb 22, 2022
f13ac46
Fix local option and results dir
DrYak Feb 22, 2022
066dcbd
Test Lint and upload
DrYak Feb 22, 2022
190cd7d
Fix consensus and "comment" field in cram
DrYak Feb 22, 2022
01ec3b4
Upload and dehuman tweaks.
DrYak Feb 25, 2022
9492f02
tweaks in generation of upload cram
DrYak Feb 25, 2022
9ce1b6f
Plumbing
DrYak Feb 25, 2022
4f932c7
Random nonce disabled by default in upload demo
DrYak Feb 26, 2022
3c7f8ce
Add the frameshift_deletions_check to the uploads
DrYak Feb 27, 2022
67e3e7d
Lots of proof-reading
kpj Mar 10, 2022
4188d26
Re-use extract's output + text
DrYak Mar 4, 2022
adf040f
(Partial) support for on-line Host genome fetching
DrYak Mar 11, 2022
b2de332
Redesigned support for URL to host genome
DrYak Mar 12, 2022
f730d88
Documentation
DrYak Mar 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
.Python
env/
build/
vendor/
develop-eggs/
dist/
downloads/
Expand Down
2 changes: 2 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ENABLE_LINTERS:
- SNAKEMAKE_SNAKEFMT
- MARKDOWN_MARKDOWNLINT
- JUPYTER_JUPYFMT
- PERL_PERLCRITIC
- DOCKERFILE_HADOLINT

VALIDATE_ALL_CODEBASE: true
FORMATTERS_DISABLE_ERRORS: false
Expand Down
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ARG vpipe_path
ARG envs_path
ARG test_data

# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
jdupes

Expand All @@ -42,11 +43,11 @@ COPY tests/data ${test_data}
WORKDIR /work

# configuration: activate all steps
RUN mkdir config
RUN echo 'output:\n snv: true\n local: true\n global: true\n visualization: true\n diversity: true\n QA: true' > config/config.yaml
RUN mkdir config \
&& printf 'output:\n snv: true\n local: true\n global: true\n visualization: true\n diversity: true\n QA: true\n upload: true\nupload:\n orig_cram: true' > config/config.yaml

# TODO harmonize list with CI tests and Docker tests
RUN for virus in ${virus_download_list:-$(ls ${test_data}/)}; do echo "\n\n\e[36;1mvirus: ${virus}\e[0m\n" \
RUN for virus in ${virus_download_list:-$(ls ${test_data}/)}; do printf '\n\n\e[36;1mvirus: %s\e[0m\n' "${virus}" \
&& ln -sf "${test_data}/${virus}/" ./samples \
&& if test -e samples/samples.tsv; then cp -f samples/samples.tsv ./config/samples.tsv; fi \
&& PYTHONUNBUFFERED=1 snakemake -s ${vpipe_path}/workflow/Snakefile -j 1 --conda-create-envs-only --use-conda --conda-prefix ${envs_path} --config "general={virus_base_config: ${virus}}" \
Expand All @@ -62,6 +63,7 @@ FROM snakemake/snakemake:${snaketag} AS vpipe-tests-base
ARG install_path

# NOTE rsync only used with local scratch
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
rsync \
&& apt-get clean \
Expand All @@ -83,8 +85,8 @@ ARG test_data
ENV virus=hiv

WORKDIR /work
RUN mkdir config
RUN echo 'output:\n snv: true\n local: true\n global: false\n visualization: true\n diversity: true\n QA: true' > config/config.yaml
RUN mkdir config \
&& printf 'output:\n snv: true\n local: true\n global: false\n visualization: true\n diversity: true\n QA: true\n upload: true\nupload:\n orig_cram: true' > config/config.yaml
COPY --from=create-envs ${test_data}/${virus} ./samples
RUN if test -e samples/samples.tsv; then cp -f samples/samples.tsv ./config/samples.tsv; fi
# NOTE see top comment if `--network=none` breaks build process
Expand All @@ -105,8 +107,8 @@ ARG test_data
ENV virus=sars-cov-2

WORKDIR /work
RUN mkdir config
RUN echo 'output:\n snv: true\n local: true\n global: false\n visualization: true\n diversity: true\n QA: true' > config/config.yaml
RUN mkdir config \
&& printf 'output:\n snv: true\n local: true\n global: false\n visualization: true\n diversity: true\n QA: true\n upload: true\nupload:\n orig_cram: true' > config/config.yaml
COPY --from=create-envs ${test_data}/${virus} ./samples
RUN if test -e samples/samples.tsv; then cp -f samples/samples.tsv ./config/samples.tsv; fi
# NOTE see top comment if `--network=none` breaks build process
Expand Down Expand Up @@ -145,6 +147,7 @@ ARG install_path
ARG vpipe_path
ARG envs_path

# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
rsync \
&& apt-get clean \
Expand All @@ -153,7 +156,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY --from=vpipe-final-base ${install_path} ${install_path}
# =============================================

MAINTAINER V-pipe Dev Team <[email protected]>
LABEL maintainer="V-pipe Dev Team <[email protected]>"
VOLUME /work
WORKDIR /work

Expand Down
78 changes: 51 additions & 27 deletions config/config.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/regression_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ output:
visualization: true
diversity: true
QA: true
upload: true

upload:
orig_cram: true

snv:
threads: ${THREADS}
Expand Down
4 changes: 3 additions & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ rule allfastqc:
fastqc_files,


include: "rules/clean.smk"
include: "rules/quality_assurance.smk"
include: "rules/align.smk"
include: "rules/consensus.smk"
include: "rules/mafs.smk"
include: "rules/stats.smk"
include: "rules/publish.smk"
include: "rules/dehuman.smk"
include: "rules/clean.smk"


if config.output["snv"] or config.output["local"]:
Expand Down
9 changes: 9 additions & 0 deletions workflow/envs/dehuman.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bwa=0.7.17
- samtools>1.11
- xxhash
- coreutils # [not linux]
7 changes: 7 additions & 0 deletions workflow/envs/upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- xxhash
- coreutils # [not linux]
Loading