Skip to content

Commit

Permalink
Hopeful fix for mirtrace casting & staging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
apeltzer committed Apr 3, 2024
1 parent d5910ec commit cae7dae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## v2.3.1 - XXXX-XX-XX- Gray Zinc Dalmation Patch

- [[#328]](https://github.com/nf-core/smrnaseq/pull/328) - Fix [casting issue](https://github.com/nf-core/smrnaseq/issues/327) in mirtrace module
- [[#331]](https://github.com/nf-core/smrnaseq/pull/331) - Final fix for [casting issue](https://github.com/nf-core/smrnaseq/issues/327) in mirtrace module

### Software dependencies

Expand Down
8 changes: 6 additions & 2 deletions modules/local/mirtrace.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ process MIRTRACE_RUN {
'biocontainers/mirtrace:1.0.1--hdfd78af_1' }"

input:
tuple val(adapter), val(ids), val(reads)
tuple val(adapter), val(ids), path(reads)

output:
path "mirtrace/*" , emit: mirtrace
Expand All @@ -25,9 +25,13 @@ process MIRTRACE_RUN {
tmem = task.memory.toBytes()
java_mem = "-Xms${tmem} -Xmx${tmem}"
}

//Staging the files as path() but then getting the filenames for the config file that mirtrace needs
//Directly using val(reads) as in previous versions is not reliable as staging between work directories is not 100% reliable if not explicitly defined via nextflow itself
def config_lines = [ids,reads]
.transpose()
.collect({ id, path -> "echo '${path},${id}' >> mirtrace_config" })
.collect({ id, path -> path.getFileName().toString()})

"""
export mirtracejar=\$(dirname \$(which mirtrace))
Expand Down

0 comments on commit cae7dae

Please sign in to comment.