Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions modules/nf-core/fusioncatcher/fusioncatcher/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::fusioncatcher=1.33"
65 changes: 65 additions & 0 deletions modules/nf-core/fusioncatcher/fusioncatcher/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
process FUSIONCATCHER_FUSIONCATCHER {
tag "$meta.id"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/fusioncatcher:1.33--hdfd78af_5':
'biocontainers/fusioncatcher:1.33--hdfd78af_5' }"

input:
tuple val(meta), path(fastqs)
tuple val(meta2), path(reference)

output:
tuple val(meta), path("*.fusion-genes.txt"), emit: fusions, optional: true
tuple val(meta), path("*.summary.txt") , emit: summary, optional: true
tuple val(meta), path("*.log") , emit: log
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def input = fastqs.join(",")

def avail_mem = 3072
if (!task.memory) {
log.info '[FusionCatcher] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
} else {
avail_mem = (task.memory.mega*0.8).intValue()
}
"""
fusioncatcher \\
--input=${input} \\
--output=. \\
--data=${reference} \\
--threads=${task.cpus} \\
--Xmx=${avail_mem} \\
${args}

mv final-list_candidate-fusion-genes.txt ${prefix}.fusion-genes.txt
mv summary_candidate_fusions.txt ${prefix}.summary.txt
mv fusioncatcher.log ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
fusioncatcher: "\$(fusioncatcher --version 2>&1 | awk '{print \$2}')"
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.fusion-genes.txt
touch ${prefix}.summary.txt
touch ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
fusioncatcher: "\$(fusioncatcher --version 2>&1 | awk '{print \$2}')"
END_VERSIONS
"""
}
78 changes: 78 additions & 0 deletions modules/nf-core/fusioncatcher/fusioncatcher/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "fusioncatcher_fusioncatcher"
description: FusionCatcher searches for novel/known somatic fusion genes, translocations, and chimeras in RNA-seq data
keywords:
- fusion
- rna
- fastq
tools:
- fusioncatcher:
description: FusionCatcher searches for novel/known somatic fusion genes, translocations, and chimeras in RNA-seq data
homepage: https://github.com/ndaniel/fusioncatcher
documentation: https://github.com/ndaniel/fusioncatcher/wiki
tool_dev_url: https://github.com/ndaniel/fusioncatcher
doi: "10.1101/011650v1"
licence: ["GPL v3"]
identifier: biotools:fusioncatcher

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- fastqs:
type: list
description: A list of input fastq files
pattern: "*.{fastq,fq}.gz"
- - meta2:
type: map
description: |
Groovy Map containing reference information
e.g. `[ id:'sample1', single_end:false ]`
- reference:
type: file
description: Directory containing fusioncatcher reference files

output:
- fusions:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.fusion-genes.txt":
type: file
description: The detected fusions in the input files
pattern: "*.fusion-genes.txt"
- summary:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.summary.txt":
type: file
description: The generated summary
pattern: "*.summary.txt"
- log:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.log":
type: file
description: The Fusioncatcher log
pattern: "*.log"
- versions:
- "versions.yml":
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@nvnieuwk"
maintainers:
- "@nvnieuwk"
43 changes: 43 additions & 0 deletions modules/nf-core/fusioncatcher/fusioncatcher/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "fusioncatcher"
tag "fusioncatcher/fusioncatcher"

// Only stub tests because the refernce is about 50 GB of data

test("sarscov2 - fastq - stub") {

options "-stub"

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),
]
input[1] = [
[ id:'reference'],
[]
]
"""
}
}

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

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"sarscov2 - fastq - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.fusion-genes.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "test",
"single_end": false
},
"test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
{
"id": "test",
"single_end": false
},
"test.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"3": [
"versions.yml:md5,6a54daab2ec7621d8493678e832cf45e"
],
"fusions": [
[
{
"id": "test",
"single_end": false
},
"test.fusion-genes.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"log": [
[
{
"id": "test",
"single_end": false
},
"test.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"summary": [
[
{
"id": "test",
"single_end": false
},
"test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,6a54daab2ec7621d8493678e832cf45e"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-11T11:01:13.392512529"
}
}
Loading