nf-schema has a `samplesheetToList` method but doe...
# nf-schema
a
nf-schema has a
samplesheetToList
method but doesn't seem to have a
samplesheetToMap
equivalent so I can save the column names and contents as key-val pairs. What's the best way of hacking this together now?
n
I was thinking about something like this yesterday and it would maybe start to make sense to add this with the upcoming record types in mind. There is no easy way to achieve this for now, or you could just use the built-in nextflow methods for now I guess
a
Feels like a relatively easy win for nf-schema, will raise a feature request for now while I solve my current bug
n
Thank you! 🎉
a
a
I looked into this myself - although rather I wanted a list of maps instead of the list of tuples you currently get. My answer is that whilst it isn't necessarily that hard to implement, there is a bunch of code around
default
and some stuff with conditional schemas which made it decidedly non-trivial to implement in a satisfactorily clean manner and I shelved my work on it.
n
It might be easier to do when record types come along, we'll see 😛
a
It might not be necessary, if the record type is strict enough we could just coerce to the record type.
n
Yeah that's what I was thinking too!
We might even be able to completely remove the schema of the samplesheet this way (which would make things a lot easier)
nod yes 1