Skip to content

Commit

Permalink
Add testcase for VCF file
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Oct 22, 2024
1 parent a0ff5c9 commit 2c2be87
Show file tree
Hide file tree
Showing 8 changed files with 8,338 additions and 16 deletions.
8,302 changes: 8,302 additions & 0 deletions tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf

Large diffs are not rendered by default.

Binary file not shown.
52 changes: 36 additions & 16 deletions tests/test_vcf.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
"""
}
}
Expand All @@ -35,7 +35,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -53,7 +53,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -72,7 +72,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -92,7 +92,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -110,7 +110,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
"""
}
}
Expand All @@ -132,7 +132,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -151,7 +151,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
"""
}
}
Expand All @@ -169,7 +169,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
"""
}
}
Expand All @@ -187,7 +187,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -205,7 +205,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -223,7 +223,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -241,7 +241,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.info.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.info.gz")
"""
}
}
Expand All @@ -260,7 +260,7 @@ nextflow_process {
when {
process {
"""
input[0] = file("${projectDir}/tests/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf.gz")
"""
}
}
Expand All @@ -273,6 +273,26 @@ nextflow_process {
}

}
}

}

test("Should output chromosomes from VCF") {

when {
process {
"""
input[0] = file("${projectDir}/tests/data/valid/chunk_1_0240000001_0260000000.phased.dose.vcf")
"""
}
}

then {
def filename = process.out.vcf.get(0)
with(path(filename).vcf) {
assert chromosomes == ['1'] as Set
assert chromosome == '1'
}

}
}

}

0 comments on commit 2c2be87

Please # to comment.