Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test_data config magic #465

Merged
merged 2 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
[])
}
}