Skip to content

Commit

Permalink
Merge branch 'master' into nf-test/picard_liftovervcf
Browse files Browse the repository at this point in the history
  • Loading branch information
SPPearce authored Aug 26, 2024
2 parents 7cd5b0c + f5bc694 commit a12f189
Show file tree
Hide file tree
Showing 227 changed files with 3,931 additions and 1,968 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
6 changes: 3 additions & 3 deletions modules/nf-core/atlas/call/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
tool_dev_url: "https://bitbucket.org/wegmannlab/atlas"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down Expand Up @@ -48,7 +48,7 @@ input:
description: Optional tab separated text file containing 1-based list of known alleles. See atlas call documentation.
pattern: "*.{txt.tsv}"
- method:
type: character
type: string
description: Which variant calling algorithm to use. Some may require additional parameters supplied via ext.args. Check atlas documentation.
pattern: "MLE|Bayesian|allelePresence|randomBase|majorityBase"
output:
Expand All @@ -61,7 +61,7 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
- bam:
- vcf:
type: file
description: VCF file with variant calls
pattern: "*.vcf.gz"
Expand Down
46 changes: 46 additions & 0 deletions modules/nf-core/atlas/call/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/call"

test("test-atlas-call") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[],
[]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
input[3] = []
input[4] = 'randomBase'
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.summary,
process.out.versions
).match()
}
)
}
}

}
15 changes: 15 additions & 0 deletions modules/nf-core/atlas/call/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"test-atlas-call": {
"content": [
"VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=12674, phased=true, phasedAutodetect=true]",
[
"versions.yml:md5,abad4c906071792f8a5270fdb143fc4e"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T15:48:22.930389"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/atlas/pmd/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
tool_dev_url: "https://bitbucket.org/wegmannlab/atlas"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down
46 changes: 46 additions & 0 deletions modules/nf-core/atlas/pmd/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/pmd"

test("test-atlas-pmd") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[]
]
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.empiric[0][1]).readLines()[0],
file(process.out.exponential[0][1]).readLines()[0][0..13],
file(process.out.counts[0][1]).readLines()[0],
file(process.out.table[0][1]).readLines()[0],
process.out.versions
).match()
}
)
}
}

}
18 changes: 18 additions & 0 deletions modules/nf-core/atlas/pmd/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"test-atlas-pmd": {
"content": [
"1\tCT\tEmpiric[0.000831,0.000000,0.001339,0.001350,0.001437,0.000000,0.002210,0.001314,0.001466,0.000000,0.001395,0.001403,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.001362,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000794,0.000000,0.000000,0.000000,0.001297,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000]",
"1\tExponential[",
"1\tforward\tA->A\t2050\t2033\t2081\t2078\t2138\t2119\t2038\t2007\t2035\t2113\t2049\t2048\t1974\t2012\t2066\t2093\t2110\t1971\t1976\t1906\t1968\t1951\t1917\t1912\t1955\t1956\t1933\t1872\t1922\t1933\t1974\t1840\t1963\t1897\t1870\t1823\t1923\t1908\t1902\t1883\t1973\t1899\t1908\t1912\t1972\t1913\t1922\t1959\t1995\t2039",
"1\tforward\tA->A\t0.998539\t0.997547\t0.997603\t1\t0.998133\t0.998586\t0.99902\t0.998507\t0.998038\t0.999527\t0.997566\t0.997565\t0.998988\t0.998016\t0.99855\t0.999522\t0.996223\t0.99848\t0.999494\t0.998952\t0.999492\t0.997444\t0.998958\t0.997912\t0.997958\t0.997959\t0.997935\t0.998933\t0.996888\t0.999483\t0.998988\t0.999457\t0.998474\t0.998947\t0.998398\t0.998357\t0.997924\t0.999476\t0.999475\t1\t0.998987\t0.998423\t0.999476\t1\t1\t0.998956\t0.998442\t0.997454\t0.9975\t0.99951",
[
"versions.yml:md5,abec49256c52cb677fa0dad3473ed5a6"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T16:01:09.837624"
}
}
5 changes: 3 additions & 2 deletions modules/nf-core/atlas/recal/meta.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: "atlas_recal"
description: gives an estimation of the sequencing bias based on known invariant sites
description: Gives an estimation of the sequencing bias based on known invariant sites
keywords:
- sequencing_bias
- ATLAS
- bias
tools:
- "atlas":
description: "ATLAS, a suite of methods to accurately genotype and estimate genetic diversity"
homepage: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down
44 changes: 44 additions & 0 deletions modules/nf-core/atlas/recal/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/recal"

test("test-atlas-recal") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
[],
[]
]
input[1] = []
input[2] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.recal_patterns[0][1]).readLines()[0],
process.out.versions
).match()
}
)
}
}

}
15 changes: 15 additions & 0 deletions modules/nf-core/atlas/recal/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"test-atlas-recal": {
"content": [
"readGroup\tmate\tmodel\tquality\tposition\tcontext",
[
"versions.yml:md5,69864cf23ffc5b0559af20e0675c4290"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T15:57:16.06295"
}
}
3 changes: 2 additions & 1 deletion modules/nf-core/atlas/splitmerge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ process ATLAS_SPLITMERGE {
tuple val(meta), path(bam), path(bai), path(read_group_settings), path(blacklist)

output:
tuple val(meta), path("*_mergedReads.bam"), path("*.txt.gz"), emit: data
tuple val(meta), path("*_mergedReads.bam") , emit: bam
tuple val(meta), path("*.txt.gz") , emit: txt
path "versions.yml", emit: versions

when:
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/atlas/splitmerge/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
tool_dev_url: "https://bitbucket.org/wegmannlab/atlas"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand All @@ -27,7 +27,7 @@ input:
type: file
description: The BAI file for the input BAM file
pattern: "*.bai"
- read_group_setting:
- read_group_settings:
type: file
description: |
TXT file containing the split and merge settings for
Expand Down Expand Up @@ -55,7 +55,7 @@ output:
type: file
description: A BAM file with suffix_mergedReads.bam
pattern: "*_mergedReads.bam"
- filelist:
- txt:
type: file
description: A file listing all reads that were filtered out in the merging process with suffix_ignoredReads.txt.gz
pattern: "*.txt.gz"
Expand Down
43 changes: 43 additions & 0 deletions modules/nf-core/atlas/splitmerge/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/splitmerge"

test("test-atlas-splitmerge") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/read_group_settings.txt', checkIfExists: true),
[]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.txt[0][1]).linesGzip[3..7],
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.versions
).match()
}
)
}
}

}
22 changes: 22 additions & 0 deletions modules/nf-core/atlas/splitmerge/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"test-atlas-splitmerge": {
"content": [
[
"Read testN:1, rev : not a proper pair (orphan)",
"Read testN:99, rev : longer than insert size (TLEN)",
"Read testN:99, rev : not a proper pair (orphan)",
"Read testN:830, rev : longer than insert size (TLEN)",
"Read testN:830, fwd : longer than insert size (TLEN)"
],
"66f5f17da47cc4dced99bd17d739b536",
[
"versions.yml:md5,208f6ef7923cec00ddbcd5825f84a4fa"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T15:33:41.150912"
}
}
Loading

0 comments on commit a12f189

Please sign in to comment.