mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-23 11:38:17 +00:00
240ee4328c
* fix: remove left-over unnecessary code * Make gzipping optional for DAS_Tool scaffolds2bin * Add optional unzipping * Make gunzip optional for DAS_Tool scaffolds2bin * Apply suggestions from code review Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * Update modules/dastool/scaffolds2bin/meta.yml Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com>
48 lines
2.1 KiB
Text
48 lines
2.1 KiB
Text
#!/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'
|
|
|
|
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")
|
|
}
|