takes gunzip out of fargene main.nf (#1090)

* takes gunzip out of fargene main.nf

* update definition of input

* options.args -> args

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
This commit is contained in:
louperelo 2021-11-29 14:32:23 +01:00 committed by GitHub
parent 20d8250d9f
commit 1f8f86b793
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 14 deletions

View file

@ -35,15 +35,12 @@ process FARGENE {
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
""" """
gzip \\ fargene \\
-cdf $input \\ $args \\
> unziped.fa | -p $task.cpus \\
fargene \\ -i $input \\
$args \\ --hmm-model $hmm_model \\
-p $task.cpus \\ -o $prefix
-i unziped.fa \\
--hmm-model $hmm_model \\
-o $prefix
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -23,7 +23,7 @@ input:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- input: - input:
type: file type: file
description: fasta or paired-end fastq file containing either genomes or longer contigs as nucleotide or protein sequences (fasta) or fragmented metagenomic reads (fastq) description: uncompressed fasta file or paired-end fastq files containing either genomes or longer contigs as nucleotide or protein sequences (fasta) or fragmented metagenomic reads (fastq)
pattern: "*.{fasta}" pattern: "*.{fasta}"
- hmm_model: - hmm_model:
type: string type: string

View file

@ -2,6 +2,7 @@
nextflow.enable.dsl = 2 nextflow.enable.dsl = 2
include { GUNZIP } from '../../../modules/gunzip/main.nf'
include { FARGENE } from '../../../modules/fargene/main.nf' include { FARGENE } from '../../../modules/fargene/main.nf'
workflow test_fargene { workflow test_fargene {
@ -10,5 +11,6 @@ workflow test_fargene {
file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ] file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ]
hmm_model = 'class_a' hmm_model = 'class_a'
FARGENE ( input, hmm_model ) GUNZIP ( input )
FARGENE ( GUNZIP.out.gunzip, hmm_model )
} }

View file

@ -4,9 +4,11 @@
- fargene - fargene
files: files:
- path: output/fargene/fargene_analysis.log - path: output/fargene/fargene_analysis.log
- path: output/fargene/test/hmmsearchresults/unziped-class_A-hmmsearched.out - path: output/fargene/test/hmmsearchresults/test1.contigs-class_A-hmmsearched.out
- path: output/fargene/test/results_summary.txt - path: output/fargene/test/results_summary.txt
md5sum: 690d351cfc52577263ef4cfab1c81f50 md5sum: 690d351cfc52577263ef4cfab1c81f50
- path: output/fargene/test/tmpdir/tmp.out - path: output/fargene/test/tmpdir/test1.contigs-positives.out
- path: output/fargene/test/tmpdir/unziped-positives.out
md5sum: d41d8cd98f00b204e9800998ecf8427e md5sum: d41d8cd98f00b204e9800998ecf8427e
- path: output/fargene/test/tmpdir/tmp.out
- path: output/gunzip/test1.contigs.fa
md5sum: 80c4d78f2810f6d9e90fa6da9bb9c4f9