Skip to content

Commit

Permalink
add paths in output directive in cellranger cout module (nf-core#5108)
Browse files Browse the repository at this point in the history
* add paths in output directive

* update meta.yml

* add stub file generation

* also create fake files in new stub

* update stub snaps as new output channels are now emitted
  • Loading branch information
fmalmeida authored and tucano committed Mar 20, 2024
1 parent c568bbd commit ddade10
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
10 changes: 8 additions & 2 deletions modules/nf-core/cellranger/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ process CELLRANGER_COUNT {
path reference

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

when:
task.ext.when == null || task.ext.when
Expand All @@ -32,7 +34,11 @@ process CELLRANGER_COUNT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p "${prefix}/outs/"
mkdir -p "${prefix}/outs/filtered_feature_bc_matrix"
mkdir -p "${prefix}/outs/raw_feature_bc_matrix"
echo "$prefix" > ${prefix}/outs/fake_file.txt
echo "$prefix" > ${prefix}/outs/filtered_feature_bc_matrix/fake_file.txt
echo "$prefix" > ${prefix}/outs/raw_feature_bc_matrix/fake_file.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 8 additions & 0 deletions modules/nf-core/cellranger/count/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ output:
type: file
description: Files containing the outputs of Cell Ranger, see official 10X Genomics documentation for a complete list
pattern: "${meta.id}/outs/*"
- filtered:
type: file
description: Files containing the filtered outputs of Cell Ranger.
pattern: "**/outs/filtered_feature_bc_matrix**"
- raw:
type: file
description: Files containing the raw outputs of Cell Ranger.
pattern: "**/outs/raw_feature_bc_matrix**"
- versions:
type: file
description: File containing software version
Expand Down
52 changes: 50 additions & 2 deletions modules/nf-core/cellranger/count/tests/main.nf.test.snap

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

0 comments on commit ddade10

Please sign in to comment.