From 06127c966cc6a9971985398207c726f84fca9718 Mon Sep 17 00:00:00 2001 From: vBassewitz Date: Thu, 16 Mar 2023 09:57:52 +0000 Subject: [PATCH 1/5] replaced ragoo with ragtag and changed env --- workflow/envs/{ragoo.yaml => ragtag.yaml} | 2 +- workflow/rules/assembly.smk | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename workflow/envs/{ragoo.yaml => ragtag.yaml} (87%) diff --git a/workflow/envs/ragoo.yaml b/workflow/envs/ragtag.yaml similarity index 87% rename from workflow/envs/ragoo.yaml rename to workflow/envs/ragtag.yaml index 3e3edfcd9..70be69420 100644 --- a/workflow/envs/ragoo.yaml +++ b/workflow/envs/ragtag.yaml @@ -4,4 +4,4 @@ channels: - imperial-college-research-computing - nodefaults dependencies: - - ragoo =1.1 + - ragtag =2.1 diff --git a/workflow/rules/assembly.smk b/workflow/rules/assembly.smk index 62cc50298..4f4423453 100644 --- a/workflow/rules/assembly.smk +++ b/workflow/rules/assembly.smk @@ -128,17 +128,17 @@ rule order_contigs: output: temp("results/{date}/contigs/ordered-unfiltered/{sample}.fasta"), log: - "logs/{date}/ragoo/{sample}.log", + "logs/{date}/ragtag/{sample}.log", params: outdir=get_output_dir, conda: - "../envs/ragoo.yaml" + "../envs/ragtag.yaml" shadow: "minimal" shell: "(mkdir -p {params.outdir}/{wildcards.sample} && cd {params.outdir}/{wildcards.sample} &&" - " ragoo.py ../../../../../{input.contigs} ../../../../../{input.reference} &&" - " cd ../../../../../ && mv {params.outdir}/{wildcards.sample}/ragoo_output/ragoo.fasta {output})" + "ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" + " cd ../../../../../ && mv {params.outdir}/{wildcards.sample}/ragtag_output/ragtag.scaffold.fasta {output})" " > {log} 2>&1" @@ -148,7 +148,7 @@ rule filter_chr0: output: temp("results/{date}/contigs/ordered/{sample}.fasta"), log: - "logs/{date}/ragoo/{sample}_cleaned.log", + "logs/{date}/ragtag/{sample}_cleaned.log", conda: "../envs/python.yaml" script: From 78016f6b7c732949fff2225a45d87b0b17d1a6a7 Mon Sep 17 00:00:00 2001 From: vBassewitz Date: Thu, 16 Mar 2023 18:36:26 +0000 Subject: [PATCH 2/5] changes in benchmarking and report --- workflow/report/assembly_illumina.rst | 2 +- workflow/report/assembly_ont.rst | 2 +- workflow/report/qc-report.rst | 2 +- workflow/rules/assembly.smk | 2 +- workflow/rules/benchmarking.smk | 10 +++++----- .../{ragoo-remove-chr0.py => ragtag-remove-chr0.py} | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename workflow/scripts/{ragoo-remove-chr0.py => ragtag-remove-chr0.py} (96%) diff --git a/workflow/report/assembly_illumina.rst b/workflow/report/assembly_illumina.rst index ae9beea45..6b107cf2d 100644 --- a/workflow/report/assembly_illumina.rst +++ b/workflow/report/assembly_illumina.rst @@ -1,3 +1,3 @@ Assembly of sample {{ snakemake.wildcards.sample }}. -Reads were assembled with {{ "`metaSPAdes `_" if snakemake.params.is_amp else "`Megahit `_" }}, followed by reference based contig ordering and concatenation with `RaGOO `_. +Reads were assembled with {{ "`metaSPAdes `_" if snakemake.params.is_amp else "`Megahit `_" }}, followed by reference based contig ordering and concatenation with `RagTag `_. Then, assembly was polished by applying variants with an allele frequency of 100% (called by `Varlociraptor `_ at FDR 5%). diff --git a/workflow/report/assembly_ont.rst b/workflow/report/assembly_ont.rst index 6644f1cac..b6f96bc12 100644 --- a/workflow/report/assembly_ont.rst +++ b/workflow/report/assembly_ont.rst @@ -1,2 +1,2 @@ Assembly of sample {{ snakemake.wildcards.sample }}. -Reads were assembled with `SPAdes `_, followed by reference based contig ordering and concatenation with `RaGOO `_. +Reads were assembled with `SPAdes `_, followed by reference based contig ordering and concatenation with `RagTag `_. diff --git a/workflow/report/qc-report.rst b/workflow/report/qc-report.rst index c9983b328..967e9b428 100644 --- a/workflow/report/qc-report.rst +++ b/workflow/report/qc-report.rst @@ -1,3 +1,3 @@ QC overview for samples from {{ snakemake.wildcards.date }}. -Readcounts for raw, trimmed and filtered reads, length of initially assembled (`Megahit `_/`metaSPAdes `_) and reference ordered contigs (`RaGOO `_). +Readcounts for raw, trimmed and filtered reads, length of initially assembled (`Megahit `_/`metaSPAdes `_) and reference ordered contigs (`RagTag `_). Percentil overview for contamination in the raw reads (`kraken `_) and called COVID-19-strain including defining SNPs (`Pangolin `_) and variants of interest from variant calling (`Varlociraptor `_). diff --git a/workflow/rules/assembly.smk b/workflow/rules/assembly.smk index 4f4423453..3ade3ec41 100644 --- a/workflow/rules/assembly.smk +++ b/workflow/rules/assembly.smk @@ -152,7 +152,7 @@ rule filter_chr0: conda: "../envs/python.yaml" script: - "../scripts/ragoo-remove-chr0.py" + "../scripts/ragtag-remove-chr0.py" # polish illumina de novo assembly diff --git a/workflow/rules/benchmarking.smk b/workflow/rules/benchmarking.smk index c5683ecf1..3ae956c51 100644 --- a/workflow/rules/benchmarking.smk +++ b/workflow/rules/benchmarking.smk @@ -277,17 +277,17 @@ rule order_contigs_assembly_comparison: "results/{date}/assembly/{sample}/{assembler}/{sample}.ordered.contigs.fasta" ), log: - "logs/{date}/ragoo/{assembler}/{sample}.log", + "logs/{date}/ragtag/{assembler}/{sample}.log", params: outdir=get_output_dir, conda: - "../envs/ragoo.yaml" + "../envs/ragtag.yaml" shadow: "minimal" shell: "(cd {params.outdir} &&" - " ragoo.py ../../../../../{input.contigs} ../../../../../{input.reference} &&" - " cd ../../../../../ && mv {params.outdir}/ragoo_output/ragoo.fasta {output})" + " ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" + " cd ../../../../../ && mv {params.outdir}/ragtag_output/ragtag.scaffold.fasta {output})" " > {log} 2>&1" @@ -297,7 +297,7 @@ use rule filter_chr0 as filter_chr0_assembly_comparison with: output: "results/{date}/assembly/{sample}/{assembler}/{sample}.contigs.ordered.filtered.fasta", log: - "logs/{date}/ragoo/{assembler}/{sample}_cleaned.log", + "logs/{date}/ragtag/{assembler}/{sample}_cleaned.log", use rule align_contigs as align_contigs_assembly_comparison with: diff --git a/workflow/scripts/ragoo-remove-chr0.py b/workflow/scripts/ragtag-remove-chr0.py similarity index 96% rename from workflow/scripts/ragoo-remove-chr0.py rename to workflow/scripts/ragtag-remove-chr0.py index 70a3c0384..6cb9c2509 100644 --- a/workflow/scripts/ragoo-remove-chr0.py +++ b/workflow/scripts/ragtag-remove-chr0.py @@ -14,7 +14,7 @@ def remove_chr0(data_path, out_path): - """This function removes the Chr0 contig generated by raGOO. + """This function removes the Chr0 contig generated by ragTag. It also renames the id in the FASTA file to the actual sample name. In the case where no pseudomolecule is constructed other than the Chr0, it ensures, that the FASTA fill contains a 'filler-contig' with a sequence of 'N'. From f920404a6de7bcea476b6ab0f55df95194a2bdf1 Mon Sep 17 00:00:00 2001 From: vBassewitz Date: Fri, 17 Mar 2023 07:11:16 +0000 Subject: [PATCH 3/5] fix --- workflow/rules/assembly.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rules/assembly.smk b/workflow/rules/assembly.smk index 3ade3ec41..bb44cf044 100644 --- a/workflow/rules/assembly.smk +++ b/workflow/rules/assembly.smk @@ -137,7 +137,7 @@ rule order_contigs: "minimal" shell: "(mkdir -p {params.outdir}/{wildcards.sample} && cd {params.outdir}/{wildcards.sample} &&" - "ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" + " ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" " cd ../../../../../ && mv {params.outdir}/{wildcards.sample}/ragtag_output/ragtag.scaffold.fasta {output})" " > {log} 2>&1" From 3b8c4d676a2d4a60bacb01affbf4737a8506b840 Mon Sep 17 00:00:00 2001 From: vBassewitz Date: Wed, 30 Oct 2024 09:51:36 +0000 Subject: [PATCH 4/5] Changed RagTag options --- workflow/rules/assembly.smk | 2 +- workflow/rules/benchmarking.smk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rules/assembly.smk b/workflow/rules/assembly.smk index 6672c0ef2..7b6b9a267 100644 --- a/workflow/rules/assembly.smk +++ b/workflow/rules/assembly.smk @@ -137,7 +137,7 @@ rule order_contigs: "minimal" shell: "(mkdir -p {params.outdir}/{wildcards.sample} && cd {params.outdir}/{wildcards.sample} &&" - " ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" + " ragtag.py scaffold -C -w ../../../../../{input.reference} ../../../../../{input.contigs} &&" " cd ../../../../../ && mv {params.outdir}/{wildcards.sample}/ragtag_output/ragtag.scaffold.fasta {output})" " > {log} 2>&1" diff --git a/workflow/rules/benchmarking.smk b/workflow/rules/benchmarking.smk index be0d8306c..906353f3b 100644 --- a/workflow/rules/benchmarking.smk +++ b/workflow/rules/benchmarking.smk @@ -286,7 +286,7 @@ rule order_contigs_assembly_comparison: "minimal" shell: "(cd {params.outdir} &&" - " ragtag.py scaffold -C ../../../../../{input.reference} ../../../../../{input.contigs} &&" + " ragtag.py scaffold -C -w ../../../../../{input.reference} ../../../../../{input.contigs} &&" " cd ../../../../../ && mv {params.outdir}/ragtag_output/ragtag.scaffold.fasta {output})" " > {log} 2>&1" From 70c08c6598a7c17f47cfe0598565e396eb338e0e Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:27:07 +0100 Subject: [PATCH 5/5] deactivate non SARS-CoV-2 benchmarking --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2a96028f..4b5857ddd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -203,7 +203,6 @@ jobs: benchmark_strain_calling, benchmark_assembly, benchmark_mixtures, - benchmark_non_sars_cov_2, benchmark_reads, compare_assemblers, ]