Skip to content

Commit

Permalink
Merge pull request #581 from nf-core/fix_fusionreport
Browse files Browse the repository at this point in the history
Fix FUSIONREPORT_DOWNLOAD: remove double nested folder
  • Loading branch information
rannick authored Dec 10, 2024
2 parents cc5d4b9 + 87f5ff8 commit 1ae795e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add nf-test to local module: `FUSIONREPORT_DOWNLOAD` [#560](https://github.com/nf-core/rnafusion/pull/560)
- Add nf-test to local subworkflow: `QC_WORKFLOW` [#568](https://github.com/nf-core/rnafusion/pull/568)
- Add nf-test to local subworkflow: `TRIM_WORKFLOW` [#572](https://github.com/nf-core/rnafusion/pull/572)
- Add nf-test to local module: `FUSIONREPORT_DETECT`. Improve `FUSIONREPORT_DOWNLOAD` module [#572](https://github.com/nf-core/rnafusion/pull/577)
- Add nf-test to local module: `FUSIONREPORT_DETECT`. Improve `FUSIONREPORT_DOWNLOAD` module [#577](https://github.com/nf-core/rnafusion/pull/577)

### Changed

- Updated modules and migrated non-specific modules to nf-core/modules [#484](https://github.com/nf-core/rnafusion/pull/484)
- Updated to nf-core/tools 3.0.2 [#504](https://github.com/nf-core/rnafusion/pull/504)
- Remove local module `RRNA_TRANSCRIPTS` (replaced by nf-core module) [#541](https://github.com/nf-core/rnafusion/pull/541)
- Allow fastq files without a dot before .fn(.gz)/.fastq(.gz) files [#548](https://github.com/nf-core/rnafusion/pull/548)
- Remove double nested folder introduced in [#577](https://github.com/nf-core/rnafusion/pull/577), [#581](https://github.com/nf-core/rnafusion/pull/581)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ process {
ext.args = { {params.no_cosmic} ? "--no-cosmic" : " --cosmic_usr ${params.cosmic_username} --cosmic_passwd ${params.cosmic_passwd}" }
ext.args2 = { params.qiagen ? "--qiagen" : "" }
publishDir = [
path: { "${params.genomes_base}/fusion_report_db" },
path: { "${params.genomes_base}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down
5 changes: 2 additions & 3 deletions modules/local/fusionreport/detect/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ nextflow_process {
file("https://github.com/Clinical-Genomics/fusion-report/raw/master/tests/test_data/fusioncatcher.txt")
]
input[1] = FUSIONREPORT_DOWNLOAD.out.fusionreport_db
input[1] = FUSIONREPORT_DOWNLOAD.out.fusionreport_ref
input[2] = 1
"""
}
Expand Down Expand Up @@ -91,7 +90,7 @@ nextflow_process {
file("https://github.com/Clinical-Genomics/fusion-report/raw/master/tests/test_data/fusioncatcher.txt")
]
input[1] = FUSIONREPORT_DOWNLOAD.out.fusionreport_db
input[1] = FUSIONREPORT_DOWNLOAD.out.fusionreport_ref
input[2] = 1
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/fusionreport/detect/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-06T13:12:32.981394201"
"timestamp": "2024-12-10T15:13:58.414161"
}
}
22 changes: 11 additions & 11 deletions modules/local/fusionreport/download/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ process FUSIONREPORT_DOWNLOAD {
container "docker.io/clinicalgenomics/fusion-report:3.1.0"

output:
tuple val(meta), path("fusionreport_dbs"), emit: fusionreport_db
tuple val(meta), path("fusion_report_db"), emit: fusionreport_ref
path "versions.yml" , emit: versions

script:
meta = [id: 'fusionreport_dbs']
meta = [id: 'fusion_report_db']
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
"""
fusion_report download $args ./
mkdir fusionreport_dbs
mv *.txt *.log *.db fusionreport_dbs
mkdir fusion_report_db
mv *.txt *.log *.db fusion_report_db/
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -25,14 +25,14 @@ process FUSIONREPORT_DOWNLOAD {
"""

stub:
meta = [id: 'fusionreport_dbs']
meta = [id: 'fusion_report_db']
"""
mkdir fusionreport_dbs
touch fusionreport_dbs/cosmic.db
touch fusionreport_dbs/fusiongdb2.db
touch fusionreport_dbs/mitelman.db
touch fusionreport_dbs/DB-timestamp.txt
touch fusionreport_dbs/fusion_report.log
mkdir fusion_report_db
touch fusion_report_db/cosmic.db
touch fusion_report_db/fusiongdb2.db
touch fusion_report_db/mitelman.db
touch fusion_report_db/DB-timestamp.txt
touch fusion_report_db/fusion_report.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 4 additions & 4 deletions modules/local/fusionreport/download/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.fusionreport_db[0][1]).resolve("fusiongdb2.db"),
path(process.out.fusionreport_db[0][1]).resolve("mitelman.db"),
path(process.out.fusionreport_db[0][1]).resolve("DB-timestamp.txt").exists(),
path(process.out.fusionreport_db[0][1]).resolve("fusion_report.log").exists(),
path(process.out.fusionreport_ref[0][1]).resolve("fusiongdb2.db"),
path(process.out.fusionreport_ref[0][1]).resolve("mitelman.db"),
path(process.out.fusionreport_ref[0][1]).resolve("DB-timestamp.txt").exists(),
path(process.out.fusionreport_ref[0][1]).resolve("fusion_report.log").exists(),
process.out.versions
).match() }
)
Expand Down
8 changes: 4 additions & 4 deletions modules/local/fusionreport/download/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"0": [
[
{
"id": "fusionreport_dbs"
"id": "fusion_report_db"
},
[
"DB-timestamp.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
Expand All @@ -35,10 +35,10 @@
"1": [
"versions.yml:md5,fa5f13c563f431912048c1802b5a0c74"
],
"fusionreport_db": [
"fusionreport_ref": [
[
{
"id": "fusionreport_dbs"
"id": "fusion_report_db"
},
[
"DB-timestamp.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
Expand All @@ -58,6 +58,6 @@
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-05T19:35:49.629287874"
"timestamp": "2024-12-10T15:05:22.781845"
}
}

0 comments on commit 1ae795e

Please sign in to comment.