Some thought while being distracted during a talk:...
# team-maintainers
n
Some thought while being distracted during a talk: when record types will be introduced we could make a small collection of often used records (like versions) and offer them like we already do with modules and subworkflows
👍 2
e
Had the same thought...something like shared classes
library* of Classes
n
Yeah exactly!
e
Already told Ben during the Barcelona hackathon
n
Awesome! Yeah it will be possible to include records
r
That would be great, I wonder how well this will work in practice since most modules have different input interface.
n
Yes we would need to really think about it, but it could help increase our standardization
But versions seems like a no brainer for that to start with
p
Yeah we have talked about this since the original planning discussions, eg. via an nf-core plugin or something: importing shared record types
n
Interesting! I'm looking forward to testing this out
a
I haven't given them a thorough go yet, but record types will also work like interfaces right? So each module could have its own record(s) defining inputs, then any record which matches it would work. For example:
Copy code
struct FastqcInput {
    id: String
    read_1: Reads
    read_2: Reads
}

process FASTQC {
    input:
    sample_input: FastqcInput
    ...
}
This will work in FASTQC, even though it's not technically a
FastqcInput
object!
Copy code
// This will work in FASTQC, even though it's not technically a 
myData = myPipelineCustomStruct(
    id: "sample1",
    read_1: reads1,
    read_2: reads2,
    tumor: true,
    timepoint: 1.h
)

FASTQC(myCustomStruct)