nextflow-io / nextflow-io/nf-schema
Feature request: `samplesheetToMaps` function
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 57
- Forks
- 31
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 1
Description
Sometimes, it would be useful to parse a samplesheet and return a key-val pair instead of a list of tuples as is returned by samplesheetToList. We could add a samplesheetToMaps function which returns a list of key-val pairs.
name,language,greeting
adam,english,hello
geraldine,french,bonjour
samplesheetToList('greetings.csv')
[
[ 'adam', 'english', 'hello' ],
[ 'geraldine', 'french', 'bonjour' ]
]
samplesheetToMap('greetings.csv')
[
[ name: 'adam', language: 'english', greeting: 'hello' ],
[ name: 'geraldine', language: 'french', greeting: 'bonjour']
]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing samplesheetToList function and reading how it parses the CSV examples shown in the issue. Add the requested map-returning counterpart, resolve the samplesheetToMap versus samplesheetToMaps naming, and verify that each row uses the header names as keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100