nf-core_modules/tests/modules/dastool/scaffolds2bin/main.nf

49 lines
2.1 KiB
Text
Raw Normal View History

Add new module: Das Tool (#1004) * add pydamage module * remove TODOs * split module by subcommands * update version parsing * remove forgotten TODOs * update module names * remove old holistic module * Update modules/pydamage/analyze/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add keywords * update resource requirement * Update modules/pydamage/filter/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/pydamage/filter/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * merge from upstream * update pydamage from upstream * add freebayes * update pydamage test from upstream * fix meta.yml * update functions.nf * update test.yml * update version parsing * update version parsing * fix indentation * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add optional inputs * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add bed test * add metabat2 module * only freebayes * remove metabat2 * update md5sum because of vcf including date of the day * add keyword * rescue conflicted files * attempt to fix ECLint * add pytest workflow for metabat * remove - * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add optional inputs/outpus * remove trailing whitespace * compressing and removing not reproducible md5sums * follow symlinks while decompressing * add dastool/scaffolds2bin * add dastool * remove non reproducible md5sum check for compressed files * Update tests/modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update tests/modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * split tests * export env variable * remove metabat2 from PR * fix linting errors * remove traling whitespace * Update modules/metabat2/jgisummarizebamcontigdepths/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * answer PR comments and switch to bgzip * PR review updates * update from PR review * update test files * add bacillus fragilis alignments * switch tests to bacillus fragilis * add string check * update test string * add pr comment answer * last fixes for PR review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
2021-11-19 07:33:29 +00:00
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { GUNZIP } from '../../../../modules/gunzip/main.nf'
include { METABAT2_METABAT2 } from '../../../../modules/metabat2/metabat2/main.nf'
include { METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS } from '../../../../modules/metabat2/jgisummarizebamcontigdepths/main.nf'
include { DASTOOL_SCAFFOLDS2BIN } from '../../../../modules/dastool/scaffolds2bin/main.nf'
Add new module: Das Tool (#1004) * add pydamage module * remove TODOs * split module by subcommands * update version parsing * remove forgotten TODOs * update module names * remove old holistic module * Update modules/pydamage/analyze/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add keywords * update resource requirement * Update modules/pydamage/filter/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/pydamage/filter/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * merge from upstream * update pydamage from upstream * add freebayes * update pydamage test from upstream * fix meta.yml * update functions.nf * update test.yml * update version parsing * update version parsing * fix indentation * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add optional inputs * Update modules/freebayes/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add bed test * add metabat2 module * only freebayes * remove metabat2 * update md5sum because of vcf including date of the day * add keyword * rescue conflicted files * attempt to fix ECLint * add pytest workflow for metabat * remove - * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * add optional inputs/outpus * remove trailing whitespace * compressing and removing not reproducible md5sums * follow symlinks while decompressing * add dastool/scaffolds2bin * add dastool * remove non reproducible md5sum check for compressed files * Update tests/modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update tests/modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * split tests * export env variable * remove metabat2 from PR * fix linting errors * remove traling whitespace * Update modules/metabat2/jgisummarizebamcontigdepths/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/jgisummarizebamcontigdepths/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/metabat2/metabat2/meta.yml Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * answer PR comments and switch to bgzip * PR review updates * update from PR review * update test files * add bacillus fragilis alignments * switch tests to bacillus fragilis * add string check * update test string * add pr comment answer * last fixes for PR review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
2021-11-19 07:33:29 +00:00
workflow test_dastool_scaffolds2bin {
input_depth = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam_bai'], checkIfExists: true) ]
METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS ( input_depth )
Channel.fromPath(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)
.map { it -> [[ id:'test', single_end:false ], it] }
.join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth)
.set { input_metabat2 }
METABAT2_METABAT2 ( input_metabat2 )
DASTOOL_SCAFFOLDS2BIN ( METABAT2_METABAT2.out.fasta.collect(), "fa")
}
workflow test_dastool_scaffolds2bin_ungzipped {
input_depth = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam_bai'], checkIfExists: true) ]
METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS ( input_depth )
Channel.fromPath(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)
.map { it -> [[ id:'test', single_end:false ], it] }
.join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth)
.set { input_metabat2 }
METABAT2_METABAT2 ( input_metabat2 )
// TODO test unzipped input files
ch_input_2_scaffolds2bin = GUNZIP( METABAT2_METABAT2.out.fasta ).gunzip
DASTOOL_SCAFFOLDS2BIN ( ch_input_2_scaffolds2bin, "fa")
}