mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Use a config containing all test data for module tests (#365)
* Re-organise all test data * Fix ECLint * Fix ECLint agaaainn * Now is not the time EClint * Initial commit for test data config * Rename test data * Include test config * Update indents * Update test for FastQC via config * Remove quotes of bottom-level variables * Use underscores in key names * Get tests working for fastp * Remove whitespace at beginning of file
This commit is contained in:
parent
22eaefe583
commit
83a500e6b0
8 changed files with 78 additions and 6 deletions
|
@ -21,6 +21,9 @@ if ("$PROFILE" == "singularity") {
|
|||
docker.runOptions = '-u \$(id -u):\$(id -g)'
|
||||
}
|
||||
|
||||
// Load test_data.config containing paths to test data
|
||||
includeConfig 'test_data.config'
|
||||
|
||||
manifest {
|
||||
nextflowVersion = '!>=20.11.0-edge'
|
||||
}
|
||||
|
|
69
tests/config/test_data.config
Normal file
69
tests/config/test_data.config
Normal file
|
@ -0,0 +1,69 @@
|
|||
// Base directory for test data
|
||||
def test_data_dir = "${launchDir}/tests/data/"
|
||||
|
||||
params {
|
||||
test_data {
|
||||
'sarscov2' {
|
||||
'genome' {
|
||||
genome_fasta = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta"
|
||||
genome_fasta_fai = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta.fai"
|
||||
genome_dict = "${test_data_dir}/genomics/sarscov2/genome/genome.dict"
|
||||
genome_gff3 = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3"
|
||||
genome_gtf = "${test_data_dir}/genomics/sarscov2/genome/genome.gtf"
|
||||
genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes"
|
||||
transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta"
|
||||
transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf"
|
||||
|
||||
test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed"
|
||||
test_bed_gz = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed.gz"
|
||||
test2_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test2.bed"
|
||||
test_bed12 = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed12"
|
||||
baits_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/baits.bed"
|
||||
|
||||
kraken2 = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2"
|
||||
}
|
||||
'illumina' {
|
||||
test_single_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.bam"
|
||||
test_single_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam"
|
||||
test_single_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam.bai"
|
||||
test_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.bam"
|
||||
test_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam"
|
||||
test_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai"
|
||||
test_methylated_paired_end_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.bam"
|
||||
test_methylated_paired_end_sorted_bam = "${test_data_dir}/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.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"
|
||||
test2_1_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_1.fastq.gz"
|
||||
test2_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test2_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_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_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi"
|
||||
test2_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf"
|
||||
test2_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz"
|
||||
test2_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi"
|
||||
test3_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test3.vcf"
|
||||
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"
|
||||
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"
|
||||
}
|
||||
}
|
||||
'homo_sapiens' {
|
||||
'illumina' {
|
||||
test_paired_end_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test_paired_end.bam"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ include { FASTP } from '../../../software/fastp/main.nf' addParams( options: [:
|
|||
*/
|
||||
workflow test_fastp_single_end {
|
||||
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) ]
|
||||
]
|
||||
|
||||
FASTP ( input )
|
||||
|
@ -20,8 +20,8 @@ workflow test_fastp_single_end {
|
|||
*/
|
||||
workflow test_fastp_paired_end {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/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_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
FASTP ( input )
|
||||
|
|
|
@ -9,7 +9,7 @@ include { FASTQC } from '../../../software/fastqc/main.nf' addParams( options: [
|
|||
*/
|
||||
workflow test_fastqc_single_end {
|
||||
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) ]
|
||||
]
|
||||
|
||||
FASTQC ( input )
|
||||
|
@ -20,8 +20,8 @@ workflow test_fastqc_single_end {
|
|||
*/
|
||||
workflow test_fastqc_paired_end {
|
||||
input = [ [id: 'test', single_end: false], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/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_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
FASTQC ( input )
|
||||
|
|
Loading…
Reference in a new issue