Skip to content

Commit 7a26a95

Browse files
committed
refactor(wdl): strip protein-annotation block from HvpViralPipeline
HvpViralProteinAnnotation is now a standalone Dockstore workflow, so the nested call inside HvpViralPipeline was redundant — and forced three optional + two required inputs (assembly_primary_fa, rescue_viral_fa_gz, bfvd_db_tgz, prostt5_weights_tgz, bfvd_metadata_tsv) that the viral- prediction half does not consume. Reverts HvpViralPipeline's input surface to merged_fa_gz + sample_name + the three viral DBs only. Removed inputs were never produced inside HvpViralPipeline; they came from HvpAssembly / HvpReadRescue and were plumbed through purely to feed the nested sub-workflow. Users wanting protein annotation now invoke HvpViralProteinAnnotation as a separate Dockstore workflow, sourcing its inputs directly from the Terra data-table columns populated by HvpAssembly, HvpReadRescue, and HvpViralPipeline. miniwdl --strict clean (only pre-existing shellcheck lint in upstream tasks). pytest 24/24 unchanged.
1 parent e6b99d5 commit 7a26a95

1 file changed

Lines changed: 1 addition & 50 deletions

File tree

wdl/pipelines/PacBio/Metagenomics/HvpViralPipeline.wdl

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import "../../../tasks/Viral/Genomad.wdl" as GnomadTasks
44
import "../../../tasks/Viral/VirSorter2.wdl" as VS2Tasks
55
import "../../../tasks/Viral/CheckV.wdl" as CheckVTasks
66
import "../../../tasks/Viral/ViralSummary.wdl" as SumTasks
7-
import "HvpViralProteinAnnotation.wdl" as ProtAnnot
87

98
workflow HvpViralPipeline {
109

@@ -47,39 +46,23 @@ workflow HvpViralPipeline {
4746
n_provirus: "Number of viral contigs classified as provirus",
4847
n_no_repeats: "Number of viral contigs with no terminal repeats",
4948
mean_completeness: "Mean CheckV completeness across viral contigs with a completeness estimate",
50-
mean_contamination: "Mean CheckV contamination across viral contigs with a contamination estimate",
51-
protein_annotation_combined_faa: "(Optional, if bfvd_db_tgz + prostt5_weights_tgz supplied) Concatenated AA FASTA from geNomad + Pyrodigal-gv-on-VS2.",
52-
protein_annotation_nr_faa: "(Optional) Non-redundant AA representatives after mmseqs easy-linclust.",
53-
protein_annotation_foldseek_hits_tsv: "(Optional) Foldseek alignment hits vs BFVD (BLAST-tab-like TSV).",
54-
protein_annotation_best_hits_tsv: "(Optional) Best foldseek hit per query.",
55-
protein_annotation_annotated_tsv: "(Optional) best_hits left-joined with BFVD metadata when bfvd_metadata_tsv supplied.",
56-
protein_annotation_num_nr: "(Optional) Representative protein count after NR collapse.",
57-
protein_annotation_num_hits: "(Optional) Total foldseek hit-row count.",
58-
protein_annotation_num_queries_hit: "(Optional) Distinct queries with at least one foldseek hit.",
59-
protein_annotation_num_annotated: "(Optional) Best-hit queries that joined to a BFVD metadata row."
49+
mean_contamination: "Mean CheckV contamination across viral contigs with a contamination estimate"
6050
}
6151
}
6252

6353
parameter_meta {
6454
merged_fa_gz: "Merged assembly+rescue FASTA (gzipped) from HvpReadRescue"
65-
assembly_primary_fa: "Primary assembly FASTA from HvpAssembly (plain FASTA, uncompressed). Used as a distinct ORF-call source by the optional protein-annotation stage."
66-
rescue_viral_fa_gz: "Kraken-flagged viral rescued-reads FASTA (gzipped) from HvpReadRescue. Used as a distinct ORF-call source by the optional protein-annotation stage."
6755
sample_name: "Sample identifier used as output file prefix (e.g. bc2097)"
6856
genomad_db_tgz: "geNomad database as a single compressed archive (.tar.gz or .tar.zst)"
6957
vs2_db_tgz: "VirSorter2 database as a single compressed archive (.tar.gz or .tar.zst)"
7058
checkv_db_tgz: "CheckV database as a single compressed archive (.tar.gz or .tar.zst)"
7159
genomad_extra_args: "Additional command-line args appended verbatim to the genomad invocation"
7260
vs2_min_length: "Minimum sequence length for VirSorter2 (default 1000)"
7361
vs2_extra_args: "Additional command-line args appended verbatim to the virsorter run invocation"
74-
bfvd_db_tgz: "Optional pre-built BFVD foldseek structure DB (tar.gz, ~534 MB). When supplied together with prostt5_weights_tgz, the HvpViralProteinAnnotation sub-workflow runs end-to-end: Pyrodigal-gv on VS2 viral contigs + geNomad AA -> mmseqs NR -> ProstT5 foldseek DB -> foldseek search vs BFVD -> best-hit + annotation transfer. Leave unset to skip the structural-annotation stage. Source: https://bfvd.steineggerlab.workers.dev/latest/bfvd_foldseekdb.tar.gz"
75-
prostt5_weights_tgz: "Optional ProstT5 model weights (tar.gz, ~2.1 GB). Required iff bfvd_db_tgz is supplied. Source: https://foldseek.steineggerlab.workers.dev/prostt5-f16-gguf.tar.gz"
76-
bfvd_metadata_tsv: "Optional BFVD reference metadata TSV (~15 MB). When supplied with bfvd_db_tgz, attaches descriptive annotations to best foldseek hits. Source: https://bfvd.steineggerlab.workers.dev/latest/bfvd_metadata.tsv"
7762
}
7863

7964
input {
8065
File merged_fa_gz
81-
File assembly_primary_fa
82-
File rescue_viral_fa_gz
8366
String sample_name
8467

8568
File genomad_db_tgz
@@ -89,12 +72,6 @@ workflow HvpViralPipeline {
8972
String genomad_extra_args = ""
9073
Int vs2_min_length = 1000
9174
String vs2_extra_args = ""
92-
93-
# Optional structural-annotation stage (HvpViralProteinAnnotation).
94-
# Gated on bfvd_db_tgz + prostt5_weights_tgz both being supplied.
95-
File? bfvd_db_tgz
96-
File? prostt5_weights_tgz
97-
File? bfvd_metadata_tsv
9875
}
9976

10077
# geNomad and VirSorter2 run in parallel — both take the merged assembly+rescue FASTA
@@ -149,21 +126,6 @@ workflow HvpViralPipeline {
149126
sample_name = sample_name
150127
}
151128
152-
# Optional structural-annotation stage: only runs when both BFVD DB and ProstT5 weights are provided.
153-
if (defined(bfvd_db_tgz) && defined(prostt5_weights_tgz)) {
154-
call ProtAnnot.HvpViralProteinAnnotation as t_07_ProteinAnnotation {
155-
input:
156-
sample_name = sample_name,
157-
vs2_viral_combined_fa = t_02_VirSorter2.viral_combined_fa,
158-
genomad_virus_proteins_faa = t_01_Genomad.virus_proteins_faa,
159-
assembly_contigs_fa = assembly_primary_fa,
160-
rescued_reads_fa_gz = rescue_viral_fa_gz,
161-
bfvd_db_tgz = select_first([bfvd_db_tgz]),
162-
prostt5_weights_tgz = select_first([prostt5_weights_tgz]),
163-
bfvd_metadata_tsv = bfvd_metadata_tsv
164-
}
165-
}
166-
167129
output {
168130
File genomad_virus_summary_tsv = t_01_Genomad.virus_summary_tsv
169131
File genomad_virus_fna = t_01_Genomad.virus_fna
@@ -204,16 +166,5 @@ workflow HvpViralPipeline {
204166
Int n_no_repeats = t_06_ViralOverallSummary.n_no_repeats
205167
Float mean_completeness = t_06_ViralOverallSummary.mean_completeness
206168
Float mean_contamination = t_06_ViralOverallSummary.mean_contamination
207-
208-
# Optional protein-annotation stage outputs
209-
File? protein_annotation_combined_faa = t_07_ProteinAnnotation.combined_proteins_faa
210-
File? protein_annotation_nr_faa = t_07_ProteinAnnotation.nr_proteins_faa
211-
File? protein_annotation_foldseek_hits_tsv = t_07_ProteinAnnotation.foldseek_hits_tsv
212-
File? protein_annotation_best_hits_tsv = t_07_ProteinAnnotation.best_hits_tsv
213-
File? protein_annotation_annotated_tsv = t_07_ProteinAnnotation.annotated_hits_tsv
214-
Int? protein_annotation_num_nr = t_07_ProteinAnnotation.num_nr_proteins
215-
Int? protein_annotation_num_hits = t_07_ProteinAnnotation.num_foldseek_hits
216-
Int? protein_annotation_num_queries_hit = t_07_ProteinAnnotation.num_queries_with_hits
217-
Int? protein_annotation_num_annotated = t_07_ProteinAnnotation.num_queries_annotated
218169
}
219170
}

0 commit comments

Comments
 (0)