Skip to content

Commit

Permalink
Merge branch 'master' into nf-test_phispy
Browse files Browse the repository at this point in the history
* master:
  Fix test for FASTQ_FASTQC_UMITOOLS_FASTP which included an absolute path in the snapshot. (nf-core#5278)
  added new module lofraq/viterbi; solves new module: lofreq/viterbi nf-core#5158 (nf-core#5197)
  Update glimpse/phase output channel to phased_variants nf-core#5172 (nf-core#5174)
  Add module: GTFSORT (nf-core#5237)
  add nf-test to bedtools/sort - nf-core#3936 (nf-core#5221)
  addedd optional output channel for lib files (nf-core#5257)
  • Loading branch information
jvfe committed Mar 19, 2024
2 parents 8402805 + cabcc0d commit e16f6f9
Show file tree
Hide file tree
Showing 43 changed files with 2,416 additions and 1,844 deletions.
58 changes: 58 additions & 0 deletions modules/nf-core/bedtools/sort/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
nextflow_process {

name "Test Process BEDTOOLS_SORT"
script "../main.nf"
config "./nextflow.config"
process "BEDTOOLS_SORT"

tag "modules"
tag "modules_nfcore"
tag "bedtools"
tag "bedtools/sort"

test("test_bedtools_sort") {

when {
process {
"""
input[0] = [ [ id:'test'],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)
]
input[1] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}


test("test_bedtools_sort_with_genome") {

when {
process {
"""
input[0] = [ [ id:'test'],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
68 changes: 68 additions & 0 deletions modules/nf-core/bedtools/sort/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions modules/nf-core/bedtools/sort/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
process {

withName: BEDTOOLS_SORT {
ext.prefix = { "${meta.id}_out" }
ext.suffix = "testtext"
}

}
2 changes: 2 additions & 0 deletions modules/nf-core/bedtools/sort/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bedtools/sort:
- "modules/nf-core/bedtools/sort/**"
2 changes: 1 addition & 1 deletion modules/nf-core/glimpse/chunk/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: "https://odelaneau.github.io/GLIMPSE/commands.html"
tool_dev_url: "https://github.com/odelaneau/GLIMPSE"
doi: "10.1038/s41588-020-00756-0"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/glimpse/concordance/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://odelaneau.github.io/GLIMPSE/commands.html"
tool_dev_url: "https://github.com/odelaneau/GLIMPSE"
doi: "10.1038/s41588-020-00756-0"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
29 changes: 16 additions & 13 deletions modules/nf-core/glimpse/concordance/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ nextflow_process {
name "Test Process GLIMPSE_CONCORDANCE"
script "../main.nf"
process "GLIMPSE_CONCORDANCE"
tag "glimpse"
tag "glimpse/concordance"

tag "modules"
tag "modules_nfcore"
tag "glimpse"
tag "glimpse/concordance"
tag "glimpse/phase"
tag "bcftools/index"

test("test_glimpse_concordance") {
setup {
Expand All @@ -20,15 +23,15 @@ nextflow_process {
])
input_vcf = Channel.of([
[ id:'input'], // meta map
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true)
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true)
])
ref_panel = Channel.of([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true)
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true)
])
ch_map = Channel.of([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true),
])
input[0] = input_vcf
Expand All @@ -43,7 +46,7 @@ nextflow_process {
script "../../../bcftools/index/main.nf"
process {
"""
input[0] = GLIMPSE_PHASE.out.phased_variant
input[0] = GLIMPSE_PHASE.out.phased_variants
"""
}
}
Expand All @@ -52,14 +55,14 @@ nextflow_process {
process {
"""
allele_freq = Channel.fromList([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true)
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true),
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true)
]).collect()
truth = Channel.fromList([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true)
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true),
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true)
]).collect()
estimate = GLIMPSE_PHASE.out.phased_variant
estimate = GLIMPSE_PHASE.out.phased_variants
| join (BCFTOOLS_INDEX.out.csi)
input[0] = estimate
| combine (allele_freq)
Expand Down
26 changes: 15 additions & 11 deletions modules/nf-core/glimpse/concordance/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/glimpse/ligate/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://odelaneau.github.io/GLIMPSE/commands.html"
tool_dev_url: "https://github.com/odelaneau/GLIMPSE"
doi: "10.1038/s41588-020-00756-0"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
21 changes: 12 additions & 9 deletions modules/nf-core/glimpse/ligate/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ nextflow_process {
name "Test Process GLIMPSE_LIGATE"
script "../main.nf"
process "GLIMPSE_LIGATE"
tag "glimpse"
tag "glimpse/ligate"

tag "modules_nfcore"
tag "modules"
tag "glimpse"
tag "glimpse/ligate"
tag "glimpse/phase"
tag "bcftools/index"

test("test_glimpse_ligate") {
setup {
Expand All @@ -21,15 +24,15 @@ nextflow_process {
])
input_vcf = Channel.of([
[ id:'input'], // meta map
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true)
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true)
])
ref_panel = Channel.of([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true)
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true)
])
ch_map = Channel.of([
file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true),
])
input[0] = input_vcf
Expand All @@ -44,7 +47,7 @@ nextflow_process {
script "../../../bcftools/index/main.nf"
process {
"""
input[0] = GLIMPSE_PHASE.out.phased_variant
input[0] = GLIMPSE_PHASE.out.phased_variants
"""
}
}
Expand All @@ -53,7 +56,7 @@ nextflow_process {
when {
process {
"""
input[0] = GLIMPSE_PHASE.out.phased_variant
input[0] = GLIMPSE_PHASE.out.phased_variants
| groupTuple()
| join (BCFTOOLS_INDEX.out.csi.groupTuple())
"""
Expand Down
Loading

0 comments on commit e16f6f9

Please sign in to comment.