Skip to content

Commit

Permalink
Fix ampcombi (#2756)
Browse files Browse the repository at this point in the history
Remove directory flag, not needed in nf-core
  • Loading branch information
Darcy220606 authored Jan 20, 2023
1 parent 4e3f068 commit 37c5127
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
3 changes: 1 addition & 2 deletions modules/nf-core/ampcombi/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ process AMPCOMBI {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def db = opt_amp_db? "--amp_database $opt_amp_db": ""
def fileoption = amp_input instanceof List ? "--path_list '${amp_input.collect{"$it"}.join("' '")}'" : "--amp_results $amp_input/"
def faa = faa_input.isDirectory() ? "--faa ${faa_input}/" : "--faa ${faa_input}"
"""
ampcombi \\
$args \\
${fileoption} \\
--path_list '${amp_input.collect{"$it"}.join("' '")}' \\
--sample_list ${prefix} \\
--log True \\
--threads ${task.cpus} \\
Expand Down
17 changes: 0 additions & 17 deletions tests/modules/nf-core/ampcombi/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
nextflow.enable.dsl = 2

include { AMPCOMBI } from '../../../../modules/nf-core/ampcombi/main.nf'
include { UNTAR as UNTAR1 ; UNTAR as UNTAR2 } from '../../../../modules/nf-core/untar/main.nf'

workflow test_ampcombi_directory {
amp_input = [
[ id:'sample_1'],
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/test_files.tar.gz", checkIfExists: true)
]
faa_input = [
[ id:[]],
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/test_faa.tar.gz", checkIfExists: true)
]
db = params.db ? file( params.db ) : []

UNTAR1 ( amp_input )
UNTAR2 ( faa_input )
AMPCOMBI ( UNTAR1.out.untar, UNTAR2.out.untar.map{ it[1] }, db )
}

workflow test_ampcombi_file_paths {
amp_input = [[id:'sample_1'],
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/ampcombi/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
- name: ampcombi test_ampcombi_directory
command: nextflow run ./tests/modules/nf-core/ampcombi -entry test_ampcombi_directory -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ampcombi/nextflow.config
tags:
- ampcombi
files:
- path: output/ampcombi/ampcombi.log
contains: ["found", "AMPcombi"]
- path: output/ampcombi/sample_1/sample_1_amp.faa
md5sum: 8fef1e243eed8d605b9d40082b37a703
- path: output/ampcombi/sample_1/sample_1_ampcombi.csv
contains: ["DRAMP"]
- path: output/ampcombi/sample_1/sample_1_diamond_matches.txt
contains: ["target_id"]

- name: ampcombi test_ampcombi_file_paths
command: nextflow run ./tests/modules/nf-core/ampcombi -entry test_ampcombi_file_paths -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ampcombi/nextflow.config
tags:
Expand Down

0 comments on commit 37c5127

Please sign in to comment.