Make variables consistent

This commit is contained in:
James Fellows Yates 2022-05-02 11:55:43 +02:00
parent 375b706a4f
commit 58e5c6aece
6 changed files with 17 additions and 17 deletions

View file

@ -10,7 +10,7 @@ process DIAMOND_BLASTP {
input:
tuple val(meta), path(fasta)
path db
val outext
val out_ext
val blast_columns
output:
@ -30,7 +30,7 @@ process DIAMOND_BLASTP {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def columns = blast_columns ? "${blast_columns}" : ''
switch ( outext ) {
switch ( out_ext ) {
case "blast": outfmt = 0; break
case "xml": outfmt = 5; break
case "txt": outfmt = 6; break
@ -49,7 +49,7 @@ process DIAMOND_BLASTP {
--query $fasta \\
--outfmt ${outfmt} ${columns} \\
$args \\
--out ${prefix}.${outext}
--out ${prefix}.${out_ext}
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -28,7 +28,7 @@ input:
type: directory
description: Directory containing the protein blast database
pattern: "*"
- outext:
- out_ext:
type: string
description: |
Specify the type of output file to be generated. `blast` corresponds to
@ -40,7 +40,7 @@ input:
type: string
description: |
Optional space separated list of DIAMOND tabular BLAST output keywords
used for in conjunction with the 'txt' outext option (--outfmt 6). See
used for in conjunction with the 'txt' out_ext option (--outfmt 6). See
DIAMOND documnetation for more information.
output:

View file

@ -10,7 +10,7 @@ process DIAMOND_BLASTX {
input:
tuple val(meta), path(fasta)
path db
val outext
val out_ext
val blast_columns
output:
@ -30,7 +30,7 @@ process DIAMOND_BLASTX {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def columns = blast_columns ? "${blast_columns}" : ''
switch ( outext ) {
switch ( out_ext ) {
case "blast": outfmt = 0; break
case "xml": outfmt = 5; break
case "txt": outfmt = 6; break
@ -49,7 +49,7 @@ process DIAMOND_BLASTX {
--query $fasta \\
--outfmt ${outfmt} ${columns} \\
$args \\
--out ${prefix}.${outext}
--out ${prefix}.${out_ext}
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -28,7 +28,7 @@ input:
type: directory
description: Directory containing the nucelotide blast database
pattern: "*"
- outext:
- out_ext:
type: string
description: |
Specify the type of output file to be generated. `blast` corresponds to

View file

@ -9,20 +9,20 @@ workflow test_diamond_blastp {
db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
outext = 'txt'
out_ext = 'txt'
blast_columns = 'qseqid qlen'
DIAMOND_MAKEDB ( db )
DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns )
DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns )
}
workflow test_diamond_blastp_daa {
db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
outext = 'daa'
out_ext = 'daa'
blast_columns = []
DIAMOND_MAKEDB ( db )
DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns )
DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns )
}

View file

@ -9,20 +9,20 @@ workflow test_diamond_blastx {
db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
outext = 'txt'
out_ext = 'txt'
blast_columns = 'qseqid qlen'
DIAMOND_MAKEDB ( db )
DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns )
DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns )
}
workflow test_diamond_blastx_daa {
db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ]
fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
outext = 'daa'
out_ext = 'daa'
blast_columns = []
DIAMOND_MAKEDB ( db )
DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns )
DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns )
}