2021-06-25 06:15:15 +00:00
|
|
|
#!/usr/bin/env nextflow
|
|
|
|
|
|
|
|
nextflow.enable.dsl = 2
|
|
|
|
|
2021-11-26 07:58:40 +00:00
|
|
|
include { UNTAR } from '../../../modules/untar/main.nf'
|
|
|
|
include { SAMTOOLS_VIEW } from '../../../modules/samtools/view/main.nf'
|
|
|
|
include { METAPHLAN3 } from '../../../modules/metaphlan3/main.nf'
|
2021-06-25 06:15:15 +00:00
|
|
|
|
|
|
|
workflow test_metaphlan3_single_end {
|
|
|
|
|
|
|
|
input = [ [ id:'test', single_end:true ], // meta map
|
|
|
|
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
|
|
|
|
]
|
|
|
|
|
2022-03-21 13:49:28 +00:00
|
|
|
db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ]
|
2021-06-25 06:15:15 +00:00
|
|
|
|
|
|
|
UNTAR ( db )
|
2022-03-21 13:49:28 +00:00
|
|
|
METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } )
|
2021-06-25 06:15:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_metaphlan3_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) ]
|
|
|
|
]
|
|
|
|
|
2022-03-21 13:49:28 +00:00
|
|
|
db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ]
|
2021-06-25 06:15:15 +00:00
|
|
|
|
|
|
|
UNTAR ( db )
|
2022-03-21 13:49:28 +00:00
|
|
|
METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } )
|
2021-06-25 06:15:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_metaphlan3_sam {
|
|
|
|
|
|
|
|
input = [ [ id:'test'], // meta map
|
|
|
|
[ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ]
|
|
|
|
]
|
|
|
|
|
2022-03-21 13:49:28 +00:00
|
|
|
db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ]
|
2021-06-25 06:15:15 +00:00
|
|
|
|
|
|
|
UNTAR ( db )
|
2021-11-26 07:58:40 +00:00
|
|
|
SAMTOOLS_VIEW ( input, [] )
|
2022-03-21 13:49:28 +00:00
|
|
|
METAPHLAN3 ( SAMTOOLS_VIEW.out.bam, UNTAR.out.untar.map{ it[1] } )
|
2021-06-25 06:15:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
workflow test_metaphlan3_fasta {
|
|
|
|
|
|
|
|
input = [ [ id:'test', single_end:true], // meta map
|
|
|
|
[ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
|
|
|
|
]
|
|
|
|
|
2022-03-21 13:49:28 +00:00
|
|
|
db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ]
|
2021-06-25 06:15:15 +00:00
|
|
|
|
|
|
|
UNTAR ( db )
|
2022-03-21 13:49:28 +00:00
|
|
|
METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } )
|
2021-06-25 06:15:15 +00:00
|
|
|
}
|