Skip to content

Commit

Permalink
Merge pull request #465 from Emiller88/test-data-config
Browse files Browse the repository at this point in the history
Add test_data config magic
  • Loading branch information
maxulysse authored Dec 8, 2021
2 parents 39f0974 + bfb0b7a commit 84c6e1b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
17 changes: 7 additions & 10 deletions tests/config/test_data.config
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
def test_data_dir = "${launchDir}/tests/data/"
def nf_core_modules_data = "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/"

try {
includeConfig "https://raw.githubusercontent.com/nf-core/modules/master/tests/config/test_data.config"
} catch (Exception e) {
System.err.println("WARNING: Could not load nf-core/modules test data config")
}

params {
test_data {
'nf-core' {
'bed' {
test_bed = "${nf_core_modules_data}/genomics/sarscov2/genome/bed/test.bed"
test2_bed = "${nf_core_modules_data}/genomics/sarscov2/genome/bed/test2.bed"
}
genome_fasta = "${nf_core_modules_data}/genomics/sarscov2/genome/genome.fasta"
genome_sizes = "${nf_core_modules_data}/genomics/sarscov2/genome/genome.sizes"
test_paired_end_sorted_bai = "${nf_core_modules_data}/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai"
test_paired_end_sorted_bam = "${nf_core_modules_data}/genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam"
test_vcf = "${nf_core_modules_data}/genomics/sarscov2/illumina/vcf/test.vcf.gz"
'external' {
}
}
}
2 changes: 1 addition & 1 deletion tests/subworkflows/local/annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include { ANNOTATE } from '../../../../subworkflows/local/annotate' addParams(

workflow test_annotate {
input = [[id: 'test'],
[file(params.test_data['nf-core']['test_vcf'], checkIfExists: true)]]
[file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)]]

ANNOTATE(
input,
Expand Down
4 changes: 2 additions & 2 deletions tests/subworkflows/nf-core/markduplicates/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ include { MARKDUPLICATES } from '../../../../subworkflows/nf-core/markduplicates

workflow test_markduplicates {
input = [[id: 'test'],
[file(params.test_data['nf-core']['test_paired_end_sorted_bam'], checkIfExists: true)],
[file(params.test_data['nf-core']['test_paired_end_sorted_bai'], checkIfExists: true)]]
[file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)],
[file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)]]

MARKDUPLICATES ( input, false, true )
}
4 changes: 2 additions & 2 deletions tests/subworkflows/nf-core/snpeff_annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ include { SNPEFF_ANNOTATE } from '../../../../subworkflows/nf-core/snpeff_annota

workflow test_snpeff_annotate {
input = [[id: 'test'],
[file(params.test_data['nf-core']['test_vcf'], checkIfExists: true)]]
[file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)]]

SNPEFF_ANNOTATE (
input,
"WBcel235.99",
[])
}
}
4 changes: 2 additions & 2 deletions tests/subworkflows/nf-core/vep_annotate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ include { VEP_ANNOTATE } from '../../../../subworkflows/nf-core/vep_annotate' ad

workflow test_vep_annotate {
input = [[id: 'test'],
[file(params.test_data['nf-core']['test_vcf'], checkIfExists: true)]]
[file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)]]

VEP_ANNOTATE (
input,
"WBcel235",
"caenorhabditis_elegans",
"104",
[])
}
}

0 comments on commit 84c6e1b

Please sign in to comment.