Skip to content

Commit

Permalink
output viral-ngs version as string in WDL workflows
Browse files Browse the repository at this point in the history
This calls `reports.py --version`  in a new WDL task at the end of each workflow.
  • Loading branch information
tomkinsc committed Feb 15, 2019
1 parent bb85497 commit 40c020f
Show file tree
Hide file tree
Showing 24 changed files with 77 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/align_and_plot.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ workflow align_and_plot {
input:
aligner_options = "-r Random -l 30 -g 40 -x 20 -t 502"
}

call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/assemble_denovo.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports

workflow assemble_denovo {

Expand All @@ -26,4 +27,6 @@ workflow assemble_denovo {
assembly_fasta = scaffold.scaffold_fasta,
reads_unmapped_bam = reads_unmapped_bam
}

call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/assemble_denovo_with_deplete.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports

workflow assemble_denovo_with_deplete {

Expand All @@ -26,4 +27,6 @@ workflow assemble_denovo_with_deplete {
assembly_fasta = scaffold.scaffold_fasta,
reads_unmapped_bam = deplete_taxa.cleaned_bam
}

call reports.software_version
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_intrahost.wdl" as intrahost
import "tasks_reports.wdl" as reports

workflow assemble_denovo_with_deplete_and_isnv_calling {

Expand Down Expand Up @@ -33,4 +34,6 @@ workflow assemble_denovo_with_deplete_and_isnv_calling {
assembly_fasta = refine_2x_and_plot.final_assembly_fasta,
mapped_bam = refine_2x_and_plot.aligned_bam
}

call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/assemble_denovo_with_isnv_calling.wdl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_intrahost.wdl" as intrahost
import "tasks_reports.wdl" as reports

workflow assemble_denovo_with_isnv_calling {
File reads_unmapped_bam
Expand Down Expand Up @@ -32,4 +33,6 @@ workflow assemble_denovo_with_isnv_calling {
assembly_fasta = refine_2x_and_plot.final_assembly_fasta,
mapped_bam = refine_2x_and_plot.aligned_bam
}

call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/assemble_refbased.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports

workflow assemble_refbased {
call assembly.refine_2x_and_plot
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/classify_kraken.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_metagenomics.wdl" as metagenomics
import "tasks_reports.wdl" as reports

workflow classify_kraken {
call metagenomics.kraken
call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/contigs.wdl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "tasks_metagenomics.wdl" as metagenomics
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports

workflow contigs {

Expand All @@ -14,4 +15,6 @@ workflow contigs {

# TO DO: taxonomic classification of contigs

call reports.software_version

}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/coverage_table.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_reports.wdl" as reports
import "tasks_reports.wdl" as reports

workflow coverage_table {
call reports.coverage_report
call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/demux_metag.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "tasks_metagenomics.wdl" as metagenomics
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports
import "tasks_reports.wdl" as reports

workflow demux_metag {
File krona_taxonomy_db_tgz
Expand Down Expand Up @@ -39,4 +40,6 @@ workflow demux_metag {
krona_taxonomy_db_tgz = krona_taxonomy_db_tgz
}

call reports.software_version

}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/demux_only.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_demux.wdl" as tasks_demux
import "tasks_reports.wdl" as reports

workflow demux_only {
call tasks_demux.illumina_demux
call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/demux_plus.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "tasks_metagenomics.wdl" as metagenomics
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports
import "tasks_reports.wdl" as reports

workflow demux_plus {

Expand Down Expand Up @@ -39,4 +40,6 @@ workflow demux_plus {
input:
reads_unmapped_bam = illumina_demux.raw_reads_unaligned_bams
}

call reports.software_version
}
4 changes: 3 additions & 1 deletion pipes/WDL/workflows/deplete_only.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_taxon_filter.wdl" as taxon_filter
import "tasks_reports.wdl" as reports

workflow deplete_only {
call taxon_filter.deplete_taxa
call taxon_filter.deplete_taxa
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/fetch_annotations.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_ncbi.wdl" as ncbi
import "tasks_reports.wdl" as reports

workflow fetch_annotations {
call ncbi.download_annotations
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/filter_classified_bam_to_taxa.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_metagenomics.wdl" as metagenomics
import "tasks_reports.wdl" as reports

workflow filter_classified_bam_to_taxa {
call metagenomics.filter_bam_to_taxa
call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/genbank.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "tasks_interhost.wdl" as interhost
import "tasks_ncbi.wdl" as ncbi
import "tasks_reports.wdl" as reports

workflow genbank {

Expand All @@ -23,4 +24,6 @@ workflow genbank {
assemblies_fasta = assemblies_fasta,
annotations_tbl = annot.transferred_feature_tables
}

call reports.software_version
}
4 changes: 4 additions & 0 deletions pipes/WDL/workflows/isnvs_merge_to_vcf.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "tasks_interhost.wdl" as interhost
import "tasks_intrahost.wdl" as tasks_intrahost
import "tasks_reports.wdl" as reports

workflow isnvs_merge_to_vcf {
File reference_fasta
Expand All @@ -10,9 +11,12 @@ workflow isnvs_merge_to_vcf {
reference_fasta = reference_fasta,
assemblies_fasta = assemblies_fasta
}

call tasks_intrahost.isnvs_vcf {
input:
perSegmentMultiAlignments = mafft.alignments_by_chr,
reference_fasta = reference_fasta
}

call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/isnvs_one_sample.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_intrahost.wdl" as intrahost
import "tasks_reports.wdl" as reports

workflow isnvs_one_sample {
call intrahost.isnvs_per_sample
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/mafft.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_interhost.wdl" as interhost
import "tasks_reports.wdl" as reports

workflow mafft {
call interhost.multi_align_mafft
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/merge_bams.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_demux.wdl" as demux
import "tasks_reports.wdl" as reports

workflow merge_bams {
call demux.merge_and_reheader_bams
call reports.software_version
}
2 changes: 2 additions & 0 deletions pipes/WDL/workflows/read_utils.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "tasks_read_utils.wdl" as reads
import "tasks_reports.wdl" as reports

workflow downsample {
call reads.downsample_bams
call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/scaffold_and_refine.wdl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "tasks_assembly.wdl" as assembly
import "tasks_reports.wdl" as reports

workflow scaffold_and_refine {
File reads_unmapped_bam
Expand All @@ -13,4 +14,6 @@ workflow scaffold_and_refine {
assembly_fasta = scaffold.scaffold_fasta,
reads_unmapped_bam = reads_unmapped_bam
}

call reports.software_version
}
3 changes: 3 additions & 0 deletions pipes/WDL/workflows/spikein.wdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import "tasks_reports.wdl" as reports
import "tasks_reports.wdl" as reports

workflow spikein {
call reports.spikein_report

call reports.software_version
}
18 changes: 18 additions & 0 deletions pipes/WDL/workflows/tasks/tasks_reports.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,22 @@ task spikein_report {
}
}

task software_version {
command {
set -ex -o pipefail
reports.py --version > "current_software_version.txt"
}

output {
String software_version = read_string("current_software_version.txt")
}

runtime {
memory: "2 GB"
cpu: 1
docker: "quay.io/broadinstitute/viral-ngs"
dx_instance_type: "mem1_ssd1_x4"
}
}


0 comments on commit 40c020f

Please sign in to comment.