diff --git a/bin/parse_viral_pred.py b/bin/parse_viral_pred.py index bbb0ecc..4608d87 100755 --- a/bin/parse_viral_pred.py +++ b/bin/parse_viral_pred.py @@ -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__": diff --git a/nextflow.config b/nextflow.config index 784f24a..bc703ab 100755 --- a/nextflow.config +++ b/nextflow.config @@ -146,15 +146,12 @@ profiles { } ebi { - params.workdir = "/hps/nobackup/rdf/metagenomics/nextflow-jobstore/" + params.workdir = "/hps/nobackup/rdf/metagenomics/service-team/nextflow-workdir/virify/" params.databases = "/hps/nobackup/rdf/metagenomics/service-team/ref-dbs/virify/" - params.singularity_cachedir = "/hps/nobackup/rdf/metagenomics/singularity_cache_nextflow/" + params.singularity_cachedir = "/hps/nobackup/rdf/metagenomics/service-team/singularity-cache/" workDir = params.workdir - executor { - name = "lsf" - queueSize = 200 - } + params.cloudProcess = true process.cache = "lenient" includeConfig 'nextflow/configs/node.config' diff --git a/nextflow/modules/parse.nf b/nextflow/modules/parse.nf index cec6ae7..5098bd0 100644 --- a/nextflow/modules/parse.nf +++ b/nextflow/modules/parse.nf @@ -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) @@ -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: """ diff --git a/pytest.ini b/pytest.ini index b014a57..1e2db65 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] -pythonpath = . +pythonpath = . bin norecursedirs = cwl/* addopts= --git-aware --symlink --color=no \ No newline at end of file diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index c499d1a..3655133 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -1,7 +1,7 @@ profiles { - // EBI GitLab CI // + // EBI CI // jenkins { - params.workdir = "/nfs/production/rdf/metagenomics/jenkins/nextflow-jobstore/" + params.workdir = "/nfs/production/rdf/metagenomics/jenkins/workspace/PipelinesCI/VirifyCI/nf-wd" params.databases = "/hps/nobackup/rdf/metagenomics/service-team/ref-dbs/virify/" workDir = params.workdir @@ -14,8 +14,8 @@ profiles { singularity { enabled = true autoMounts = true - cacheDir = "/hps/nobackup/rdf/metagenomics/singularity_cache_nextflow/" + cacheDir = "/hps/nobackup/rdf/metagenomics/service-team/singularity-cache/" } includeConfig "../../nextflow/configs/container.config" } -} \ No newline at end of file +} diff --git a/tests/test_pyworkflow_virify.yml b/tests/test_pyworkflow_virify.yml index dab28c3..2e25f46 100644 --- a/tests/test_pyworkflow_virify.yml +++ b/tests/test_pyworkflow_virify.yml @@ -2,17 +2,12 @@ command: nextflow run -profile jenkins -c ./tests/config/nextflow.config virify.nf --fasta ./nextflow/test/assembly.fasta files: - path: "results/assembly/08-final/annotation/high_confidence_viral_contigs_prodigal_annotation.tsv" - md5sum: 58a1bb491707b6e4eacbc7920b6040d8 encoding: UTF-8 - path: "results/assembly/08-final/annotation/high_confidence_viral_contigs_prot_ann_table_filtered.tsv" - md5sum: 79712308d74361c4d2ed4b96d8fba70d encoding: UTF-8 - path: "results/assembly/08-final/annotation/low_confidence_viral_contigs_prodigal_annotation.tsv" - md5sum: 87a505fd44a88f20bb502a252aea5134 encoding: UTF-8 - path: "results/assembly/08-final/annotation/low_confidence_viral_contigs_prot_ann_table_filtered.tsv" - md5sum: 2374c67048fd89ea90523899448e11a6 encoding: UTF-8 - path: "results/assembly/08-final/annotation/prophages_prot_ann_table_filtered.tsv" - md5sum: 319bb76976ef8a03a32ed67bdc91c652 encoding: UTF-8