mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Switch to native mandatory gzipped reading for hmmalign (#1343)
* fix: remove left-over unnecessary code * Update main.nf * Update hmmer/hmmalign command to natively accept gzipped input * Making @drpatelh happy Co-authored-by: Moritz E. Beber <midnighter@posteo.net> Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
This commit is contained in:
parent
2383d43a0f
commit
f9d25aad7f
3 changed files with 9 additions and 10 deletions
|
@ -21,13 +21,11 @@ process HMMER_HMMALIGN {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def fastacmd = fasta.getExtension() == 'gz' ? "gunzip -c $fasta" : "cat $fasta"
|
||||
"""
|
||||
$fastacmd | \\
|
||||
hmmalign \\
|
||||
hmmalign \\
|
||||
$args \\
|
||||
$hmm \\
|
||||
- | gzip -c > ${meta.id}.sthlm.gz
|
||||
$fasta | gzip -c > ${meta.id}.sthlm.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -19,12 +19,12 @@ input:
|
|||
e.g. [ id:'test' ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: Amino acid or nucleotide fasta file, gzipped or not
|
||||
pattern: "*.{fna,fna.gz,faa,faa.gz,fasta,fasta.gz,fa,fa.gz}"
|
||||
description: Amino acid or nucleotide gzipped compressed fasta file
|
||||
pattern: "*.{fna.gz,faa.gz,fasta.gz,fa.gz}"
|
||||
- hmm:
|
||||
type: file
|
||||
description: HMM file
|
||||
pattern: "*.hmm"
|
||||
description: A gzipped HMM file
|
||||
pattern: "*.hmm.gz"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
@ -43,3 +43,4 @@ output:
|
|||
|
||||
authors:
|
||||
- "@erikrikarddaniel"
|
||||
- "@jfy133"
|
||||
|
|
|
@ -8,10 +8,10 @@ workflow test_hmmer_hmmalign {
|
|||
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/e_coli_k12_16s.fna') // Change to params.test_data syntax after the data is included in tests/config/test_data.config
|
||||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/e_coli_k12_16s.fna.gz') // Change to params.test_data syntax after the data is included in tests/config/test_data.config
|
||||
]
|
||||
|
||||
hmm = file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/bac.16S_rRNA.hmm')
|
||||
hmm = file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/bac.16S_rRNA.hmm.gz')
|
||||
|
||||
HMMER_HMMALIGN ( input, hmm )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue