2012 bug related to species input in goattaxonsearch module (#2099)

* updated input for taxon

* updated test_single_species

* updated test file

* run prettier on test.yml

* updated label process_low

* restored lable process_single

Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
This commit is contained in:
Alexander Ramos Díaz 2022-09-23 10:58:40 -06:00 committed by GitHub
parent 09159edc9e
commit 9d5ad1894b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View file

@ -20,7 +20,7 @@ process GOAT_TAXONSEARCH {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
input = taxa_file ? "-f ${taxa_file}" : "-t ${taxon}" input = taxa_file ? "-f ${taxa_file}" : "-t \"${taxon}\""
if (!taxon && !taxa_file) error "No input. Valid input: single taxon identifier or a .txt file with identifiers" if (!taxon && !taxa_file) error "No input. Valid input: single taxon identifier or a .txt file with identifiers"
if (taxon && taxa_file ) error "Only one input is required: a single taxon identifier or a .txt file with identifiers" if (taxon && taxa_file ) error "Only one input is required: a single taxon identifier or a .txt file with identifiers"
""" """

View file

@ -7,11 +7,11 @@ include { GOAT_TAXONSEARCH } from '../../../../modules/goat/taxonsearch/main.nf'
// //
// Test with genus name (Canis) // Test with genus name (Canis)
// //
workflow test_goat_taxonsearch_genus_name { workflow test_goat_taxonsearch_single_species {
input = [ input = [
[ id:'test_genus_name' ], // meta map [ id:'test_single_species' ], // meta map
taxon = 'Canis', taxon = 'Meles meles',
[] []
] ]
GOAT_TAXONSEARCH ( input ) GOAT_TAXONSEARCH ( input )

View file

@ -1,17 +1,17 @@
- name: goat taxonsearch test_goat_taxonsearch_genus_name - name: goat taxonsearch test_goat_taxonsearch_single_species
command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_genus_name -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_single_species -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config
tags: tags:
- goat
- goat/taxonsearch - goat/taxonsearch
- goat
files: files:
- path: output/goat/test_genus_name.tsv - path: output/goat/test_single_species.tsv
md5sum: e3de63a2bc2e16038aabeb325452bd16 md5sum: ed5b0afc7a6cf2f4b558882c10b35ef7
- name: goat taxonsearch test_goat_taxonsearch_genus_id - name: goat taxonsearch test_goat_taxonsearch_genus_id
command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_genus_id -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_genus_id -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config
tags: tags:
- goat
- goat/taxonsearch - goat/taxonsearch
- goat
files: files:
- path: output/goat/test_genus_id.tsv - path: output/goat/test_genus_id.tsv
md5sum: 2cc41abbbc21b4b66f4d5126cfbba2bc md5sum: 2cc41abbbc21b4b66f4d5126cfbba2bc
@ -19,8 +19,8 @@
- name: goat taxonsearch test_goat_taxonsearch_species - name: goat taxonsearch test_goat_taxonsearch_species
command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_species -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config command: nextflow run ./tests/modules/goat/taxonsearch -entry test_goat_taxonsearch_species -c ./tests/config/nextflow.config -c ./tests/modules/goat/taxonsearch/nextflow.config
tags: tags:
- goat
- goat/taxonsearch - goat/taxonsearch
- goat
files: files:
- path: output/goat/test_species.tsv - path: output/goat/test_species.tsv
md5sum: 7f5b36414820bd3ce2bfda06d98e479c md5sum: 7f5b36414820bd3ce2bfda06d98e479c