Skip to content

Commit

Permalink
Change Space Ranger count module publishDir (nf-core#4675)
Browse files Browse the repository at this point in the history
* Emit `outs/` directory without sample ID prefix

Emit the `outs/` directory instead of `${meta.id}/outs/`. This allows
pipelines utilising this module to configure the publish directory in
their respective `modules.config` instead of having the sample ID
hard-coded to be included.

This is useful when one would like the output to be something like
`${meta.id}/spaceranger/outs` (i.e. adding optional paths between
`${meta.id}` and `outs/`), as that type of path adheres to the
`results/{SOFTWARE/CONTEXT}/` output pattern commonly used elsewhere in
nf-core.

* Harmonise Space Ranger naming throughout module

* Update test paths

* Update licence formatting

* Add empty `dependencies:` environment entry

* Revert "Add empty `dependencies:` environment entry"

This reverts commit e67a233.

* Remove Conda environment files

Remove the Conda `environment.yml` files, which are not needed as the
module cannot use Conda.
  • Loading branch information
fasterius authored Jan 15, 2024
1 parent a01c66c commit 3bd057b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions modules/nf-core/spaceranger/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ process SPACERANGER_COUNT {
path(probeset)

output:
tuple val(meta), path("**/outs/**"), emit: outs
tuple val(meta), path("outs/**"), emit: outs
path "versions.yml", emit: versions

when:
Expand Down Expand Up @@ -46,6 +46,7 @@ process SPACERANGER_COUNT {
$alignment \\
$slidefile \\
$args
mv ${prefix}/outs outs
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -58,10 +59,9 @@ process SPACERANGER_COUNT {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "SPACERANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p "${prefix}/outs/"
touch ${prefix}/outs/fake_file.txt
mkdir -p outs/
touch outs/fake_file.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/spaceranger/count/meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "spaceranger_count"
description: Module to use the 10x Spaceranger pipeline to proces 10x spatial transcriptomics data
description: Module to use the 10x Space Ranger pipeline to process 10x spatial transcriptomics data
keywords:
- align
- count
Expand Down Expand Up @@ -70,7 +70,7 @@ input:
pattern: "*.json"
- reference:
type: directory
description: Folder containing all the reference indices needed by Spaceranger
description: Folder containing all the reference indices needed by Space Ranger
- probeset:
type: file
description: OPTIONAL - Probe set specification.
Expand All @@ -83,8 +83,8 @@ output:
e.g. [ id:'test', single_end:false ]
- outs:
type: file
description: Files containing the outputs of Cell Ranger, see official 10X Genomics documentation for a complete list
pattern: "${meta.id}/outs/*"
description: Files containing the outputs of Space Ranger, see official 10X Genomics documentation for a complete list
pattern: "outs/*"
- versions:
type: file
description: File containing software versions
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/spaceranger/mkgtf/meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "spaceranger_mkgtf"
description: Module to build a filtered GTF needed by the 10x Genomics Cell Ranger tool. Uses the cellranger mkgtf command.
description: Module to build a filtered GTF needed by the 10x Genomics Space Ranger tool. Uses the spaceranger mkgtf command.
keywords:
- reference
- mkref
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/spaceranger/mkref/meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "spaceranger_mkref"
description: Module to build the reference needed by the 10x Genomics Spaceranger tool. Uses the spaceranger mkref command.
description: Module to build the reference needed by the 10x Genomics Space Ranger tool. Uses the spaceranger mkref command.
keywords:
- reference
- mkref
Expand Down Expand Up @@ -37,7 +37,7 @@ input:
output:
- reference:
type: directory
description: Folder containing all the reference indices needed by Cell Ranger
description: Folder containing all the reference indices needed by Space Ranger
- versions:
type: file
description: File containing software version
Expand Down

0 comments on commit 3bd057b

Please sign in to comment.