nf-core_modules/tests/modules/trimmomatic/main.nf
alyssa-ab c1eb9cce44
Trimmomatic (#1757)
* Trimmomatic main only first draft

* Add test files

* SE PE Adjustment

* Remove extra reads input

* chore: Remove TODOs

* Apply suggestions from code review

Co-authored-by: Edmund Miller <edmund.a.miller@gmail.com>

* fix(trimmomatic): Handle SE output correctly

Since there's never going to be unpaired reads for SE reads we can get
away with it for SE

* fix(trimmomatic): Use correct elvis operator to handle logic

* fix(trimmomatic): Add hack to work with SE and PE reads

* Update test.yml

* use the PE and SE trimming correctly

* Made user set adaptors

* Add documentation

* test(trimmomatic): Add files to pytest_modules

* test(trimmomatic): Update name of failing test

Co-authored-by: Edmund Miller <edmund.a.miller@protonmail.com>
Co-authored-by: Edmund Miller <edmund.a.miller@gmail.com>
2022-06-17 13:18:15 +00:00

42 lines
1.2 KiB
Text

nextflow.enable.dsl = 2
include {
TRIMMOMATIC as TRIMMOMATIC_SE
TRIMMOMATIC as TRIMMOMATIC_PE
TRIMMOMATIC
} from '../../../modules/trimmomatic/main.nf'
//
// Test with single-end data
//
workflow test_trimmomatic_single_end {
input = [ [ id:'test', single_end:true ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
]
TRIMMOMATIC_SE ( input )
}
//
// Test with paired-end data
//
workflow test_trimmomatic_paired_end {
input = [ [ id:'test', single_end:false ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
]
TRIMMOMATIC_PE ( input )
}
//
// Failing test with no adaptor
//
workflow test_trimmomatic_no_adaptor {
input = [ [ id:'test', single_end:false ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
]
TRIMMOMATIC ( input )
}