Skip to content

Commit

Permalink
Merge pull request #123 from EBI-Metagenomics/feature/optional-parse-…
Browse files Browse the repository at this point in the history
…results

Prase.nf results are optional.
  • Loading branch information
mberacochea authored May 7, 2024
2 parents 6483cbf + b88517b commit d166936
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/parse_viral_pred.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def main(pprmeta, finder, sorter, assembly, outdir, prefix=False):
" in the analysed metagenomic assembly",
file=sys.stderr,
)
exit(1)
exit(0)


if __name__ == "__main__":
Expand Down
11 changes: 5 additions & 6 deletions nextflow/modules/parse.nf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
process parse {
errorStrategy { task.exitStatus = 1 ? 'ignore' : 'terminate' }
publishDir "${params.output}/${name}/", mode: 'copy', pattern: "*.fna"
publishDir "${params.output}/${name}/", mode: 'copy', pattern: "virsorter_metadata.tsv"
publishDir "${params.output}/${name}/${params.finaldir}/", mode: 'copy', pattern: "${name}_virus_predictions.log"
label 'python3'
publishDir "${params.output}/${name}/", mode: 'copy', pattern: "*.fna"
publishDir "${params.output}/${name}/", mode: 'copy', pattern: "virsorter_metadata.tsv"
publishDir "${params.output}/${name}/${params.finaldir}/", mode: 'copy', pattern: "${name}_virus_predictions.log"
label 'python3'

input:
tuple val(name), file(fasta), val(contig_number), file(virfinder), file(virsorter), file(pprmeta)
Expand All @@ -12,7 +11,7 @@ process parse {
contig_number.toInteger() > 0

output:
tuple val(name), file("*.fna"), file('virsorter_metadata.tsv'), file("${name}_virus_predictions.log")
tuple val(name), file("*.fna"), file('virsorter_metadata.tsv'), file("${name}_virus_predictions.log"), optional: true

script:
"""
Expand Down

0 comments on commit d166936

Please sign in to comment.