File tree 2 files changed +23
-4
lines changed
modules/local/input_validation
2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ process INPUT_VALIDATION_VCF {
25
25
echo '${ JsonOutput.toJson(params.refpanel)} ' > reference-panel.json
26
26
27
27
# Verify if VCF files are valid
28
- for vcf in " $vcf_files " ; do
28
+ for vcf in $vcf_files ; do
29
29
# Attempt to create the index using tabix
30
30
if ! output=\$ (tabix -p vcf "\$ vcf" 2>&1); then
31
31
echo ::group type=error
Original file line number Diff line number Diff line change @@ -3,13 +3,33 @@ nextflow_pipeline {
3
3
name "Pipeline Tests for Input Validation"
4
4
script "main.nf"
5
5
6
+ test("Should pass with several files") {
7
+
8
+ when {
9
+ params {
10
+ project = "test-job"
11
+ build = "hg19"
12
+ files = "$projectDir/tests/data/input/three/*.vcf.gz"
13
+ allele_frequency_population = "eur"
14
+ mode = "qc-only"
15
+ refpanel_yaml = "$projectDir/tests/data/refpanels/hapmap2/cloudgene.yaml"
16
+ output = "${outputDir}"
17
+ }
18
+ }
19
+
20
+ then {
21
+ assert workflow.success
22
+ }
23
+
24
+ }
25
+
6
26
test("Should fail due to wrong path") {
7
27
8
28
when {
9
29
params {
10
30
project = "test-job"
11
31
build = "hg19"
12
- files = "$projectDir/tests/data/input/chr20-phased/*.vcf.gzz "
32
+ files = "$projectDir/tests/data/input/chr20-phased/*.vcf.gz "
13
33
allele_frequency_population = "eur"
14
34
mode = "qc-only"
15
35
refpanel_yaml = "$projectDir/tests/data/refpanels/hapmap2/cloudgene.yaml"
@@ -23,14 +43,13 @@ nextflow_pipeline {
23
43
24
44
}
25
45
26
-
27
46
test("Should fail due to unsorted file") {
28
47
29
48
when {
30
49
params {
31
50
project = "test-job"
32
51
build = "hg19"
33
- files = "$projectDir/tests/data/input/invalid-vcfs/unsorted .vcf.gz"
52
+ files = "$projectDir/tests/data/input/invalid-vcfs/* .vcf.gz"
34
53
allele_frequency_population = "eur"
35
54
mode = "qc-only"
36
55
refpanel_yaml = "$projectDir/tests/data/refpanels/hapmap2/cloudgene.yaml"
You can’t perform that action at this time.
0 commit comments