Skip to content

Commit

Permalink
Publish SR output in {meta.id}/spaceranger/outs
Browse files Browse the repository at this point in the history
Publish Space Ranger count output in `{meta.id}/spaceranger/outs`
instead of just `{meta.id}/outs`, which adheres better to the
"results/{software}" strategy for other modules.

This was hard-coded in the Space Ranger module as `{meta.id}/outs`. This
commit achieves the change by modifying the module code to instead be
just `outs`, so that the exact publishDir may be specified in
`modules.config` as `${params.outdir}/{meta.id}/spaceranger` instead.
This did not work before, as modifying `modules.config` could just add
paths on top of the already hard-coded `${params.outdir}/{meta.id}/outs`
module publishDir.

A PR with these changes will be submitted to the modules repo.
  • Loading branch information
fasterius committed Jan 3, 2024
1 parent 7225543 commit 70726cd
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 9 deletions.
4 changes: 1 addition & 3 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ process {

withName: SPACERANGER_COUNT {
publishDir = [
// NOTE: the sample name is already included in the path that's getting published.
// This publishDir directive puts spaceranger outputs in results/${meta.id}/outs
path: { "${params.outdir}" },
path: { "${params.outdir}/${meta.id}/spaceranger" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down
3 changes: 2 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"spaceranger/count": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
"installed_by": ["modules"],
"patch": "modules/nf-core/spaceranger/count/spaceranger-count.diff"
},
"untar": {
"branch": "master",
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/spaceranger/count/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/spaceranger/count/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions modules/nf-core/spaceranger/count/spaceranger-count.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 70726cd

Please sign in to comment.