Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

When parsing samplesheets, group values into ordered lists #81

Closed
adamrtalbot opened this issue Jul 24, 2023 · 3 comments
Closed

When parsing samplesheets, group values into ordered lists #81

adamrtalbot opened this issue Jul 24, 2023 · 3 comments

Comments

@adamrtalbot
Copy link
Collaborator

It's a common pattern in nf-core modules to use an ordered list instead of tuple elements. i.e. instead of:

input:
    tuple val(meta), path(input1), path(input2)

You use:

input:
    tuple val(meta), path(inputs)

We could incorporate some method of parsing the schema to use in .fromSamplesheet, e.g.:

{
    // rest of schema above
    "lists": [
        "fastq_1",
        "fastq_2"
    ]
}

Would coerce to an ordered list, with nullable values not being included.

@adamrtalbot
Copy link
Collaborator Author

@nvnieuwk
Copy link
Collaborator

We concluded adding more examples on how to use .map would be the better solution here instead (https://nfcore.slack.com/archives/C056RQB10LU/p1690214043545869)

@mirpedrol
Copy link
Collaborator

Will close this issue as we added the documentation with #82, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants