Separate test data to break dependencies between bcftools modules tests

This commit is contained in:
JoseEspinosa 2021-02-08 16:51:21 +01:00
parent 83cc25860d
commit 4fa38ebb7a
15 changed files with 19 additions and 70 deletions

5
.github/filters.yml vendored
View file

@ -7,8 +7,6 @@ bcftools_bgzip:
- tests/software/bcftools/bgzip** - tests/software/bcftools/bgzip**
bcftools_consensus: bcftools_consensus:
- software/bowtie/bgzip/**
- software/bowtie/tabix/**
- software/bowtie/consesus/** - software/bowtie/consesus/**
- tests/software/bcftools/consesus** - tests/software/bcftools/consesus**
@ -17,8 +15,6 @@ bcftools_filter:
- tests/software/bcftools/filter** - tests/software/bcftools/filter**
bcftools_isec: bcftools_isec:
- software/bowtie/bgzip/**
- software/bowtie/tabix/**
- software/bowtie/isec/** - software/bowtie/isec/**
- tests/software/bcftools/isec** - tests/software/bcftools/isec**
@ -27,7 +23,6 @@ bcftools_stats:
- tests/software/bcftools/stats** - tests/software/bcftools/stats**
bcftools_tabix: bcftools_tabix:
- software/bowtie/bgzip/**
- software/bowtie/tabix/** - software/bowtie/tabix/**
- tests/software/bcftools/tabix** - tests/software/bcftools/tabix**

BIN
tests/data/vcf/test.vcf.gz Normal file

Binary file not shown.

Binary file not shown.

BIN
tests/data/vcf/test2.vcf.gz Normal file

Binary file not shown.

Binary file not shown.

BIN
tests/data/vcf/test3.vcf.gz Normal file

Binary file not shown.

Binary file not shown.

View file

@ -8,7 +8,7 @@ workflow test_bcftools_bgzip {
def input = [] def input = []
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] [ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
BCFTOOLS_BGZIP ( input ) BCFTOOLS_BGZIP ( input )
} }

View file

@ -2,22 +2,15 @@
nextflow.enable.dsl = 2 nextflow.enable.dsl = 2
include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
include { BCFTOOLS_TABIX as BCFTOOLS_TABIX } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] )
include { BCFTOOLS_CONSENSUS as BCFTOOLS_CONSENSUS } from '../../../../software/bcftools/consensus/main.nf' addParams( options: [:] ) include { BCFTOOLS_CONSENSUS as BCFTOOLS_CONSENSUS } from '../../../../software/bcftools/consensus/main.nf' addParams( options: [:] )
workflow test_bcftools_consensus { workflow test_bcftools_consensus {
def input = [] def input = []
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] [ file("${launchDir}/tests/data/vcf/test.vcf.gz", checkIfExists: true) ],
def fasta = [] [ file("${launchDir}/tests/data/vcf/test.vcf.gz.tbi", checkIfExists: true) ],
fasta = Channel.of ([ [ id:'test' ], // meta map [ file("${launchDir}/tests/data/vcf/test.consensus.fa", checkIfExists: true) ] ]
file("${launchDir}/tests/data/vcf/test.consensus.fa", checkIfExists: true) ])
BCFTOOLS_BGZIP ( input ) BCFTOOLS_CONSENSUS ( input )
BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf )
BCFTOOLS_CONSENSUS ( BCFTOOLS_BGZIP.out.vcf
.join( BCFTOOLS_TABIX.out.tbi, by: [0] )
.join( fasta, by: [0] ) )
} }

View file

@ -4,9 +4,5 @@
- bcftools - bcftools
- bcftools_consensus - bcftools_consensus
files: files:
- path: output/bcftools/test.vcf.gz
md5sum: eb75ae1f08a1884f8edc59ed423471a2
- path: output/bcftools/test.vcf.gz.tbi
md5sum: 06d52177f819730dd409157914534e8d
- path: output/bcftools/test.fa - path: output/bcftools/test.fa
md5sum: c9e7ac4537756a0b33bcf17117f9a065 md5sum: c9e7ac4537756a0b33bcf17117f9a065

View file

@ -9,7 +9,7 @@ workflow test_bcftools_filter {
def input = [] def input = []
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] [ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
BCFTOOLS_FILTER ( input ) BCFTOOLS_FILTER ( input )
} }

View file

@ -2,43 +2,19 @@
nextflow.enable.dsl = 2 nextflow.enable.dsl = 2
include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
include { BCFTOOLS_TABIX } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] )
include { BCFTOOLS_ISEC } from '../../../../software/bcftools/isec/main.nf' addParams( options: ['args': '--nfiles +2 --output-type z --no-version'] ) include { BCFTOOLS_ISEC } from '../../../../software/bcftools/isec/main.nf' addParams( options: ['args': '--nfiles +2 --output-type z --no-version'] )
include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP2 } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
include { BCFTOOLS_TABIX as BCFTOOLS_TABIX2 } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] )
include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP3 } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] )
include { BCFTOOLS_TABIX as BCFTOOLS_TABIX3 } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] )
workflow test_bcftools_isec { workflow test_bcftools_isec {
def input1, input2, input3 = [] def input = []
input = [ [ id:'test' ], // meta map
[ file("${launchDir}/tests/data/vcf/test.vcf.gz", checkIfExists: true),
file("${launchDir}/tests/data/vcf/test2.vcf.gz", checkIfExists: true),
file("${launchDir}/tests/data/vcf/test3.vcf.gz", checkIfExists: true)],
[ file("${launchDir}/tests/data/vcf/test.vcf.gz.tbi", checkIfExists: true),
file("${launchDir}/tests/data/vcf/test2.vcf.gz.tbi", checkIfExists: true),
file("${launchDir}/tests/data/vcf/test3.vcf.gz.tbi", checkIfExists: true) ]]
input1 = [ [ id:'test1' ], // meta map BCFTOOLS_ISEC ( input )
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]
input2 = [ [ id:'test2' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]
input3 = [ [ id:'test3' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]
BCFTOOLS_BGZIP ( input1 )
BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf )
BCFTOOLS_BGZIP2 ( input2 )
BCFTOOLS_TABIX2 ( BCFTOOLS_BGZIP2.out.vcf )
BCFTOOLS_BGZIP3 ( input3 )
BCFTOOLS_TABIX3 ( BCFTOOLS_BGZIP3.out.vcf )
vcfs = BCFTOOLS_BGZIP.out.vcf
.mix( BCFTOOLS_BGZIP2.out.vcf )
.mix( BCFTOOLS_BGZIP3.out.vcf )
.map { [ it[1] ]}.collect().map { [ [id: 'test'], it ] }
tbis = BCFTOOLS_TABIX.out.tbi
.mix( BCFTOOLS_TABIX2.out.tbi )
.mix( BCFTOOLS_TABIX3.out.tbi )
.map { [ it[1] ]}.collect().map { [ [id: 'test'], it ] }
BCFTOOLS_ISEC ( vcfs.join(tbis) )
} }

View file

@ -4,16 +4,6 @@
- bcftools - bcftools
- bcftools_isec - bcftools_isec
files: files:
- path: output/bcftools/test1.vcf.gz
md5sum: eb75ae1f08a1884f8edc59ed423471a2
- path: output/bcftools/test1.vcf.gz.tbi
md5sum: 06d52177f819730dd409157914534e8d
- path: output/bcftools/test2.vcf.gz
md5sum: eb75ae1f08a1884f8edc59ed423471a2
- path: output/bcftools/test2.vcf.gz.tbi
md5sum: 06d52177f819730dd409157914534e8d
- path: output/bcftools/test3.vcf.gz
md5sum: eb75ae1f08a1884f8edc59ed423471a2
- path: output/bcftools/test/0000.vcf.gz - path: output/bcftools/test/0000.vcf.gz
md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d
- path: output/bcftools/test/0000.vcf.gz.tbi - path: output/bcftools/test/0000.vcf.gz.tbi
@ -27,6 +17,6 @@
- path: output/bcftools/test/0002.vcf.gz.tbi - path: output/bcftools/test/0002.vcf.gz.tbi
md5sum: 8484b151ef902e25e54f7713d46ed90e md5sum: 8484b151ef902e25e54f7713d46ed90e
- path: output/bcftools/test/README.txt - path: output/bcftools/test/README.txt
md5sum: 306fcb71aafe414046a34bedd4d14304 md5sum: 63ef64134d2685bc5d50332ef20389d2
- path: output/bcftools/test/sites.txt - path: output/bcftools/test/sites.txt
md5sum: 01bb949ed7825ecf692bf0640e363647 md5sum: 01bb949ed7825ecf692bf0640e363647

View file

@ -8,7 +8,7 @@ workflow test_bcftools_stats {
def input = [] def input = []
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] [ file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ]]
BCFTOOLS_STATS ( input ) BCFTOOLS_STATS ( input )
} }

View file

@ -9,8 +9,7 @@ workflow test_bcftools_tabix {
def input = [] def input = []
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] [ file("${launchDir}/tests/data/vcf/test.vcf.gz", checkIfExists: true) ]
BCFTOOLS_BGZIP ( input ) BCFTOOLS_TABIX ( input )
BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf )
} }