Skip to content

Commit

Permalink
Merge branch 'master' into nf-test/gfaffix
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 6, 2024
2 parents ccfd9dd + 6f2dfbf commit ced792c
Show file tree
Hide file tree
Showing 75 changed files with 2,021 additions and 2,408 deletions.
3 changes: 2 additions & 1 deletion modules/nf-core/bcftools/merge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ process BCFTOOLS_MERGE {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def input = vcfs.sort{ it.name }

def input = (vcfs.collect().size() > 1) ? vcfs.sort{ it.name } : vcfs
def regions = bed ? "--regions-file $bed" : ""
def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" :
args.contains("--output-type u") || args.contains("-Ou") ? "bcf" :
Expand Down
71 changes: 71 additions & 0 deletions modules/nf-core/bcftools/merge/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ nextflow_process {
config "./vcf_gz_index_csi.config"

when {

process {
"""
input[0] = [
Expand Down Expand Up @@ -363,6 +364,7 @@ nextflow_process {
test("homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output") {

config "./nextflow.gvcf.config"

when {
process {
"""
Expand Down Expand Up @@ -406,6 +408,41 @@ nextflow_process {

}

test("sarscov2 - [vcf, tbi], [], [], [] - one sample") {

config "./nextflow.config"
when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true)
],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true)
]
]
input[1] = [[],[]]
input[2] = [[],[]]
input[3] = [[],[]]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert process.out.vcf.get(0).get(1).endsWith("vcf") },
{ assert snapshot(
path(process.out.vcf.get(0).get(1)).md5,
process.out.versions,
).match() }
)
}

}

test("sarscov2 - [vcf, tbi], [], [], [] - stub") {

options "-stub"
Expand Down Expand Up @@ -779,4 +816,38 @@ nextflow_process {
}

}

test("sarscov2 - [vcf, tbi], [], [], [] - one sample - stub") {

options "-stub"
config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true)
],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true)
]
]
input[1] = [[],[]]
input[2] = [[],[]]
input[3] = [[],[]]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert process.out.vcf.get(0).get(1).endsWith("vcf") },
{ assert snapshot(process.out).match() }
)
}

}
}
52 changes: 52 additions & 0 deletions modules/nf-core/bcftools/merge/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,45 @@
},
"timestamp": "2024-09-05T13:17:47.356328326"
},
"sarscov2 - [vcf, tbi], [], [], [] - one sample - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [

],
"2": [
"versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a"
],
"index": [

],
"vcf": [
[
{
"id": "test"
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T15:13:18.708495878"
},
"homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output - stub": {
"content": [
{
Expand Down Expand Up @@ -438,6 +477,19 @@
},
"timestamp": "2024-09-05T13:55:44.299812124"
},
"sarscov2 - [vcf, tbi], [], [], [] - one sample": {
"content": [
"2a374cf02f0c32cf607646167e7f153b",
[
"versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T15:37:38.491844702"
},
"sarscov2 - [vcf, tbi], [], [], [] - stub": {
"content": [
{
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/merge/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: BCFTOOLS_MERGE {
ext.args = '--force-samples --no-version'
ext.args = '--force-samples --force-single --no-version'
}
}
1 change: 0 additions & 1 deletion modules/nf-core/circexplorer2/parse/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: circexplorer2_parse
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::circexplorer2=2.3.8
2 changes: 1 addition & 1 deletion modules/nf-core/circexplorer2/parse/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tools:
homepage: "https://github.com/YangLab/CIRCexplorer2/"
documentation: "https://circexplorer2.readthedocs.io/en/latest/"
doi: "10.1101/gr.202895.115"
licence: "['MIT License']"
licence: ["MIT License"]
input:
- meta:
type: map
Expand Down
62 changes: 62 additions & 0 deletions modules/nf-core/circexplorer2/parse/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

nextflow_process {

name "Test Process CIRCEXPLORER2_PARSE"
script "../main.nf"
process "CIRCEXPLORER2_PARSE"

tag "modules"
tag "modules_nfcore"
tag "circexplorer2"
tag "circexplorer2/parse"

test("test-circexplorer2-parse") {

when {
process {
"""
input[0] = [
[ id:'fust1_3' ],
file("https://raw.githubusercontent.com/nf-core/test-datasets/circrna/circexplorer2/fust1_3.Chimeric.out.junction")
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert file(process.out.junction[0][1]).text.contains('FUSIONJUNC') },
{ assert snapshot(
file(process.out.junction[0][1]).name, // unstable
process.out.versions
).match()
}
)
}
}

test("test-circexplorer2-parse-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'fust1_3' ],
file("https://raw.githubusercontent.com/nf-core/test-datasets/circrna/circexplorer2/fust1_3.Chimeric.out.junction")
]
"""
}
}

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

}
48 changes: 48 additions & 0 deletions modules/nf-core/circexplorer2/parse/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"test-circexplorer2-parse-stub": {
"content": [
{
"0": [
[
{
"id": "fust1_3"
},
"fust1_3.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,6490a204cc08154871418e5fbb3aff17"
],
"junction": [
[
{
"id": "fust1_3"
},
"fust1_3.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,6490a204cc08154871418e5fbb3aff17"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:58:38.034614"
},
"test-circexplorer2-parse": {
"content": [
"fust1_3.bed",
[
"versions.yml:md5,6490a204cc08154871418e5fbb3aff17"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T14:53:55.470118"
}
}
4 changes: 2 additions & 2 deletions modules/nf-core/geoquery/getgeo/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: geoquery_getgeo
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::bioconductor-geoquery=2.66.0
- bioconda::bioconductor-geoquery=2.70.0
- conda-forge::r-base=4.3.2 # Locked with container
18 changes: 16 additions & 2 deletions modules/nf-core/geoquery/getgeo/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process GEOQUERY_GETGEO {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bioconductor-geoquery:2.66.0--r42hdfd78af_0' :
'biocontainers/bioconductor-geoquery:2.66.0--r42hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/bioconductor-geoquery:2.70.0--r43hdfd78af_0' :
'biocontainers/bioconductor-geoquery:2.70.0--r43hdfd78af_0' }"

input:
tuple val(meta), val(querygse)
Expand All @@ -21,4 +21,18 @@ process GEOQUERY_GETGEO {

script:
template 'getgeo.R'

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.rds
touch ${prefix}.matrix.tsv
touch ${prefix}.annotation.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(Rscript -e 'R.Version()\$version.string' | sed -n 's|\\[1\\] "R version \\(.*\\) (.*|\\1|p')
bioconductor-geoquery: \$(Rscript -e 'packageVersion("GEOquery")' | sed -n 's|\\[1\\] ‘\\(.*\\)’|\\1|p')
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/nf-core/geoquery/getgeo/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: "https://bioconductor.org/packages/release/bioc/vignettes/GEOquery/inst/doc/GEOquery.html"
tool_dev_url: "https://github.com/seandavi/GEOquery"
doi: "10.1093/bioinformatics/btm254"
licence: "MIT"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
Loading

0 comments on commit ced792c

Please sign in to comment.