From f46ec833ed56c39820c0a0e8d8e0295050a334ab Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:58:39 +0200 Subject: [PATCH 1/7] fix: pangolin data updates (#662) * restructure data download * fmt * change name * change name of rule * remove old rules * change input name --- workflow/rules/ref.smk | 27 +++++---------------------- workflow/rules/strain_calling.smk | 7 ++----- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/workflow/rules/ref.smk b/workflow/rules/ref.smk index 6c0131c8..31fa8502 100644 --- a/workflow/rules/ref.smk +++ b/workflow/rules/ref.smk @@ -191,32 +191,15 @@ rule get_human_genome: "curl -SL -o {output} {params.human_genome} 2> {log}" -rule update_pangoLEARN: +rule get_pangolin_data: output: - directory("results/{date}/pangolin/pangoLEARN"), + "results/{date}/pangolin/pangolin-data.log", log: - "logs/{date}/pangolin/update.log", + "logs/{date}/pangolin/pangolin-data.log", conda: - "../envs/unix.yaml" - shell: - "(mkdir -p {output} &&" - " curl -L https://github.com/cov-lineages/pangoLEARN/archive/master.tar.gz |" - " tar xvz --strip-components=1 -C {output})" - " > {log} 2>&1" - - -rule update_lineages: - output: - directory("results/{date}/pangolin/lineages"), - log: - "logs/{date}/pangolin/update.log", - conda: - "../envs/unix.yaml" + "../envs/pangolin.yaml" shell: - "(mkdir -p {output} &&" - " curl -L https://github.com/cov-lineages/lineages/archive/master.tar.gz | " - " tar xvz --strip-components=1 -C {output})" - " > {log} 2>&1" + "pangolin --update-data > {log} 2>&1 && cp {log} {output}" rule get_gisaid_provision: diff --git a/workflow/rules/strain_calling.smk b/workflow/rules/strain_calling.smk index 0d86db0a..88d8a603 100644 --- a/workflow/rules/strain_calling.smk +++ b/workflow/rules/strain_calling.smk @@ -141,19 +141,16 @@ rule kallisto_plot_all_strains: rule pangolin_call_strains: input: contigs=get_pangolin_input, - pangoLEARN="results/{date}/pangolin/pangoLEARN", - lineages="results/{date}/pangolin/lineages", + data="results/{date}/pangolin/pangolin-data.log", output: "results/{date}/tables/strain-calls/{sample}.{stage}.strains.pangolin.csv", log: "logs/{date}/pangolin/{sample}.{stage}.log", - params: - pango_data_path=lambda w, input: os.path.dirname(input.pangoLEARN), conda: "../envs/pangolin.yaml" threads: 8 shell: - "pangolin {input.contigs} --data {params.pango_data_path} --outfile {output} > {log} 2>&1" + "pangolin {input.contigs} --outfile {output} > {log} 2>&1" rule pangolin_plot_all_strains: From f77d42e2154a95b6ca0e2c127df8ca134eda1789 Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:18:01 +0200 Subject: [PATCH 2/7] feat: FLiRT Mutations column (#664) * init * fmt * add to other config.yaml and template files * add def * add to env output * fmt --- .tests/config/config.yaml | 6 +++++ config/config.yaml | 14 +++++++---- resources/report-table-formatter.js | 3 +++ workflow/rules/generate_output.smk | 26 +++++++++++++-------- workflow/schemas/config.schema.yaml | 4 ++++ workflow/scripts/generate-overview-table.py | 6 ++++- 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/.tests/config/config.yaml b/.tests/config/config.yaml index 25a8ea6f..5a278a36 100644 --- a/.tests/config/config.yaml +++ b/.tests/config/config.yaml @@ -166,6 +166,12 @@ mixtures: - "_MIX_B-1-1-7_PERC_90_MIX_B-1-351_PERC_10" # mutations to be highlighted (protein name -> variants) + +flirt: + S: + - F456L + - R346T + mth: S: - N501Y diff --git a/config/config.yaml b/config/config.yaml index 898b305a..84b0886f 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -21,7 +21,7 @@ data-handling: # flag for archiving data # True: data is archived in path defined below # False: data is not archived - archive-data: True + archive-data: False # path of incoming data, which is moved to the # data directory by the preprocessing script incoming: ../incoming/ @@ -34,7 +34,7 @@ data-handling: quality-criteria: illumina: # minimal length of acceptable reads - min-length-reads: 30 + min-length-reads: 100 # average quality of acceptable reads (PHRED) min-PHRED: 20 ont: @@ -61,9 +61,9 @@ preprocessing: # ARTIC primer version to clip from reads. See # https://github.com/artic-network/artic-ncov2019/tree/master/primer_schemes/nCoV-2019/V4 # for more information - artic-primer-version: 3 + artic-primer-version: 4 # path to amplicon primers in bed format for hard-clipping on paired end files (illumina) or url to file that should be downloaded - amplicon-primers: "resources/nCoV-2019.primer.bed" + amplicon-primers: "resources/SARS-CoV-2-artic-v4_1.primer.bed" # GenBank accession of reference sequence of the amplicon primers amplicon-reference: "MN908947" @@ -124,6 +124,12 @@ strain-calling: B.1.617.2: OK091006 # mutations to be highlighted (protein name -> variants) + +flirt: + S: + - F456L + - R346T + mth: S: - L18F diff --git a/resources/report-table-formatter.js b/resources/report-table-formatter.js index ab07f158..c2d1a13d 100644 --- a/resources/report-table-formatter.js +++ b/resources/report-table-formatter.js @@ -91,6 +91,9 @@ } }, + "FLiRT Mutations": function format(value) { + return this["variant helper"](value, true); + }, "VOC Mutations": function format(value) { return this["variant helper"](value, true); }, diff --git a/workflow/rules/generate_output.smk b/workflow/rules/generate_output.smk index 11899c10..c272e783 100644 --- a/workflow/rules/generate_output.smk +++ b/workflow/rules/generate_output.smk @@ -153,6 +153,7 @@ rule overview_table_patient_csv: wildcards, "all samples" ), mth=config.get("mth"), + flirt=config.get("flirt"), samples=lambda wildcards: get_samples_for_date(wildcards.date), mode=config["mode"], log: @@ -178,6 +179,7 @@ use rule overview_table_patient_csv as overview_table_environment_csv with: qc_data="results/{date}/tables/environment-overview.csv", params: mth=config.get("mth"), + flirt=config.get("flirt"), samples=lambda wildcards: get_samples_for_date(wildcards.date), mode=config["mode"], log: @@ -371,6 +373,7 @@ rule snakemake_reports_patient: expand_samples_for_date( ["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"] ), + # lambda wildcards: "results/{date}/lineage-variant-report/all", lambda wildcards: expand( "results/{{date}}/vcf-report/{target}.{filter}.{annotation}", target=get_samples_for_date(wildcards.date) + ["all"], @@ -380,10 +383,10 @@ rule snakemake_reports_patient: # 3. Sequencing Details "results/{date}/qc/laboratory/multiqc.html", "results/{date}/plots/coverage-reference-genome.png", - "results/{date}/plots/coverage-assembled-genome.png", - lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg" - if any_sample_is_amplicon(wildcards) - else [], + # "results/{date}/plots/coverage-assembled-genome.png", + # lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg" + # if any_sample_is_amplicon(wildcards) + # else [], # 4. Assembly "results/{date}/filter-overview", "results/{date}/pangolin-call-overview", @@ -406,8 +409,6 @@ rule snakemake_reports_patient: "results/patient-reports/{date}.zip", params: for_testing=get_if_testing("--snakefile ../workflow/Snakefile"), - conda: - "../envs/snakemake.yaml" log: "logs/snakemake_reports/{date}.log", shell: @@ -423,10 +424,10 @@ use rule snakemake_reports_patient as snakemake_reports_environment with: "results/{{date}}/{execution_mode}/overview/", execution_mode=get_checked_mode(), ), - "results/{date}/plots/all.major-strain.strains.kallisto.svg", - expand_samples_for_date( - ["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"] - ), + # "results/{date}/plots/all.major-strain.strains.kallisto.svg", + # expand_samples_for_date( + # ["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"] + # ), # 2. Variant Call Details expand_samples_for_date( ["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"] @@ -444,3 +445,8 @@ use rule snakemake_reports_patient as snakemake_reports_environment with: "results/environment-reports/{date}.zip", log: "logs/snakemake_reports/{date}.log", + + +# rule output_sample_sheet: +# input: +# Path(pep.config_file()).parent / pep.config()["sample_table"], diff --git a/workflow/schemas/config.schema.yaml b/workflow/schemas/config.schema.yaml index d4d49881..2ae788b7 100644 --- a/workflow/schemas/config.schema.yaml +++ b/workflow/schemas/config.schema.yaml @@ -115,6 +115,9 @@ properties: description: flag for using gisaid or genbank lineage-references: type: object + flirt: + type: object + description: mutations to be highlighted (protein name -> variants) mth: type: object description: mutations to be highlighted (protein name -> variants) @@ -130,4 +133,5 @@ required: - assembly - variant-calling - strain-calling + - flirt - mth diff --git a/workflow/scripts/generate-overview-table.py b/workflow/scripts/generate-overview-table.py index 9afd487b..aebe14c6 100644 --- a/workflow/scripts/generate-overview-table.py +++ b/workflow/scripts/generate-overview-table.py @@ -193,6 +193,7 @@ def register_contig_lengths(assemblies, name): } for sample, file in iter_with_samples(snakemake.input.bcf): + flirt_mutations = {} mutations_of_interest = {} other_mutations = {} @@ -228,11 +229,14 @@ def fmt_variants(variants): hgvsp = f"{feature}:{alteration}" entry = (hgvsp, f"{vaf:.3f}") - if alteration in snakemake.params.mth.get(feature, {}): + if alteration in snakemake.params.flirt.get(feature, {}): + insert_entry(flirt_mutations, hgvsp, vaf) + elif alteration in snakemake.params.mth.get(feature, {}): insert_entry(mutations_of_interest, hgvsp, vaf) else: insert_entry(other_mutations, hgvsp, vaf) + data.loc[sample, "FLiRT Mutations"] = fmt_variants(flirt_mutations) data.loc[sample, "VOC Mutations"] = fmt_variants(mutations_of_interest) data.loc[sample, "Other Mutations"] = fmt_variants(other_mutations) From 5c5a108acbb8131c1f036ba6ba4eb3b9a7433205 Mon Sep 17 00:00:00 2001 From: vBassewitz <104062464+vBassewitz@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:22:22 +0200 Subject: [PATCH 3/7] Revert "feat: FLiRT Mutations column (#664)" (#667) This reverts commit f77d42e2154a95b6ca0e2c127df8ca134eda1789. --- .tests/config/config.yaml | 6 ----- config/config.yaml | 14 ++++------- resources/report-table-formatter.js | 3 --- workflow/rules/generate_output.smk | 26 ++++++++------------- workflow/schemas/config.schema.yaml | 4 ---- workflow/scripts/generate-overview-table.py | 6 +---- 6 files changed, 15 insertions(+), 44 deletions(-) diff --git a/.tests/config/config.yaml b/.tests/config/config.yaml index 5a278a36..25a8ea6f 100644 --- a/.tests/config/config.yaml +++ b/.tests/config/config.yaml @@ -166,12 +166,6 @@ mixtures: - "_MIX_B-1-1-7_PERC_90_MIX_B-1-351_PERC_10" # mutations to be highlighted (protein name -> variants) - -flirt: - S: - - F456L - - R346T - mth: S: - N501Y diff --git a/config/config.yaml b/config/config.yaml index 84b0886f..898b305a 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -21,7 +21,7 @@ data-handling: # flag for archiving data # True: data is archived in path defined below # False: data is not archived - archive-data: False + archive-data: True # path of incoming data, which is moved to the # data directory by the preprocessing script incoming: ../incoming/ @@ -34,7 +34,7 @@ data-handling: quality-criteria: illumina: # minimal length of acceptable reads - min-length-reads: 100 + min-length-reads: 30 # average quality of acceptable reads (PHRED) min-PHRED: 20 ont: @@ -61,9 +61,9 @@ preprocessing: # ARTIC primer version to clip from reads. See # https://github.com/artic-network/artic-ncov2019/tree/master/primer_schemes/nCoV-2019/V4 # for more information - artic-primer-version: 4 + artic-primer-version: 3 # path to amplicon primers in bed format for hard-clipping on paired end files (illumina) or url to file that should be downloaded - amplicon-primers: "resources/SARS-CoV-2-artic-v4_1.primer.bed" + amplicon-primers: "resources/nCoV-2019.primer.bed" # GenBank accession of reference sequence of the amplicon primers amplicon-reference: "MN908947" @@ -124,12 +124,6 @@ strain-calling: B.1.617.2: OK091006 # mutations to be highlighted (protein name -> variants) - -flirt: - S: - - F456L - - R346T - mth: S: - L18F diff --git a/resources/report-table-formatter.js b/resources/report-table-formatter.js index c2d1a13d..ab07f158 100644 --- a/resources/report-table-formatter.js +++ b/resources/report-table-formatter.js @@ -91,9 +91,6 @@ } }, - "FLiRT Mutations": function format(value) { - return this["variant helper"](value, true); - }, "VOC Mutations": function format(value) { return this["variant helper"](value, true); }, diff --git a/workflow/rules/generate_output.smk b/workflow/rules/generate_output.smk index c272e783..11899c10 100644 --- a/workflow/rules/generate_output.smk +++ b/workflow/rules/generate_output.smk @@ -153,7 +153,6 @@ rule overview_table_patient_csv: wildcards, "all samples" ), mth=config.get("mth"), - flirt=config.get("flirt"), samples=lambda wildcards: get_samples_for_date(wildcards.date), mode=config["mode"], log: @@ -179,7 +178,6 @@ use rule overview_table_patient_csv as overview_table_environment_csv with: qc_data="results/{date}/tables/environment-overview.csv", params: mth=config.get("mth"), - flirt=config.get("flirt"), samples=lambda wildcards: get_samples_for_date(wildcards.date), mode=config["mode"], log: @@ -373,7 +371,6 @@ rule snakemake_reports_patient: expand_samples_for_date( ["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"] ), - # lambda wildcards: "results/{date}/lineage-variant-report/all", lambda wildcards: expand( "results/{{date}}/vcf-report/{target}.{filter}.{annotation}", target=get_samples_for_date(wildcards.date) + ["all"], @@ -383,10 +380,10 @@ rule snakemake_reports_patient: # 3. Sequencing Details "results/{date}/qc/laboratory/multiqc.html", "results/{date}/plots/coverage-reference-genome.png", - # "results/{date}/plots/coverage-assembled-genome.png", - # lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg" - # if any_sample_is_amplicon(wildcards) - # else [], + "results/{date}/plots/coverage-assembled-genome.png", + lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg" + if any_sample_is_amplicon(wildcards) + else [], # 4. Assembly "results/{date}/filter-overview", "results/{date}/pangolin-call-overview", @@ -409,6 +406,8 @@ rule snakemake_reports_patient: "results/patient-reports/{date}.zip", params: for_testing=get_if_testing("--snakefile ../workflow/Snakefile"), + conda: + "../envs/snakemake.yaml" log: "logs/snakemake_reports/{date}.log", shell: @@ -424,10 +423,10 @@ use rule snakemake_reports_patient as snakemake_reports_environment with: "results/{{date}}/{execution_mode}/overview/", execution_mode=get_checked_mode(), ), - # "results/{date}/plots/all.major-strain.strains.kallisto.svg", - # expand_samples_for_date( - # ["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"] - # ), + "results/{date}/plots/all.major-strain.strains.kallisto.svg", + expand_samples_for_date( + ["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"] + ), # 2. Variant Call Details expand_samples_for_date( ["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"] @@ -445,8 +444,3 @@ use rule snakemake_reports_patient as snakemake_reports_environment with: "results/environment-reports/{date}.zip", log: "logs/snakemake_reports/{date}.log", - - -# rule output_sample_sheet: -# input: -# Path(pep.config_file()).parent / pep.config()["sample_table"], diff --git a/workflow/schemas/config.schema.yaml b/workflow/schemas/config.schema.yaml index 2ae788b7..d4d49881 100644 --- a/workflow/schemas/config.schema.yaml +++ b/workflow/schemas/config.schema.yaml @@ -115,9 +115,6 @@ properties: description: flag for using gisaid or genbank lineage-references: type: object - flirt: - type: object - description: mutations to be highlighted (protein name -> variants) mth: type: object description: mutations to be highlighted (protein name -> variants) @@ -133,5 +130,4 @@ required: - assembly - variant-calling - strain-calling - - flirt - mth diff --git a/workflow/scripts/generate-overview-table.py b/workflow/scripts/generate-overview-table.py index aebe14c6..9afd487b 100644 --- a/workflow/scripts/generate-overview-table.py +++ b/workflow/scripts/generate-overview-table.py @@ -193,7 +193,6 @@ def register_contig_lengths(assemblies, name): } for sample, file in iter_with_samples(snakemake.input.bcf): - flirt_mutations = {} mutations_of_interest = {} other_mutations = {} @@ -229,14 +228,11 @@ def fmt_variants(variants): hgvsp = f"{feature}:{alteration}" entry = (hgvsp, f"{vaf:.3f}") - if alteration in snakemake.params.flirt.get(feature, {}): - insert_entry(flirt_mutations, hgvsp, vaf) - elif alteration in snakemake.params.mth.get(feature, {}): + if alteration in snakemake.params.mth.get(feature, {}): insert_entry(mutations_of_interest, hgvsp, vaf) else: insert_entry(other_mutations, hgvsp, vaf) - data.loc[sample, "FLiRT Mutations"] = fmt_variants(flirt_mutations) data.loc[sample, "VOC Mutations"] = fmt_variants(mutations_of_interest) data.loc[sample, "Other Mutations"] = fmt_variants(other_mutations) From b8c5c449f81ba9c08bcdb68a099318eca1e64066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Thu, 17 Oct 2024 18:31:12 +0200 Subject: [PATCH 4/7] chore: checkout full history for formatting (#668) * chore: checkout full history for formatting * force latest pangolin * work around pangolin dependency issues * Update spades.yaml --------- Co-authored-by: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Co-authored-by: Alex Thomas --- .github/workflows/main.yml | 2 ++ workflow/envs/pangolin.yaml | 1 + workflow/envs/spades.yaml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 51391772..fe93b6a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + depth: 0 - name: Formatting uses: super-linter/super-linter@v5.7.2 env: diff --git a/workflow/envs/pangolin.yaml b/workflow/envs/pangolin.yaml index f6a26ad4..42265aca 100644 --- a/workflow/envs/pangolin.yaml +++ b/workflow/envs/pangolin.yaml @@ -4,3 +4,4 @@ channels: - nodefaults dependencies: - pangolin =4.3 + - snakemake-minimal=7.24.0 # TODO keep until https://github.com/bioconda/bioconda-recipes/pull/42192 and we can pin to 4.3.1 above diff --git a/workflow/envs/spades.yaml b/workflow/envs/spades.yaml index d88fde2c..32c7a4d3 100644 --- a/workflow/envs/spades.yaml +++ b/workflow/envs/spades.yaml @@ -3,4 +3,4 @@ channels: - bioconda - nodefaults dependencies: - - spades =3.15 + - spades =4.0 From 576329c0b82ebe5784fb5cdd845f77ee8834a84d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:46:51 +0200 Subject: [PATCH 5/7] chore(deps): bump peter-evans/create-pull-request from 6 to 7 (#666) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Thomas <77535027+alethomas@users.noreply.github.com> --- .github/workflows/copyright-preamble.yml | 2 +- .github/workflows/update-pangolin.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copyright-preamble.yml b/.github/workflows/copyright-preamble.yml index dbf88af6..81d5f573 100644 --- a/.github/workflows/copyright-preamble.yml +++ b/.github/workflows/copyright-preamble.yml @@ -25,7 +25,7 @@ jobs: # Creates pull request with all changes in file - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: commit-message: "chore: update copyright preamble" delete-branch: true diff --git a/.github/workflows/update-pangolin.yaml b/.github/workflows/update-pangolin.yaml index 1945cc86..7e7021c0 100644 --- a/.github/workflows/update-pangolin.yaml +++ b/.github/workflows/update-pangolin.yaml @@ -37,7 +37,7 @@ jobs: - name: Create Pull Request if: ${{ env.LATEST_PANGOLIN != env.CURRENT_PANGOLIN }} id: cpr - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} committer: GitHub From 9cb1576a8c41c23344940f2248e5d44464a53b2e Mon Sep 17 00:00:00 2001 From: Hamdiye Uzuner Date: Wed, 23 Oct 2024 14:00:37 +0200 Subject: [PATCH 6/7] fix: move primer file location under workflow; this avoids file not being found in shared filesystems (#665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: move nCoV-2019.primer.bed under workflow/resources * fix: fix path of primers in main config * fix: fix primer path to be called internally * fix: fix same in previous commit in read_clipping.smk * define a function for getting kracken input in common.smk * fix get_kracken_input() * use get_kracken_input in qc.smk * restore all changes * refactor: move checking the primer file for URL into the script * chore: fmt * fix: disable formatting temporarily * Update main.yml * Update main.yml * fmt script * add missing key to artifact name --------- Co-authored-by: Johannes Köster --- .github/workflows/main.yml | 6 +- workflow/resources/nCoV-2019.primer.bed | 218 ++++++++++++++++++++++++ workflow/rules/common.smk | 32 ++-- workflow/rules/generate_output.smk | 8 +- workflow/rules/read_clipping.smk | 2 +- workflow/rules/ref.smk | 8 +- workflow/rules/variant_calling.smk | 8 +- workflow/scripts/bed-to-bedpe.py | 18 +- 8 files changed, 273 insertions(+), 27 deletions(-) create mode 100644 workflow/resources/nCoV-2019.primer.bed diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe93b6a9..b2a96028 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - depth: 0 + fetch-depth: 0 - name: Formatting uses: super-linter/super-linter@v5.7.2 env: @@ -66,7 +66,6 @@ jobs: env: GISAID_API_TOKEN: ${{ secrets.GISAID_API_TOKEN }} needs: - - Formatting - Linting #- Pre-Commit strategy: @@ -181,7 +180,7 @@ jobs: uses: actions/upload-artifact@v4 if: matrix.technology == 'all' && matrix.rule != 'all -npr' with: - name: log-rule-${{ matrix.rule }}-technology-${{ matrix.technology }} + name: log-rule-${{ matrix.rule }}-technology-${{ matrix.technology }}-${{ matrix.seq_method }} path: .tests/logs/ - name: Change permissions for caching @@ -195,7 +194,6 @@ jobs: env: GISAID_API_TOKEN: ${{ secrets.GISAID_API_TOKEN }} needs: - - Formatting - Linting #- Pre-Commit strategy: diff --git a/workflow/resources/nCoV-2019.primer.bed b/workflow/resources/nCoV-2019.primer.bed new file mode 100644 index 00000000..76691de9 --- /dev/null +++ b/workflow/resources/nCoV-2019.primer.bed @@ -0,0 +1,218 @@ +MN908947.3 30 54 nCoV-2019_1_LEFT 1 + +MN908947.3 385 410 nCoV-2019_1_RIGHT 1 - +MN908947.3 320 342 nCoV-2019_2_LEFT 2 + +MN908947.3 704 726 nCoV-2019_2_RIGHT 2 - +MN908947.3 642 664 nCoV-2019_3_LEFT 1 + +MN908947.3 1004 1028 nCoV-2019_3_RIGHT 1 - +MN908947.3 943 965 nCoV-2019_4_LEFT 2 + +MN908947.3 1312 1337 nCoV-2019_4_RIGHT 2 - +MN908947.3 1242 1264 nCoV-2019_5_LEFT 1 + +MN908947.3 1623 1651 nCoV-2019_5_RIGHT 1 - +MN908947.3 1573 1595 nCoV-2019_6_LEFT 2 + +MN908947.3 1942 1964 nCoV-2019_6_RIGHT 2 - +MN908947.3 1875 1897 nCoV-2019_7_LEFT 1 + +MN908947.3 1868 1890 nCoV-2019_7_LEFT_alt0 1 + +MN908947.3 2247 2269 nCoV-2019_7_RIGHT 1 - +MN908947.3 2242 2264 nCoV-2019_7_RIGHT_alt5 1 - +MN908947.3 2181 2205 nCoV-2019_8_LEFT 2 + +MN908947.3 2568 2592 nCoV-2019_8_RIGHT 2 - +MN908947.3 2505 2529 nCoV-2019_9_LEFT 1 + +MN908947.3 2504 2528 nCoV-2019_9_LEFT_alt4 1 + +MN908947.3 2882 2904 nCoV-2019_9_RIGHT 1 - +MN908947.3 2880 2902 nCoV-2019_9_RIGHT_alt2 1 - +MN908947.3 2826 2850 nCoV-2019_10_LEFT 2 + +MN908947.3 3183 3210 nCoV-2019_10_RIGHT 2 - +MN908947.3 3144 3166 nCoV-2019_11_LEFT 1 + +MN908947.3 3507 3531 nCoV-2019_11_RIGHT 1 - +MN908947.3 3460 3482 nCoV-2019_12_LEFT 2 + +MN908947.3 3826 3853 nCoV-2019_12_RIGHT 2 - +MN908947.3 3771 3795 nCoV-2019_13_LEFT 1 + +MN908947.3 4142 4164 nCoV-2019_13_RIGHT 1 - +MN908947.3 4054 4077 nCoV-2019_14_LEFT 2 + +MN908947.3 4044 4068 nCoV-2019_14_LEFT_alt4 2 + +MN908947.3 4428 4450 nCoV-2019_14_RIGHT 2 - +MN908947.3 4402 4424 nCoV-2019_14_RIGHT_alt2 2 - +MN908947.3 4294 4321 nCoV-2019_15_LEFT 1 + +MN908947.3 4296 4322 nCoV-2019_15_LEFT_alt1 1 + +MN908947.3 4674 4696 nCoV-2019_15_RIGHT 1 - +MN908947.3 4666 4689 nCoV-2019_15_RIGHT_alt3 1 - +MN908947.3 4636 4658 nCoV-2019_16_LEFT 2 + +MN908947.3 4995 5017 nCoV-2019_16_RIGHT 2 - +MN908947.3 4939 4966 nCoV-2019_17_LEFT 1 + +MN908947.3 5296 5321 nCoV-2019_17_RIGHT 1 - +MN908947.3 5230 5259 nCoV-2019_18_LEFT 2 + +MN908947.3 5257 5287 nCoV-2019_18_LEFT_alt2 2 + +MN908947.3 5620 5644 nCoV-2019_18_RIGHT 2 - +MN908947.3 5620 5643 nCoV-2019_18_RIGHT_alt1 2 - +MN908947.3 5563 5586 nCoV-2019_19_LEFT 1 + +MN908947.3 5932 5957 nCoV-2019_19_RIGHT 1 - +MN908947.3 5867 5894 nCoV-2019_20_LEFT 2 + +MN908947.3 6247 6272 nCoV-2019_20_RIGHT 2 - +MN908947.3 6167 6196 nCoV-2019_21_LEFT 1 + +MN908947.3 6168 6197 nCoV-2019_21_LEFT_alt2 1 + +MN908947.3 6528 6550 nCoV-2019_21_RIGHT 1 - +MN908947.3 6526 6548 nCoV-2019_21_RIGHT_alt0 1 - +MN908947.3 6466 6495 nCoV-2019_22_LEFT 2 + +MN908947.3 6846 6873 nCoV-2019_22_RIGHT 2 - +MN908947.3 6718 6745 nCoV-2019_23_LEFT 1 + +MN908947.3 7092 7117 nCoV-2019_23_RIGHT 1 - +MN908947.3 7035 7058 nCoV-2019_24_LEFT 2 + +MN908947.3 7389 7415 nCoV-2019_24_RIGHT 2 - +MN908947.3 7305 7332 nCoV-2019_25_LEFT 1 + +MN908947.3 7671 7694 nCoV-2019_25_RIGHT 1 - +MN908947.3 7626 7651 nCoV-2019_26_LEFT 2 + +MN908947.3 7997 8019 nCoV-2019_26_RIGHT 2 - +MN908947.3 7943 7968 nCoV-2019_27_LEFT 1 + +MN908947.3 8319 8341 nCoV-2019_27_RIGHT 1 - +MN908947.3 8249 8275 nCoV-2019_28_LEFT 2 + +MN908947.3 8635 8661 nCoV-2019_28_RIGHT 2 - +MN908947.3 8595 8619 nCoV-2019_29_LEFT 1 + +MN908947.3 8954 8983 nCoV-2019_29_RIGHT 1 - +MN908947.3 8888 8913 nCoV-2019_30_LEFT 2 + +MN908947.3 9245 9271 nCoV-2019_30_RIGHT 2 - +MN908947.3 9204 9226 nCoV-2019_31_LEFT 1 + +MN908947.3 9557 9585 nCoV-2019_31_RIGHT 1 - +MN908947.3 9477 9502 nCoV-2019_32_LEFT 2 + +MN908947.3 9834 9858 nCoV-2019_32_RIGHT 2 - +MN908947.3 9784 9806 nCoV-2019_33_LEFT 1 + +MN908947.3 10146 10171 nCoV-2019_33_RIGHT 1 - +MN908947.3 10076 10099 nCoV-2019_34_LEFT 2 + +MN908947.3 10437 10459 nCoV-2019_34_RIGHT 2 - +MN908947.3 10362 10384 nCoV-2019_35_LEFT 1 + +MN908947.3 10737 10763 nCoV-2019_35_RIGHT 1 - +MN908947.3 10666 10688 nCoV-2019_36_LEFT 2 + +MN908947.3 11048 11074 nCoV-2019_36_RIGHT 2 - +MN908947.3 10999 11022 nCoV-2019_37_LEFT 1 + +MN908947.3 11372 11394 nCoV-2019_37_RIGHT 1 - +MN908947.3 11306 11331 nCoV-2019_38_LEFT 2 + +MN908947.3 11668 11693 nCoV-2019_38_RIGHT 2 - +MN908947.3 11555 11584 nCoV-2019_39_LEFT 1 + +MN908947.3 11927 11949 nCoV-2019_39_RIGHT 1 - +MN908947.3 11863 11889 nCoV-2019_40_LEFT 2 + +MN908947.3 12234 12256 nCoV-2019_40_RIGHT 2 - +MN908947.3 12110 12133 nCoV-2019_41_LEFT 1 + +MN908947.3 12465 12490 nCoV-2019_41_RIGHT 1 - +MN908947.3 12417 12439 nCoV-2019_42_LEFT 2 + +MN908947.3 12779 12802 nCoV-2019_42_RIGHT 2 - +MN908947.3 12710 12732 nCoV-2019_43_LEFT 1 + +MN908947.3 13074 13096 nCoV-2019_43_RIGHT 1 - +MN908947.3 13005 13027 nCoV-2019_44_LEFT 2 + +MN908947.3 13007 13029 nCoV-2019_44_LEFT_alt3 2 + +MN908947.3 13378 13400 nCoV-2019_44_RIGHT 2 - +MN908947.3 13363 13385 nCoV-2019_44_RIGHT_alt0 2 - +MN908947.3 13319 13344 nCoV-2019_45_LEFT 1 + +MN908947.3 13307 13336 nCoV-2019_45_LEFT_alt2 1 + +MN908947.3 13669 13699 nCoV-2019_45_RIGHT 1 - +MN908947.3 13660 13689 nCoV-2019_45_RIGHT_alt7 1 - +MN908947.3 13599 13621 nCoV-2019_46_LEFT 2 + +MN908947.3 13602 13625 nCoV-2019_46_LEFT_alt1 2 + +MN908947.3 13962 13984 nCoV-2019_46_RIGHT 2 - +MN908947.3 13961 13984 nCoV-2019_46_RIGHT_alt2 2 - +MN908947.3 13918 13946 nCoV-2019_47_LEFT 1 + +MN908947.3 14271 14299 nCoV-2019_47_RIGHT 1 - +MN908947.3 14207 14232 nCoV-2019_48_LEFT 2 + +MN908947.3 14579 14601 nCoV-2019_48_RIGHT 2 - +MN908947.3 14545 14570 nCoV-2019_49_LEFT 1 + +MN908947.3 14898 14926 nCoV-2019_49_RIGHT 1 - +MN908947.3 14865 14895 nCoV-2019_50_LEFT 2 + +MN908947.3 15224 15246 nCoV-2019_50_RIGHT 2 - +MN908947.3 15171 15193 nCoV-2019_51_LEFT 1 + +MN908947.3 15538 15560 nCoV-2019_51_RIGHT 1 - +MN908947.3 15481 15503 nCoV-2019_52_LEFT 2 + +MN908947.3 15861 15886 nCoV-2019_52_RIGHT 2 - +MN908947.3 15827 15851 nCoV-2019_53_LEFT 1 + +MN908947.3 16186 16209 nCoV-2019_53_RIGHT 1 - +MN908947.3 16118 16144 nCoV-2019_54_LEFT 2 + +MN908947.3 16485 16510 nCoV-2019_54_RIGHT 2 - +MN908947.3 16416 16444 nCoV-2019_55_LEFT 1 + +MN908947.3 16804 16833 nCoV-2019_55_RIGHT 1 - +MN908947.3 16748 16770 nCoV-2019_56_LEFT 2 + +MN908947.3 17130 17152 nCoV-2019_56_RIGHT 2 - +MN908947.3 17065 17087 nCoV-2019_57_LEFT 1 + +MN908947.3 17430 17452 nCoV-2019_57_RIGHT 1 - +MN908947.3 17381 17406 nCoV-2019_58_LEFT 2 + +MN908947.3 17738 17761 nCoV-2019_58_RIGHT 2 - +MN908947.3 17674 17697 nCoV-2019_59_LEFT 1 + +MN908947.3 18036 18062 nCoV-2019_59_RIGHT 1 - +MN908947.3 17966 17993 nCoV-2019_60_LEFT 2 + +MN908947.3 18324 18348 nCoV-2019_60_RIGHT 2 - +MN908947.3 18253 18275 nCoV-2019_61_LEFT 1 + +MN908947.3 18650 18672 nCoV-2019_61_RIGHT 1 - +MN908947.3 18596 18618 nCoV-2019_62_LEFT 2 + +MN908947.3 18957 18979 nCoV-2019_62_RIGHT 2 - +MN908947.3 18896 18918 nCoV-2019_63_LEFT 1 + +MN908947.3 19275 19297 nCoV-2019_63_RIGHT 1 - +MN908947.3 19204 19232 nCoV-2019_64_LEFT 2 + +MN908947.3 19591 19616 nCoV-2019_64_RIGHT 2 - +MN908947.3 19548 19570 nCoV-2019_65_LEFT 1 + +MN908947.3 19911 19939 nCoV-2019_65_RIGHT 1 - +MN908947.3 19844 19866 nCoV-2019_66_LEFT 2 + +MN908947.3 20231 20255 nCoV-2019_66_RIGHT 2 - +MN908947.3 20172 20200 nCoV-2019_67_LEFT 1 + +MN908947.3 20542 20572 nCoV-2019_67_RIGHT 1 - +MN908947.3 20472 20496 nCoV-2019_68_LEFT 2 + +MN908947.3 20867 20890 nCoV-2019_68_RIGHT 2 - +MN908947.3 20786 20813 nCoV-2019_69_LEFT 1 + +MN908947.3 21146 21169 nCoV-2019_69_RIGHT 1 - +MN908947.3 21075 21104 nCoV-2019_70_LEFT 2 + +MN908947.3 21427 21455 nCoV-2019_70_RIGHT 2 - +MN908947.3 21357 21386 nCoV-2019_71_LEFT 1 + +MN908947.3 21716 21743 nCoV-2019_71_RIGHT 1 - +MN908947.3 21658 21682 nCoV-2019_72_LEFT 2 + +MN908947.3 22013 22038 nCoV-2019_72_RIGHT 2 - +MN908947.3 21961 21990 nCoV-2019_73_LEFT 1 + +MN908947.3 22324 22346 nCoV-2019_73_RIGHT 1 - +MN908947.3 22262 22290 nCoV-2019_74_LEFT 2 + +MN908947.3 22626 22650 nCoV-2019_74_RIGHT 2 - +MN908947.3 22516 22542 nCoV-2019_75_LEFT 1 + +MN908947.3 22877 22903 nCoV-2019_75_RIGHT 1 - +MN908947.3 22797 22819 nCoV-2019_76_LEFT 2 + +MN908947.3 22798 22821 nCoV-2019_76_LEFT_alt3 2 + +MN908947.3 23192 23214 nCoV-2019_76_RIGHT 2 - +MN908947.3 23189 23212 nCoV-2019_76_RIGHT_alt0 2 - +MN908947.3 23122 23144 nCoV-2019_77_LEFT 1 + +MN908947.3 23500 23522 nCoV-2019_77_RIGHT 1 - +MN908947.3 23443 23466 nCoV-2019_78_LEFT 2 + +MN908947.3 23822 23847 nCoV-2019_78_RIGHT 2 - +MN908947.3 23789 23812 nCoV-2019_79_LEFT 1 + +MN908947.3 24145 24169 nCoV-2019_79_RIGHT 1 - +MN908947.3 24078 24100 nCoV-2019_80_LEFT 2 + +MN908947.3 24443 24467 nCoV-2019_80_RIGHT 2 - +MN908947.3 24391 24416 nCoV-2019_81_LEFT 1 + +MN908947.3 24765 24789 nCoV-2019_81_RIGHT 1 - +MN908947.3 24696 24721 nCoV-2019_82_LEFT 2 + +MN908947.3 25052 25076 nCoV-2019_82_RIGHT 2 - +MN908947.3 24978 25003 nCoV-2019_83_LEFT 1 + +MN908947.3 25347 25369 nCoV-2019_83_RIGHT 1 - +MN908947.3 25279 25301 nCoV-2019_84_LEFT 2 + +MN908947.3 25646 25673 nCoV-2019_84_RIGHT 2 - +MN908947.3 25601 25623 nCoV-2019_85_LEFT 1 + +MN908947.3 25969 25994 nCoV-2019_85_RIGHT 1 - +MN908947.3 25902 25924 nCoV-2019_86_LEFT 2 + +MN908947.3 26290 26315 nCoV-2019_86_RIGHT 2 - +MN908947.3 26197 26219 nCoV-2019_87_LEFT 1 + +MN908947.3 26566 26590 nCoV-2019_87_RIGHT 1 - +MN908947.3 26520 26542 nCoV-2019_88_LEFT 2 + +MN908947.3 26890 26913 nCoV-2019_88_RIGHT 2 - +MN908947.3 26835 26857 nCoV-2019_89_LEFT 1 + +MN908947.3 26838 26860 nCoV-2019_89_LEFT_alt2 1 + +MN908947.3 27202 27227 nCoV-2019_89_RIGHT 1 - +MN908947.3 27190 27215 nCoV-2019_89_RIGHT_alt4 1 - +MN908947.3 27141 27164 nCoV-2019_90_LEFT 2 + +MN908947.3 27511 27533 nCoV-2019_90_RIGHT 2 - +MN908947.3 27446 27471 nCoV-2019_91_LEFT 1 + +MN908947.3 27825 27854 nCoV-2019_91_RIGHT 1 - +MN908947.3 27784 27808 nCoV-2019_92_LEFT 2 + +MN908947.3 28145 28172 nCoV-2019_92_RIGHT 2 - +MN908947.3 28081 28104 nCoV-2019_93_LEFT 1 + +MN908947.3 28442 28464 nCoV-2019_93_RIGHT 1 - +MN908947.3 28394 28416 nCoV-2019_94_LEFT 2 + +MN908947.3 28756 28779 nCoV-2019_94_RIGHT 2 - +MN908947.3 28677 28699 nCoV-2019_95_LEFT 1 + +MN908947.3 29041 29063 nCoV-2019_95_RIGHT 1 - +MN908947.3 28985 29007 nCoV-2019_96_LEFT 2 + +MN908947.3 29356 29378 nCoV-2019_96_RIGHT 2 - +MN908947.3 29288 29316 nCoV-2019_97_LEFT 1 + +MN908947.3 29665 29693 nCoV-2019_97_RIGHT 1 - +MN908947.3 29486 29510 nCoV-2019_98_LEFT 2 + +MN908947.3 29836 29866 nCoV-2019_98_RIGHT 2 - diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index fcaeb24b..3edfbe99 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -355,9 +355,11 @@ def get_non_cov2_calls(from_caller="pangolin"): pattern = ( "results/benchmarking/tables/strain-calls/non-cov2-{accession}.polished.strains.pangolin.csv" if from_caller == "pangolin" - else "results/benchmarking/tables/strain-calls/non-cov2-{accession}.strains.kallisto.tsv" - if from_caller == "kallisto" - else [] + else ( + "results/benchmarking/tables/strain-calls/non-cov2-{accession}.strains.kallisto.tsv" + if from_caller == "kallisto" + else [] + ) ) if not pattern: @@ -1113,18 +1115,22 @@ def get_fallbacks_for_report(fallback_type): if fallback_type == "pseudo": path = "results/{{date}}/contigs/pseudoassembled/{sample}.fasta" return [ - path.format(sample=sample) - if has_pseudo_assembly(None, sample) - else "resources/genomes/main.fasta" + ( + path.format(sample=sample) + if has_pseudo_assembly(None, sample) + else "resources/genomes/main.fasta" + ) for sample in get_samples_for_date(wildcards.date) ] elif fallback_type == "consensus": path = "results/{{date}}/contigs/masked/consensus/{sample}.fasta" return [ - path.format(sample=sample) - if has_consensus_assembly(None, sample) - else "resources/genomes/main.fasta" + ( + path.format(sample=sample) + if has_consensus_assembly(None, sample) + else "resources/genomes/main.fasta" + ) for sample in samples ] @@ -1390,9 +1396,11 @@ def get_kallisto_quant_extra(wildcards, input): return get_if_testing("--single --fragment-length 250 --sd 47301") return ( - f"--single --fragment-length {get_first_line(input.fragment_length)} --sd {get_first_line(input.standard_deviation)}" - if is_single_end(wildcards) - else "", + ( + f"--single --fragment-length {get_first_line(input.fragment_length)} --sd {get_first_line(input.standard_deviation)}" + if is_single_end(wildcards) + else "" + ), ) diff --git a/workflow/rules/generate_output.smk b/workflow/rules/generate_output.smk index 11899c10..e6286372 100644 --- a/workflow/rules/generate_output.smk +++ b/workflow/rules/generate_output.smk @@ -381,9 +381,11 @@ rule snakemake_reports_patient: "results/{date}/qc/laboratory/multiqc.html", "results/{date}/plots/coverage-reference-genome.png", "results/{date}/plots/coverage-assembled-genome.png", - lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg" - if any_sample_is_amplicon(wildcards) - else [], + lambda wildcards: ( + "results/{date}/plots/primer-clipping-intervals.svg" + if any_sample_is_amplicon(wildcards) + else [] + ), # 4. Assembly "results/{date}/filter-overview", "results/{date}/pangolin-call-overview", diff --git a/workflow/rules/read_clipping.smk b/workflow/rules/read_clipping.smk index 8d93acc7..bc41c220 100644 --- a/workflow/rules/read_clipping.smk +++ b/workflow/rules/read_clipping.smk @@ -22,7 +22,7 @@ rule samtools_sort: rule bed_to_bedpe: input: - check_bed_for_URL(config["preprocessing"]["amplicon-primers"]), + config["preprocessing"]["amplicon-primers"], output: "resources/primer.bedpe", log: diff --git a/workflow/rules/ref.smk b/workflow/rules/ref.smk index 31fa8502..1458b6ec 100644 --- a/workflow/rules/ref.smk +++ b/workflow/rules/ref.smk @@ -20,9 +20,11 @@ rule get_genome: "resources/genomes/{accession}.fasta", params: accession=( - lambda w: config["virus-reference-genome"] - if w.accession == "main" - else w.accession + lambda w: ( + config["virus-reference-genome"] + if w.accession == "main" + else w.accession + ) ), log: "logs/genomes/get-genome/{accession}.log", diff --git a/workflow/rules/variant_calling.smk b/workflow/rules/variant_calling.smk index 8682bc98..fdd358c1 100644 --- a/workflow/rules/variant_calling.smk +++ b/workflow/rules/variant_calling.smk @@ -75,9 +75,11 @@ rule longshot: "results/{date}/candidate-calls/ref~{reference}/{sample}.homopolymer-longshot.vcf" ), params: - reference_name=lambda w: config["virus-reference-genome"] - if w.reference == "main" - else f"{w.reference}.1", + reference_name=lambda w: ( + config["virus-reference-genome"] + if w.reference == "main" + else f"{w.reference}.1" + ), log: "logs/{date}/longshot/ref~{reference}/{sample}.log", conda: diff --git a/workflow/scripts/bed-to-bedpe.py b/workflow/scripts/bed-to-bedpe.py index 4a3b343d..2f5e707f 100644 --- a/workflow/scripts/bed-to-bedpe.py +++ b/workflow/scripts/bed-to-bedpe.py @@ -4,10 +4,26 @@ # except according to those terms. import pandas as pd +import urllib.request + + +# Function to check bed for url +def check_bed_for_URL(bed_file): + if "https" in bed_file: + filename = bed_file.split("/")[-1] + filepath = "resources/{}".format(filename) + urllib.request.urlretrieve(bed_file, filepath) + return filepath + else: + return bed_file + + +# Check bed file for URL +bed_file = check_bed_for_URL(snakemake.input[0]) # Function to create a bedpe file from a bed file bed_list = [] -with open(snakemake.input[0]) as f: +with open(bed_file) as f: line = f.readlines() for name in line: bed_list.append(name.split()) From 3b81486692d71c19a287961b59b10419995e05e7 Mon Sep 17 00:00:00 2001 From: Hamdiye Uzuner Date: Wed, 30 Oct 2024 08:59:32 +0100 Subject: [PATCH 7/7] fix log not being found by the system (#671) --- workflow/rules/read_clipping.smk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflow/rules/read_clipping.smk b/workflow/rules/read_clipping.smk index bc41c220..9c693e82 100644 --- a/workflow/rules/read_clipping.smk +++ b/workflow/rules/read_clipping.smk @@ -44,7 +44,6 @@ rule bamclipper: ), params: output_dir=get_output_dir, - cwd=lambda w: os.getcwd(), bed_path=lambda w, input: os.path.join(os.getcwd(), input.bedpe), bam=lambda w, input: os.path.basename(input.bam), log: @@ -57,7 +56,7 @@ rule bamclipper: " cp {input.bai} {params.output_dir} &&" " cd {params.output_dir} &&" " bamclipper.sh -b {params.bam} -p {params.bed_path} -n {threads} -u 5 -d 5) " - " > {params.cwd}/{log} 2>&1" + " > {log} 2>&1" rule fgbio: