From 34a54e194e3440f550d5c02a14392f12e1b30c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Fri, 4 Aug 2023 10:49:16 +0200 Subject: [PATCH 01/10] fix: increase max read depth --- config/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index c7f2c1a..1cc0a2e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -48,9 +48,9 @@ params: # which might be misleading because all reads of an amplicon have the same start # position, strand etc. (--omit-strand-bias, --omit-read-position-bias, # --omit-softclip-bias, --omit-read-orientation-bias). - call: "" + call: "--omit-read-position-bias" # Add extra arguments for varlociraptor preprocess. By default, we limit the depth to 200. # Increase this value for panel sequencing! - preprocess: "--max-depth 200" + preprocess: "--max-depth 30000" freebayes: min_alternate_fraction: 0.01 # Reduce for calling variants with lower VAFs From 8ec48657cf06de8679534496041b95307e3d7876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Mon, 7 Aug 2023 14:42:41 +0200 Subject: [PATCH 02/10] update release --- workflow/Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 693f911..c32a5e2 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -6,7 +6,7 @@ module dna_seq_varlociraptor: github( "snakemake-workflows/dna-seq-varlociraptor", path="workflow/Snakefile", - tag="v4.0.1", + tag="v4.1.0", ) config: config From dbece4e7228a545b9a60efa9c195a538a34d4583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Mon, 7 Aug 2023 15:10:07 +0200 Subject: [PATCH 03/10] update github action --- .github/workflows/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ded511d..bf7078c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Lint workflow - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: . snakefile: workflow/Snakefile @@ -40,42 +40,46 @@ jobs: - uses: actions/checkout@v2 - name: Test workflow (tumor/normal) - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: .test snakefile: workflow/Snakefile args: "--configfile .test/config-tumor_normal/config.yaml --use-conda --show-failed-logs --cores 3 --conda-cleanup-pkgs cache" + show-disk-usage-on-error: true - name: Test report - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: .test snakefile: workflow/Snakefile args: "--configfile .test/config-tumor_normal/config.yaml --report report.zip" - name: Test workflow (tumor/normal, ffpe) - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: .test snakefile: workflow/Snakefile args: "--configfile .test/config-tumor_normal_ffpe/config.yaml --use-conda --show-failed-logs --cores 3 --conda-cleanup-pkgs cache --all-temp" stagein: | rm -rf .test/results + show-disk-usage-on-error: true - name: Test workflow (tumor only) - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: .test snakefile: workflow/Snakefile args: "--configfile .test/config-tumor_only/config.yaml --use-conda --show-failed-logs --cores 3 --conda-cleanup-pkgs cache --all-temp" stagein: | rm -rf .test/results + show-disk-usage-on-error: true - name: Test workflow (tumor only, ffpe) - uses: snakemake/snakemake-github-action@v1.24.0 + uses: snakemake/snakemake-github-action@v1.25.0 with: directory: .test snakefile: workflow/Snakefile args: "--configfile .test/config-tumor_only_ffpe/config.yaml --use-conda --show-failed-logs --cores 3 --conda-cleanup-pkgs cache --all-temp" stagein: | - rm -rf .test/results \ No newline at end of file + rm -rf .test/results + show-disk-usage-on-error: true \ No newline at end of file From 1a0a08e5172c1821f64e71c23fa0112b1f3c0de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Mon, 28 Aug 2023 08:41:05 +0200 Subject: [PATCH 04/10] Update Snakefile --- workflow/Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index c32a5e2..a4ba47b 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -6,7 +6,7 @@ module dna_seq_varlociraptor: github( "snakemake-workflows/dna-seq-varlociraptor", path="workflow/Snakefile", - tag="v4.1.0", + tag="v5.0.1", ) config: config From c447e75893d750bb77ae6d857dd3fe60fc6cfefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Thu, 21 Sep 2023 07:40:26 +0200 Subject: [PATCH 05/10] minor changes --- workflow/resources/config/default.yaml | 24 +++++++++++++++++------- workflow/resources/config/scenario.yaml | 4 ++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/workflow/resources/config/default.yaml b/workflow/resources/config/default.yaml index 5119e32..49b465b 100644 --- a/workflow/resources/config/default.yaml +++ b/workflow/resources/config/default.yaml @@ -29,7 +29,7 @@ ref: # Ensembl species name species: homo_sapiens # Ensembl release - release: 109 + release: 110 # Genome build build: GRCh38 @@ -377,12 +377,22 @@ annotations: vep: # Consider removing --everything if VEP is slow for you (e.g. for WGS), # and think carefully about which annotations you need. - params: --everything --check_existing - plugins: - # Add any plugin from https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html - # Plugin args can be passed as well, e.g. "LoFtool,path/to/custom/scores.txt". - - LoFtool - - REVEL + candidate_calls: + params: --everything --check_existing + plugins: + # Add any plugin from https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html + # Plugin args can be passed as well, e.g. "LoFtool,path/to/custom/scores.txt". + - LoFtool + - REVEL + final_calls: + params: --everything --check_existing + plugins: + # Add any plugin from https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html + # Plugin args can be passed as well, e.g. "LoFtool,path/to/custom/scores.txt". + - LoFtool + - REVEL + spliceai: + activate: true params: cutadapt: "" diff --git a/workflow/resources/config/scenario.yaml b/workflow/resources/config/scenario.yaml index 9067d9d..6be9a64 100644 --- a/workflow/resources/config/scenario.yaml +++ b/workflow/resources/config/scenario.yaml @@ -61,7 +61,7 @@ species: loh_or_amplification: "normal:0.5 & tumor:[0.9,1.0[" germline: "(normal:0.5 & tumor:[0.0,0.9[) | (normal:1.0 & tumor:[0.0,1.0])" ?if is_ffpe: - ffpe_artifact: "($ffpe_subst) & tumor:]0.0,0.05[" + ffpe_artifact: "normal:0.0 & (($ffpe_subst) & tumor:]0.0,0.05[)" somatic_tumor_low: "normal:0.0 & ((($ffpe_subst) & tumor:]0.05,0.1[) | (!($ffpe_subst) & tumor:]0.0,0.1[))" ?else: somatic_tumor_low: "normal:0.0 & tumor:]0.0,0.1[" @@ -83,7 +83,7 @@ species: somatic_tumor_high: "normal:0.0 & tumor:[0.1,1.0]" germline: "(normal:0.5 & tumor:0.5) | (normal:1.0 & tumor:1.0)" ?if is_ffpe: - ffpe_artifact: "($ffpe_subst) & tumor:]0.0,0.05[" + ffpe_artifact: "normal:0.0 & (($ffpe_subst) & tumor:]0.0,0.05[)" somatic_tumor_low: "normal:0.0 & ((($ffpe_subst) & tumor:]0.05,0.1[) | (!($ffpe_subst) & tumor:]0.0,0.1[))" ?else: somatic_tumor_low: "normal:0.0 & tumor:]0.0,0.1[" From 2266cc04fc282fc7f84a91c038768ff1a7e0a6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Thu, 21 Sep 2023 07:43:40 +0200 Subject: [PATCH 06/10] update varlociraptor params --- workflow/resources/config/default.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/resources/config/default.yaml b/workflow/resources/config/default.yaml index 49b465b..920b7d3 100644 --- a/workflow/resources/config/default.yaml +++ b/workflow/resources/config/default.yaml @@ -407,9 +407,9 @@ params: # which might be misleading because all reads of an amplicon have the sample start # position, strand etc. (--omit-strand-bias, --omit-read-position-bias, # --omit-softclip-bias, --omit-read-orientation-bias). - call: "" + call: "--omit-read-position-bias" # Add extra arguments for varlociraptor preprocess. By default, we limit the depth to 200. # Increase this value for panel sequencing! - preprocess: "--max-depth 200" + preprocess: "--max-depth 30000" freebayes: min_alternate_fraction: 0.05 # Reduce for calling variants with lower VAFs From 1a4d9c83867f768e0c468637a28b5c5b323ee1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Thu, 21 Sep 2023 07:45:12 +0200 Subject: [PATCH 07/10] clean --- workflow/resources/config/default.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/workflow/resources/config/default.yaml b/workflow/resources/config/default.yaml index 920b7d3..df3ea89 100644 --- a/workflow/resources/config/default.yaml +++ b/workflow/resources/config/default.yaml @@ -391,8 +391,6 @@ annotations: # Plugin args can be passed as well, e.g. "LoFtool,path/to/custom/scores.txt". - LoFtool - REVEL - spliceai: - activate: true params: cutadapt: "" From 64d771fa1ff0cec6bca2de61b45dfcddc0961ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Thu, 21 Sep 2023 10:14:40 +0200 Subject: [PATCH 08/10] Fix scenario --- workflow/resources/config/scenario.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/workflow/resources/config/scenario.yaml b/workflow/resources/config/scenario.yaml index 6be9a64..4305b80 100644 --- a/workflow/resources/config/scenario.yaml +++ b/workflow/resources/config/scenario.yaml @@ -11,14 +11,20 @@ __definitions__: samples = params.samples.set_index("alias") if "ffpe" not in samples.columns: samples["ffpe"] = pd.NA - - sex = samples.loc["tumor", "sex"] + - sex = samples.loc[["tumor"], "sex"] - | - if pd.isna(sex) or sex not in ["male", "female"]: - raise ValueError(f"Unsupported sex in sample sheet (also ensure that sample sheet is entirely tab separated): {sex}") - - is_ffpe = samples.loc["tumor", "ffpe"] + if pd.isna(sex).any() or len(sex.unique()) != 1 or sex.iloc[0] not in ["male", "female"]: + raise ValueError(f"Unsupported sex in sample sheet (also ensure that sample sheet is entirely tab separated): {sex}") + - is_ffpe = samples.loc[["tumor"], "ffpe"].all() + - | + if len(samples.loc[["tumor"], "ffpe"].unique()) != 1: + raise ValueError(f"All samples within a group must to be either ffpe or not.") + - | + if len(samples.loc[["tumor"], "purity"].unique()) != 1: + raise ValueError(f"All samples within a group need to have the same purity.") - | def contamination(): - return 1.0 - float(samples.loc["tumor", "purity"]) + return 1.0 - float(samples.loc[["tumor"], "purity"].iloc[0]) species: heterozygosity: 0.001 @@ -41,7 +47,7 @@ species: ?if "normal" in samples.index: samples: tumor: - sex: ?sex + sex: ?sex.iloc[0] somatic-effective-mutation-rate: 1e-6 inheritance: clonal: @@ -51,7 +57,7 @@ species: by: normal fraction: ?contamination() normal: - sex: ?sex + sex: ?sex.iloc[0] somatic-effective-mutation-rate: 1e-6 events: @@ -71,13 +77,13 @@ species: tumor: resolution: 0.01 universe: "[0.0,1.0]" - sex: ?sex + sex: ?sex.iloc[0] contamination: by: normal fraction: ?contamination() normal: universe: "0.0 | 0.5 | 1.0" - sex: ?sex + sex: ?sex.iloc[0] events: somatic_tumor_high: "normal:0.0 & tumor:[0.1,1.0]" From 6830c5805110319b14be7e869c56e62f3247ccf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Mon, 13 Nov 2023 08:17:26 +0100 Subject: [PATCH 09/10] update pathogenic callset --- workflow/Snakefile | 2 +- workflow/resources/config/default.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index a4ba47b..8059870 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -6,7 +6,7 @@ module dna_seq_varlociraptor: github( "snakemake-workflows/dna-seq-varlociraptor", path="workflow/Snakefile", - tag="v5.0.1", + tag="v5.1.0", ) config: config diff --git a/workflow/resources/config/default.yaml b/workflow/resources/config/default.yaml index df3ea89..5a6f120 100644 --- a/workflow/resources/config/default.yaml +++ b/workflow/resources/config/default.yaml @@ -108,7 +108,7 @@ calling: novel: >- not (ID and ID.startswith('rs')) pathogenic_risk_factor_drug_response: >- - (not {'risk_factor', 'pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and + (not {'risk_factor', 'likely_pathogenic','pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and (ANN['IMPACT'] in {'LOW', 'MODERATE', 'HIGH'}) potentially_pathogenic: >- (ANN['IMPACT'] in {'LOW', 'MODERATE', 'HIGH'}) and ( From 69d1374f6823a7c0e5aa5dfeff590211fddb4394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Tue, 14 Nov 2023 08:51:52 +0100 Subject: [PATCH 10/10] update callset --- workflow/resources/config/default.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/resources/config/default.yaml b/workflow/resources/config/default.yaml index 5a6f120..7b121e8 100644 --- a/workflow/resources/config/default.yaml +++ b/workflow/resources/config/default.yaml @@ -108,13 +108,13 @@ calling: novel: >- not (ID and ID.startswith('rs')) pathogenic_risk_factor_drug_response: >- - (not {'risk_factor', 'likely_pathogenic','pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and - (ANN['IMPACT'] in {'LOW', 'MODERATE', 'HIGH'}) + (not {'risk_factor','pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and + (ANN['IMPACT'] in {'LOW', 'MODERATE', 'HIGH'}) and (ANN['REVEL'] is NA or ANN['REVEL'] >= 0.5) potentially_pathogenic: >- (ANN['IMPACT'] in {'LOW', 'MODERATE', 'HIGH'}) and ( ((not {'risk_factor', 'pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and ANN['REVEL'] is not NA and ANN['REVEL'] < 0.5) or ( - 'likely_pathogenic' in ANN['CLIN_SIG'] and not ( - (not {'risk_factor', 'pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and ANN['REVEL'] is NA or ANN['REVEL'] >= 0.5))) + 'likely_pathogenic' in ANN['CLIN_SIG'] and ( + ({'risk_factor', 'pathogenic', 'drug_response'}.isdisjoint(ANN['CLIN_SIG'])) and (ANN['REVEL'] is NA or ANN['REVEL'] >= 0.5)))) loh_relevant: >- ANN['IMPACT'] != 'LOW' and ANN['IMPACT'] != 'MODIFIER' and not (set(["benign", "likely benign"]) > set(ANN['CLIN_SIG']) and "benign" in ANN['CLIN_SIG'])