2020-11-25 01:55:52 +00:00
|
|
|
#!/usr/bin/env nextflow
|
|
|
|
|
|
|
|
nextflow.enable.dsl = 2
|
|
|
|
|
|
|
|
include { SAMTOOLS_FLAGSTAT } from '../../../software/samtools/flagstat/main.nf' addParams( options: [:] )
|
2020-11-25 02:01:05 +00:00
|
|
|
include { SAMTOOLS_IDXSTATS } from '../../../software/samtools/idxstats/main.nf' addParams( options: [:] )
|
2020-11-25 02:08:15 +00:00
|
|
|
include { SAMTOOLS_INDEX } from '../../../software/samtools/index/main.nf' addParams( options: [:] )
|
2020-11-25 02:14:21 +00:00
|
|
|
include { SAMTOOLS_SORT } from '../../../software/samtools/sort/main.nf' addParams( options: [:] )
|
2020-11-25 02:21:45 +00:00
|
|
|
include { SAMTOOLS_STATS } from '../../../software/samtools/stats/main.nf' addParams( options: [:] )
|
2021-01-29 16:18:45 +00:00
|
|
|
include { SAMTOOLS_VIEW } from '../../../software/samtools/view/main.nf' addParams( options: [:] )
|
2020-11-25 01:55:52 +00:00
|
|
|
|
|
|
|
workflow test_samtools_flagstat {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true),
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam.bai", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_FLAGSTAT ( input )
|
|
|
|
}
|
2020-11-25 02:01:05 +00:00
|
|
|
|
|
|
|
workflow test_samtools_idxstats {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true),
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam.bai", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_IDXSTATS ( input )
|
|
|
|
}
|
2020-11-25 02:08:15 +00:00
|
|
|
|
|
|
|
workflow test_samtools_index {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_INDEX ( input )
|
|
|
|
}
|
2020-11-25 02:14:21 +00:00
|
|
|
|
|
|
|
// FIXME Why is this passing it an already sorted bam?
|
|
|
|
workflow test_samtools_sort {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_SORT ( input )
|
|
|
|
}
|
2020-11-25 02:21:45 +00:00
|
|
|
|
|
|
|
workflow test_samtools_stats {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true),
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam.bai", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_STATS ( input )
|
|
|
|
}
|
2021-01-29 16:18:45 +00:00
|
|
|
|
|
|
|
workflow test_samtools_view {
|
|
|
|
|
|
|
|
def input = []
|
|
|
|
input = [ [ id:'test', single_end:false ], // meta map
|
|
|
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ]
|
|
|
|
|
|
|
|
SAMTOOLS_VIEW ( input )
|
|
|
|
}
|