Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/skip_nf_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"subworkflows/nf-core/dia_proteomics_analysis",
"modules/nf-core/diann",
"modules/nf-core/doubletdetection",
"modules/nf-core/eklipse",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"modules/nf-core/eklipse",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops

"modules/nf-core/fastk/fastk",
"modules/nf-core/fastk/histex",
"modules/nf-core/fastk/merge",
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/eklipse/environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- conda-forge
dependencies:
- bioconda::eklipse=1.8=hdfd78af_2
38 changes: 12 additions & 26 deletions modules/nf-core/eklipse/main.nf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run

nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment

on this file to clean this up nicely.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg that's so useful!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you removed conda support then you need to add a warning that conda is not supported by this module. But I would rather try and investigate what happens with conda and why it does not work

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it and the bioconda recipe is broken. This tool requires python 2.7 (😱), but didn't pin all dependencies, so one of it (tabulate), is installed as a python3 tool, so has a broken syntax. The solution: fix the bioconda recipe by pinning all dependencies (or at least tabulate to tabulate=0.8.9)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Just updated the Bioconda recipe, waiting for its approval

Original file line number Diff line number Diff line change
@@ -1,59 +1,45 @@

process EKLIPSE {
tag "$meta.id"
tag "${meta.id}"
label 'process_single'

// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/eklipse:1.8--hdfd78af_1':
'biocontainers/eklipse:1.8--hdfd78af_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/eklipse:1.8--hdfd78af_1'
: 'biocontainers/eklipse:1.8--hdfd78af_1'}"

input:
tuple val(meta), path(bam), path(bai)
path ref_gb

output:
tuple val(meta), path("*deletions.csv") , emit: deletions
tuple val(meta), path("*genes.csv") , emit: genes
tuple val(meta), path("*.png") , emit: circos
path "versions.yml" , emit: versions
tuple val(meta), path("*deletions.csv"), emit: deletions
tuple val(meta), path("*genes.csv"), emit: genes
tuple val(meta), path("*.png"), emit: circos
tuple val("${task.process}"), val('eklipse'), eval("eKLIPse.py 2>&1 | sed -n 's/.*\\[v\\([^]]*\\)\\].*/\\1/p' | tr '-' '.'"), emit: versions_eklipse, topic: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def ref_gb_path = ref_gb ? "$ref_gb" : "/usr/local/bin/data/NC_012920.1.gb"
def VERSION = "1.8" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def ref_gb_path = ref_gb ? "${ref_gb}" : "/usr/local/bin/data/NC_012920.1.gb"
"""
echo "$bam\t${prefix}" > infile.txt
echo "${bam}\t${prefix}" > infile.txt
eKLIPse.py \\
-in infile.txt \\
$args \\
-ref $ref_gb_path
-ref ${ref_gb_path} \\
${args}
mv eKLIPse_*/eKLIPse_deletions.csv eKLIPse_${prefix}_deletions.csv
mv eKLIPse_*/eKLIPse_genes.csv eKLIPse_${prefix}_genes.csv
mv eKLIPse_*/eKLIPse_${prefix}.png eKLIPse_${prefix}.png

cat <<-END_VERSIONS > versions.yml
"${task.process}":
eklipse: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.8"
"""
touch eKLIPse_${prefix}_deletions.csv
touch eKLIPse_${prefix}_genes.csv
touch eKLIPse_${prefix}.png

cat <<-END_VERSIONS > versions.yml
"${task.process}":
eklipse: $VERSION
END_VERSIONS
"""
}
42 changes: 29 additions & 13 deletions modules/nf-core/eklipse/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "eklipse"
description: tool for detection and quantification of large mtDNA rearrangements.
description: tool for detection and quantification of large mtDNA
rearrangements.
keywords:
- eklipse
- mitochondria
Expand All @@ -15,7 +15,8 @@ tools:
documentation: "https://github.com/dooguypapua/eKLIPse/tree/master"
tool_dev_url: "https://github.com/dooguypapua/eKLIPse/tree/master"
doi: "10.1038/s41436-018-0350-8"
licence: ["GNU General Public v3 or later (GPL v3+)"]
licence:
- "GNU General Public v3 or later (GPL v3+)"
identifier: ""
input:
- - meta:
Expand All @@ -35,8 +36,8 @@ input:
ontologies: []
- ref_gb:
type: file
description: mtDNA reference genome in Genbank format, optional if empty NC_012920.1.gb
will be used
description: mtDNA reference genome in Genbank format, optional if empty
NC_012920.1.gb will be used
pattern: "*.{gb}"
ontologies: []
output:
Expand All @@ -51,7 +52,7 @@ output:
description: csv file with deletion information
pattern: "*deletions.csv"
ontologies:
- edam: http://edamontology.org/format_3752 # CSV
- edam: http://edamontology.org/format_3752
genes:
- - meta:
type: map
Expand All @@ -63,7 +64,7 @@ output:
description: csv file with gene information
pattern: "*genes.csv"
ontologies:
- edam: http://edamontology.org/format_3752 # CSV
- edam: http://edamontology.org/format_3752
circos:
- - meta:
type: map
Expand All @@ -75,14 +76,29 @@ output:
description: png file with circos plot of mt
pattern: "*.{png}"
ontologies: []
versions_eklipse:
- - ${task.process}:
type: string
description: The name of the process
- eklipse:
type: string
description: The name of the tool
- eKLIPse.py 2>&1 | sed -n 's/.*\[v\([^]]*\)\].*/\1/p' | tr '-' '.':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- eklipse:
type: string
description: The name of the tool
- eKLIPse.py 2>&1 | sed -n 's/.*\[v\([^]]*\)\].*/\1/p' | tr '-' '.':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@Lucpen"
maintainers:
- "@Lucpen"
- "@EfraMP"
33 changes: 27 additions & 6 deletions modules/nf-core/eklipse/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nextflow_process {
tag "modules_nfcore"
tag "eklipse"

test("homo_sapiens [bam]") {
test("homo_sapiens - bam") {

when {
process {
Expand All @@ -25,11 +25,32 @@ nextflow_process {
then {
assertAll (
{ assert process.success },
{ assert snapshot(file(process.out.deletions[0][1]),
file(process.out.genes[0][1]),
file(process.out.circos[0][1]),
file(process.out.versions[0])).match()
}
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}

test("homo_sapiens - bam - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam.bai', checkIfExists: true)
]
input[1] = [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.NC_012920_1.gb', checkIfExists: true) ]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
93 changes: 87 additions & 6 deletions modules/nf-core/eklipse/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,92 @@
{
"homo_sapiens [bam]": {
"homo_sapiens - bam": {
"content": [
"eKLIPse_test_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7",
"eKLIPse_test_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18",
"eKLIPse_test.png:md5,d1ea2a548bc4f8d321b1128a61ea8b0a",
"versions.yml:md5,8e6ebaa9abf72ced91c1f56acd10f131"
{
"circos": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test.png:md5,d1ea2a548bc4f8d321b1128a61ea8b0a"
]
],
"deletions": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7"
]
],
"genes": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18"
]
],
"versions_eklipse": [
[
"EKLIPSE",
"eklipse",
"1.8"
]
]
}
],
"timestamp": "2024-02-11T14:55:25.205208435"
"timestamp": "2026-04-14T21:32:53.481003",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
},
"homo_sapiens - bam - stub": {
"content": [
{
"circos": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test.png:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"deletions": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test_deletions.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"genes": [
[
{
"id": "test",
"single_end": false
},
"eKLIPse_test_genes.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_eklipse": [
[
"EKLIPSE",
"eklipse",
"1.8"
]
]
}
],
"timestamp": "2026-04-14T21:33:23.273542",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
}
}
Loading