renamed output in entrezdirect/esummary: xml (#1928)

* renamed output: xml

* removed tail -n+3 from output

* removed comment

* removed blank space

* removed blank space

* updated test
This commit is contained in:
Alexander Ramos Díaz 2022-07-26 08:33:02 -06:00 committed by GitHub
parent 7f7f6bc913
commit f420d97ca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 12 deletions

View file

@ -12,7 +12,7 @@ process ENTREZDIRECT_ESUMMARY {
val database
output:
tuple val(meta), path("*.xml"), emit: xml_esummary
tuple val(meta), path("*.xml"), emit: xml
path "versions.yml" , emit: versions
when:
@ -24,12 +24,11 @@ process ENTREZDIRECT_ESUMMARY {
input = uids_file ? "-input ${uids_file}" : "-id ${uid}"
if (!uid && !uids_file) error "No input. Valid input: an identifier or a .txt file with identifiers"
if (uid && uids_file) error "Only one input is required: a single identifier or a .txt file with identifiers"
// use of 'tail -n+3' is to ensure a clean XML file. Otherwise an irrelevant Perl compilation error ends up in the XML
"""
esummary \\
$args \\
-db $database \\
$input | tail -n+3 > ${prefix}.xml
$input > ${prefix}.xml
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -48,7 +48,7 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
- xml_esummary:
- xml:
type: file
description: Query result in XML format
pattern: "*.xml"

View file

@ -14,7 +14,6 @@ workflow test_entrezdirect_esummary_sra {
uid = '5135484',
[]
]
database = 'sra'
ENTREZDIRECT_ESUMMARY ( input, database )
@ -30,7 +29,6 @@ workflow test_entrezdirect_esummary_genome {
uid = '768',
[]
]
database = 'genome'
ENTREZDIRECT_ESUMMARY ( input, database )
@ -46,7 +44,6 @@ workflow test_entrezdirect_esummary_assembly {
uid = '191021',
[]
]
database = 'assembly'
ENTREZDIRECT_ESUMMARY ( input, database )

View file

@ -1,5 +1,3 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -5,7 +5,7 @@
- entrezdirect/esummary
files:
- path: output/entrezdirect/test_sra.xml
md5sum: aeb7f5710a5447a8de89b9e6fc464606
md5sum: bc4bc7f3c53af5961bc8592225959363
- name: entrezdirect esummary test_entrezdirect_esummary_genome
command: nextflow run ./tests/modules/entrezdirect/esummary -entry test_entrezdirect_esummary_genome -c ./tests/config/nextflow.config -c ./tests/modules/entrezdirect/esummary/nextflow.config
@ -14,7 +14,7 @@
- entrezdirect/esummary
files:
- path: output/entrezdirect/test_genome.xml
md5sum: 2abea497bcef9312105b23ed78b72f62
md5sum: af6242f231bdc147d6197edfd0954585
- name: entrezdirect esummary test_entrezdirect_esummary_assembly
command: nextflow run ./tests/modules/entrezdirect/esummary -entry test_entrezdirect_esummary_assembly -c ./tests/config/nextflow.config -c ./tests/modules/entrezdirect/esummary/nextflow.config
@ -23,4 +23,4 @@
- entrezdirect/esummary
files:
- path: output/entrezdirect/test_assembly.xml
md5sum: 01c962bc82d3b3bcb9d4da5b0b6b408a
md5sum: 32f81147eea61df5814e87c2df1092a9