Skip to content

Commit

Permalink
Merge branch 'master' into nf-test/picard_scatterintervalsbyns
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 26, 2024
2 parents b9c06a9 + 3fd7beb commit 33c059d
Show file tree
Hide file tree
Showing 277 changed files with 5,699 additions and 2,860 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,8 @@ jobs:

- name: Install nf-test
uses: nf-core/setup-nf-test@v1
with:
version: ${{ env.NFTEST_VER }}

- name: Setup apptainer
if: matrix.profile == 'singularity'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: renovate-config-validator
# use ruff for python files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
rev: v0.6.2
hooks:
- id: ruff
files: \.py$
Expand Down
40 changes: 40 additions & 0 deletions modules/nf-core/bandage/image/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bandage"
tag "bandage/image"

test("test-bandage-image") {

when {
process {
"""
input[0] = [
[ id:'B-3106' ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gfa/assembly.gfa', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.png[0][1]).name,
file(process.out.svg[0][1]).readLines()[3..7],
process.out.versions
).match()
}
)
}
}

}
22 changes: 22 additions & 0 deletions modules/nf-core/bandage/image/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"test-bandage-image": {
"content": [
"B-3106.png",
[
" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.2\" baseProfile=\"tiny\">",
"<title>Qt SVG Document</title>",
"<desc>Generated with Qt</desc>",
"<defs>",
"</defs>"
],
[
"versions.yml:md5,443fd5f11eb36f013a1863e66d0eea21"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T15:18:46.613049"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/bbmap/bbnorm/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tools:
homepage: "https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/"
documentation: "https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/"
tool_dev_url: "https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbnorm-guide/"
licence: "BBMap - Bushnell B. - sourceforge.net/projects/bbmap/"
licence: ["BBMap - Bushnell B. - sourceforge.net/projects/bbmap/"]
input:
- meta:
type: map
Expand Down
128 changes: 128 additions & 0 deletions modules/nf-core/bbmap/bbnorm/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bbmap"
tag "bbmap/bbnorm"

test("test-bbmap-bbnorm-se") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.fastq[0][1]).linesGzip,
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

test("test-bbmap-bbnorm-pe") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.fastq[0][1].collect { path(it).linesGzip[0..1] },
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

test("test-bbmap-bbnorm-interleaved") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ],
[ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.fastq[0][1]).linesGzip[3..7],
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

test("test-bbmap-bbnorm-multiple-input") {

when {
process {
"""
input[0] = [
[id:'test', single_end:true ],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.fastq[0][1]).linesGzip[3..7],
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
)
}
}

}
81 changes: 81 additions & 0 deletions modules/nf-core/bbmap/bbnorm/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"test-bbmap-bbnorm-interleaved": {
"content": [
[
"A/AA//EEAEA/E/AEEEE6EE/EEEA/6AEEEEEEEEE6EEEAEAEE//A/EEEEEE//E/E/A//E/E/<<EE</E/E",
"@ERR5069949.2161340 NS500628:121:HK3MMAFX2:2:21107:15810:18317/2",
"GGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTT",
"+",
"AA6AAAE6/EA/<E/E/<//EE///EAEAEEEE////6EEE//EEE/EAEEE/AEA/EA<EA</AEEE/EE/AEAE</E//A"
],
"test.bbnorm.log",
[
"versions.yml:md5,90b331a3702d052d61e0a14189e3fc01"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:56:27.169474"
},
"test-bbmap-bbnorm-multiple-input": {
"content": [
[
"AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE<EEAAAEEEEEEEEEAAAAEAEEEAEEEEEE<AAAA",
"@ERR5069949.1331889 NS500628:121:HK3MMAFX2:3:11605:17658:18222/1",
"GTCTACAAGCTGGTAATGCAACAGAAGTGCCTGCCAATTCAACTGTATTATCTTTCTGTGCTTTTGCTGTAGATGCTGCTAAAGCTTACAAAGATTATCTAGCTAGTGGGGGACAACCAATCACTAATTGTG",
"+",
"A/AAAEEEEEEEEEEEEEEEEEEEAEEEEAEEEEEEEEEEEAEEEEEEEEEEEEEEE/EEEEE<AEAEEEEE/EAEAEEE/AEEEEEEEEEEEEEEEEEEEEAE/EEEEEEEEEEEEEEEEEEEEEEEA<EE"
],
"test.bbnorm.log",
[
"versions.yml:md5,90b331a3702d052d61e0a14189e3fc01"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:56:35.01159"
},
"test-bbmap-bbnorm-pe": {
"content": [
[
[
"@ERR5069949.2161340 NS500628:121:HK3MMAFX2:2:21107:15810:18317/1",
"AACCAGAATATTTCAATTCAGTGTGTAGACTTATGAAAACTATAGGTCCAGACATGTTCCTCGGAACTTGTCGGCGTTGT"
],
[
"@ERR5069949.2161340 NS500628:121:HK3MMAFX2:2:21107:15810:18317/2",
"GGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTT"
]
],
"test.bbnorm.log",
[
"versions.yml:md5,90b331a3702d052d61e0a14189e3fc01"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:59:24.68372"
},
"test-bbmap-bbnorm-se": {
"content": [
[

],
"test.bbnorm.log",
[
"versions.yml:md5,90b331a3702d052d61e0a14189e3fc01"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:59:16.676091"
}
}
3 changes: 3 additions & 0 deletions modules/nf-core/bbmap/bbnorm/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = 'target=100 min=5'
}
2 changes: 1 addition & 1 deletion modules/nf-core/bbmap/index/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
licence: ["UC-LBL license (see package)"]
input:
- fasta:
type: fasta
type: file
description: fasta formatted file with nucleotide sequences
pattern: "*.{fna,fa,fasta}"
output:
Expand Down
53 changes: 53 additions & 0 deletions modules/nf-core/bbmap/index/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import groovy.io.FileType

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bbmap"
tag "bbmap/index"

test("test-bbmap-index") {

when {
process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
"""
}
}

then {
assertAll(
{ assert process.success },
{
def all_files = []

file(process.out.index[0]).eachFileRecurse (FileType.FILES) { file ->
all_files << file
}

def all_file_names = all_files.collect { it.name }.toSorted()

def stable_file_names = [
'chr1_index_k13_c15_b1.block'
]

def stable_files = all_files.findAll { it.name in stable_file_names }.toSorted()

assert snapshot(
all_file_names,
stable_files,
process.out.versions[0]
).match()
}
)
}
}

}
23 changes: 23 additions & 0 deletions modules/nf-core/bbmap/index/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"test-bbmap-index": {
"content": [
[
"chr1.chrom.gz",
"chr1_index_k13_c15_b1.block",
"chr1_index_k13_c15_b1.block2.gz",
"info.txt",
"scaffolds.txt.gz",
"summary.txt"
],
[
"chr1_index_k13_c15_b1.block:md5,9f0d9a7413c1d2c16cc24555b2381163"
],
"versions.yml:md5,00db75f2ebfcae6002a29c49a476dda1"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:41:14.388643"
}
}
Loading

0 comments on commit 33c059d

Please sign in to comment.