Skip to content

Commit 3fd9347

Browse files
committed
add count as output
1 parent 910ebde commit 3fd9347

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pipes/WDL/tasks/tasks_ncbi.wdl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ task download_ref_genomes_from_tsv {
9494
with open("~{ref_genomes_tsv}", 'rt') as inf:
9595
reader = csv.DictReader(inf, delimiter='\t',
9696
fieldnames=['tax_id', 'isolate_prefix', 'taxname', 'accessions']) # backwards support for headerless tsvs
97+
# for the future: batch all the downloads in a single call and re-organize output files afterwards
9798
for ref_genome in reader:
9899
if ref_genome['tax_id'] != 'tax_id': # skip header
99100
accessions = ref_genome['accessions'].split(':')
@@ -105,12 +106,12 @@ task download_ref_genomes_from_tsv {
105106
combinedFilePrefix="combined/" + '-'.join(accessions),
106107
removeSeparateFiles=False,
107108
chunkSize=500)
108-
109109
CODE
110110
>>>
111111

112112
output {
113113
Array[File] ref_genomes_fastas = glob("combined/*.fasta")
114+
Int num_references = length(ref_genomes_fastas)
114115
}
115116

116117
runtime {

0 commit comments

Comments
 (0)