mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Fix some module tests after switching to config data (#386)
* Adding tar.gz kraken2 db to test data * Update test path files for untar module * Update test path files for kraken2/run module * Update test path files for cat/fastq module
This commit is contained in:
parent
1e4fa57139
commit
17fbdf96cb
7 changed files with 89 additions and 84 deletions
|
@ -1,69 +1,70 @@
|
||||||
// Base directory for test data
|
// Base directory for test data
|
||||||
def test_data_dir = "${launchDir}/tests/data/"
|
def test_data_dir = "${launchDir}/tests/data/"
|
||||||
|
|
||||||
params {
|
params {
|
||||||
test_data {
|
test_data {
|
||||||
'sarscov2' {
|
'sarscov2' {
|
||||||
'genome' {
|
'genome' {
|
||||||
genome_fasta = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta"
|
genome_fasta = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta"
|
||||||
genome_fasta_fai = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta.fai"
|
genome_fasta_fai = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta.fai"
|
||||||
genome_dict = "${test_data_dir}/genomics/sarscov2/genome/genome.dict"
|
genome_dict = "${test_data_dir}/genomics/sarscov2/genome/genome.dict"
|
||||||
genome_gff3 = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3"
|
genome_gff3 = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3"
|
||||||
genome_gtf = "${test_data_dir}/genomics/sarscov2/genome/genome.gtf"
|
genome_gtf = "${test_data_dir}/genomics/sarscov2/genome/genome.gtf"
|
||||||
genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes"
|
genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes"
|
||||||
transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta"
|
transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta"
|
||||||
transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf"
|
transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf"
|
||||||
|
|
||||||
test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed"
|
test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed"
|
||||||
test_bed_gz = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed.gz"
|
test_bed_gz = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed.gz"
|
||||||
test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed"
|
test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed"
|
||||||
test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12"
|
test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12"
|
||||||
baits_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/baits.bed"
|
baits_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/baits.bed"
|
||||||
|
|
||||||
kraken2 = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2"
|
kraken2 = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2"
|
||||||
}
|
kraken2_tar_gz = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2.tar.gz"
|
||||||
'illumina' {
|
}
|
||||||
test_single_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.bam"
|
'illumina' {
|
||||||
test_single_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam"
|
test_single_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.bam"
|
||||||
test_single_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam.bai"
|
test_single_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam"
|
||||||
test_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.bam"
|
test_single_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam.bai"
|
||||||
test_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam"
|
test_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.bam"
|
||||||
test_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai"
|
test_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam"
|
||||||
test_methylated_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.bam"
|
test_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai"
|
||||||
test_methylated_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.bam"
|
test_methylated_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.bam"
|
||||||
test_methylated_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.bam.bai"
|
test_methylated_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.bam"
|
||||||
test_unaligned_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_unaligned.bam"
|
test_methylated_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.bam.bai"
|
||||||
|
test_unaligned_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_unaligned.bam"
|
||||||
test_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_1.fastq.gz"
|
|
||||||
test_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_2.fastq.gz"
|
test_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_1.fastq.gz"
|
||||||
test2_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_1.fastq.gz"
|
test_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_2.fastq.gz"
|
||||||
test2_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_2.fastq.gz"
|
test2_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_1.fastq.gz"
|
||||||
test_methylated_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_methylated_1.fastq.gz"
|
test2_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_2.fastq.gz"
|
||||||
test_methylated_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_methylated_2.fastq.gz"
|
test_methylated_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_methylated_1.fastq.gz"
|
||||||
|
test_methylated_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_methylated_2.fastq.gz"
|
||||||
test_baserecalibrator_table = "${test_data_dir}/genomics/sarscov2/illumina/gatk/test.baserecalibrator.table"
|
|
||||||
|
test_baserecalibrator_table = "${test_data_dir}/genomics/sarscov2/illumina/gatk/test.baserecalibrator.table"
|
||||||
test_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf"
|
|
||||||
test_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz"
|
test_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf"
|
||||||
test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi"
|
test_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz"
|
||||||
test2_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf"
|
test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi"
|
||||||
test2_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz"
|
test2_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf"
|
||||||
test2_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi"
|
test2_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz"
|
||||||
test3_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf"
|
test2_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi"
|
||||||
test3_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf.gz"
|
test3_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf"
|
||||||
test3_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi"
|
test3_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf.gz"
|
||||||
}
|
test3_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi"
|
||||||
'nanopore' {
|
}
|
||||||
test_sorted_bam = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam"
|
'nanopore' {
|
||||||
test_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam.bai"
|
test_sorted_bam = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam"
|
||||||
|
test_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam.bai"
|
||||||
test_fastq_gz = "${test_data_dir}/genomics/sarscov2/nanopore/fastq/test.fastq.gz"
|
|
||||||
}
|
test_fastq_gz = "${test_data_dir}/genomics/sarscov2/nanopore/fastq/test.fastq.gz"
|
||||||
}
|
}
|
||||||
'homo_sapiens' {
|
}
|
||||||
'illumina' {
|
'homo_sapiens' {
|
||||||
test_paired_end_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test_paired_end.bam"
|
'illumina' {
|
||||||
}
|
test_paired_end_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test_paired_end.bam"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
BIN
tests/data/genomics/sarscov2/genome/db/kraken2.tar.gz
Normal file
BIN
tests/data/genomics/sarscov2/genome/db/kraken2.tar.gz
Normal file
Binary file not shown.
|
@ -6,8 +6,8 @@ include { CAT_FASTQ } from '../../../../software/cat/fastq/main.nf' addParams( o
|
||||||
|
|
||||||
workflow test_cat_fastq_single_end {
|
workflow test_cat_fastq_single_end {
|
||||||
input = [ [ id:'test', single_end:true ], // meta map
|
input = [ [ id:'test', single_end:true ], // meta map
|
||||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
|
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test2_1.fastq.gz", checkIfExists: true) ]
|
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
|
|
||||||
CAT_FASTQ ( input )
|
CAT_FASTQ ( input )
|
||||||
|
@ -15,10 +15,10 @@ workflow test_cat_fastq_single_end {
|
||||||
|
|
||||||
workflow test_cat_fastq_paired_end {
|
workflow test_cat_fastq_paired_end {
|
||||||
input = [ [ id:'test', single_end:false ], // meta map
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
|
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true),
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test2_1.fastq.gz", checkIfExists: true),
|
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test2_2.fastq.gz", checkIfExists: true) ]
|
file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
|
|
||||||
CAT_FASTQ ( input )
|
CAT_FASTQ ( input )
|
||||||
|
|
|
@ -6,19 +6,19 @@ include { KRAKEN2_RUN } from '../../../../software/kraken2/run/main.nf' addParam
|
||||||
|
|
||||||
workflow test_kraken2_run_single_end {
|
workflow test_kraken2_run_single_end {
|
||||||
input = [ [ id:'test', single_end:true ], // meta map
|
input = [ [ id:'test', single_end:true ], // meta map
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true)
|
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
db = [ file("${launchDir}/tests/data/genomics/sarscov2/genome/db/kraken2", checkIfExists: true) ]
|
db = file(params.test_data['sarscov2']['genome']['kraken2'], checkIfExists: true)
|
||||||
|
|
||||||
KRAKEN2_RUN ( input, db )
|
KRAKEN2_RUN ( input, db )
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_kraken2_run_paired_end {
|
workflow test_kraken2_run_paired_end {
|
||||||
input = [ [ id:'test', single_end:false ], // meta map
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true)
|
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true) ]
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
db = [ file("${launchDir}/tests/data/genomics/sarscov2/genome/db/kraken2", checkIfExists: true) ]
|
db = file(params.test_data['sarscov2']['genome']['kraken2'], checkIfExists: true)
|
||||||
|
|
||||||
KRAKEN2_RUN ( input, db )
|
KRAKEN2_RUN ( input, db )
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,4 @@
|
||||||
- path: output/kraken2/test.unclassified_2.fastq.gz
|
- path: output/kraken2/test.unclassified_2.fastq.gz
|
||||||
should_exist: true
|
should_exist: true
|
||||||
- path: output/kraken2/test.kraken2.report.txt
|
- path: output/kraken2/test.kraken2.report.txt
|
||||||
md5sum: 5fb165fd0bdf920ff6cf6f734371a4cf
|
md5sum: 4227755fe40478b8d7dc8634b489761e
|
||||||
|
|
|
@ -5,7 +5,7 @@ nextflow.enable.dsl = 2
|
||||||
include { UNTAR } from '../../../software/untar/main.nf' addParams( options: [:] )
|
include { UNTAR } from '../../../software/untar/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
workflow test_untar {
|
workflow test_untar {
|
||||||
input = file("${launchDir}/tests/data/generic/test.txt.tar.gz", checkIfExists: true)
|
input = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true)
|
||||||
|
|
||||||
UNTAR ( input )
|
UNTAR ( input )
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,9 @@
|
||||||
tags:
|
tags:
|
||||||
- untar
|
- untar
|
||||||
files:
|
files:
|
||||||
- path: output/untar/test.txt
|
- path: output/untar/kraken2/hash.k2d
|
||||||
md5sum: 7171d4ec2ad0882fab4b0142536d93a1
|
md5sum: 8b8598468f54a7087c203ad0190555d9
|
||||||
|
- path: output/untar/kraken2/opts.k2d
|
||||||
|
md5sum: a033d00cf6759407010b21700938f543
|
||||||
|
- path: output/untar/kraken2/taxo.k2d
|
||||||
|
md5sum: 094d5891cdccf2f1468088855c214b2c
|
||||||
|
|
Loading…
Reference in a new issue