Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Allow to use list of globs/file paths when using multi-labelled group…
Browse files Browse the repository at this point in the history
…s in h5ad param

Update related docs
  • Loading branch information
dweemx committed Sep 17, 2020
1 parent 83d6122 commit de1f896
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions docs/pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ In the generated .config file, make sure the ``file_paths`` parameter is set wit

- The ``suffix`` parameter is used to infer the sample name from the file paths (it is removed from the input file path to derive a sample name).

In case there are multiple .h5ad files that need to be processed with different suffixes, the following strategy should be used to define the h5ad param::
In case there are multiple .h5ad files that need to be processed with different suffixes, the multi-labelled strategy should be used to define the h5ad param::

[...]
data {
Expand All @@ -637,7 +637,10 @@ In case there are multiple .h5ad files that need to be processed with different
}
[...]

Note: ``GROUP1``, ``GROUP2`` are just example names here. They can be replaced by any value as long as they are alphanumeric (underscores are allowed).
Notes:

- ``GROUP1``, ``GROUP2`` are just example names here. They can be replaced by any value as long as they are alphanumeric (underscores are allowed).
- ``file_paths`` and ``suffix`` do allow list of paths/globs in the multi-labelled strategy.

----

Expand Down
4 changes: 2 additions & 2 deletions src/channels/channels.nf
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ workflow getDataChannel {
def filePaths = null
def suffix = null
if(!dataH5ad.containsKey("file_paths") && !dataH5ad.containsKey("suffix")) {
filePaths = dataH5ad.collect { k,v -> v["file_paths"] }
suffix = dataH5ad.collect { k,v -> v["suffix"] }
filePaths = dataH5ad.collect { k,v -> v["file_paths"] }.flatten()
suffix = dataH5ad.collect { k,v -> v["suffix"] }.flatten()
} else {
filePaths = dataH5ad.file_paths
suffix = dataH5ad.suffix
Expand Down

0 comments on commit de1f896

Please sign in to comment.