forked from nf-core/rnafusion
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into nf-core-template-merge-3.1.1
- Loading branch information
Showing
14 changed files
with
214 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::fusioncatcher=1.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::fusioncatcher=1.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::fusioncatcher=1.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
include { FUSIONCATCHER_DETECT } from '../../../modules/local/fusioncatcher/detect/main' | ||
|
||
// TODO: Remove fusioncatcher_fusions as parameter. | ||
// TODO: remove dummy file. Work with Channel.empty() | ||
// TODO: if the files were already produced and the user want to skip the module because of this, they should be taken them from the sample sheet | ||
// TODO: harmonize `run_fusioncatcher` and `fusioncatcher_only` parameters at main workflow level to activate/skip this one. | ||
|
||
workflow FUSIONCATCHER_WORKFLOW { | ||
take: | ||
reads // channel [ meta, [ fastqs ] ] | ||
fusioncatcher_ref // channel [ meta, path ] | ||
run_fusioncatcher // boolean | ||
all // boolean | ||
fusioninspector_only // boolean | ||
fusioncatcher_fusions // path, string | ||
|
||
main: | ||
ch_versions = Channel.empty() | ||
ch_dummy_file = file("$baseDir/assets/dummy_file_fusioncatcher.txt", checkIfExists: true) | ||
|
||
if (( run_fusioncatcher || all) && !fusioninspector_only ) { | ||
if (fusioncatcher_fusions){ | ||
|
||
ch_fusioncatcher_fusions = reads.combine(Channel.value(file(fusioncatcher_fusions, checkIfExists:true))) | ||
.map { meta, reads, fusions -> [ meta, fusions ] } | ||
} else { | ||
|
||
FUSIONCATCHER_DETECT ( | ||
reads, | ||
fusioncatcher_ref | ||
) | ||
ch_fusioncatcher_fusions = FUSIONCATCHER_DETECT.out.fusions | ||
ch_versions = ch_versions.mix(FUSIONCATCHER_DETECT.out.versions) | ||
} | ||
} | ||
else { | ||
ch_fusioncatcher_fusions = reads.combine(Channel.value(file(ch_dummy_file, checkIfExists:true))) | ||
.map { meta, reads, fusions -> [ meta, fusions ] } | ||
} | ||
|
||
emit: | ||
fusions = ch_fusioncatcher_fusions // channel [ meta, fusions ] | ||
versions = ch_versions // channel [ versions ] | ||
} | ||
|
66 changes: 66 additions & 0 deletions
66
subworkflows/local/fusioncatcher_workflow/tests/main.nf.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Subworkflow FUSIONCATCHER_WORKFLOW" | ||
script "../main.nf" | ||
workflow "FUSIONCATCHER_WORKFLOW" | ||
tag "subworkflow" | ||
tag "fusioncatcher" | ||
tag "fusioncatcher/build" | ||
tag "fusioncatcher/detect" | ||
|
||
// Test | ||
test("FUSIONCATCHER_WORKFLOW - Homo sapiens - FASTQs chr4") { | ||
|
||
setup { | ||
// Download reference files for fusioncatch | ||
run("FUSIONCATCHER_BUILD") { | ||
script "../../../../modules/local/fusioncatcher/build/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.value('46') | ||
""" | ||
} | ||
} | ||
} | ||
|
||
// TODO: get smaller reference files for fusioncatcher | ||
when { | ||
workflow { | ||
""" | ||
// ch_reads | ||
input[0] = Channel.of( | ||
[ | ||
[ id: "test_fastqs", single_end: false ], | ||
[ | ||
file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_1.fq.gz", checkIfExists: true), | ||
file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_2.fq.gz", checkIfExists: true) | ||
] | ||
] ) | ||
// ch_references | ||
input[1] = FUSIONCATCHER_BUILD.out.reference | ||
// fusioncatcher (boolean) | ||
input[2] = true | ||
// all (boolean) | ||
input[3] = true | ||
// fusioninspector_only (boolean) | ||
input[4] = false | ||
// fusioncatcher_fusions (string path) | ||
input[5] = null | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(workflow.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
subworkflows/local/fusioncatcher_workflow/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"FUSIONCATCHER_WORKFLOW - Homo sapiens - FASTQs chr4": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_fastqs", | ||
"single_end": false | ||
}, | ||
"test_fastqs.fusioncatcher.fusion-genes.txt:md5,c826a24c49abfcec8164c478e1e74892" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,05bd93a243728a293211ce52e5f97282" | ||
], | ||
"fusions": [ | ||
[ | ||
{ | ||
"id": "test_fastqs", | ||
"single_end": false | ||
}, | ||
"test_fastqs.fusioncatcher.fusion-genes.txt:md5,c826a24c49abfcec8164c478e1e74892" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,05bd93a243728a293211ce52e5f97282" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-03T19:29:54.767628" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ process { | |
resourceLimits = [ | ||
cpus: 4, | ||
memory: '15.GB', | ||
time: '1.h' | ||
time: '4.h' | ||
] | ||
} |
Oops, something went wrong.