Editing the CAT/CAT module to handle single files (#1196)

* Removed if-statement to only run on more than 1 file, now it will run on single files as well.

* Added a test for running the cat_cat module on a single file.

* Created a new test.yml with nf-core modules create-test-yml -t cat/cat

* Edited test.yml to not include paths and md5sums for versions.yml, and also removed sometimes variable md5sums
This commit is contained in:
emnilsson 2022-01-06 17:41:36 +01:00 committed by GitHub
parent 2d4b0f7787
commit c4549c0ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 23 deletions

View file

@ -18,7 +18,6 @@ process CAT_CAT {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def file_list = files_in.collect { it.toString() }
if (file_list.size > 1) {
// | input | output | command1 | command2 |
// |-----------|------------|----------|----------|
@ -44,4 +43,3 @@ process CAT_CAT {
END_VERSIONS
"""
}
}

View file

@ -43,3 +43,12 @@ workflow test_cat_unzipped_zipped {
CAT_CAT ( input, 'cat.txt.gz' )
}
workflow test_cat_one_file_unzipped_zipped {
input = [
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
]
CAT_CAT ( input, 'cat.txt.gz' )
}

View file

@ -31,3 +31,11 @@
- cat/cat
files:
- path: output/cat/cat.txt.gz
- name: cat one file unzipped zipped
command: nextflow run ./tests/modules/cat/cat -entry test_cat_one_file_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config
tags:
- cat
- cat/cat
files:
- path: output/cat/cat.txt.gz