Rike Hanssen
09/02/2025, 12:39 PMfromList : https://github.com/nf-core/sarek/blob/5fe5cdff171e3baed603b3990cab7f7fd3fcb992/subworkflows/local/utils_nfcore_sarek_pipeline/main.nf#L125. What would happen if the two mismatch?Nicolas Vannieuwkerke
09/02/2025, 12:43 PMfromList is the most important one because that one is used to validate the file and convert it to a channel.
So basically the one in the schema is not strictly necessaryRike Hanssen
09/02/2025, 12:45 PMfromList function that says fastq is required, then worst case a samplesheet without fastqs would pass the input validation but fail on the samplesheet reading?Nicolas Vannieuwkerke
09/02/2025, 12:46 PMRike Hanssen
09/02/2025, 12:49 PMNicolas Vannieuwkerke
09/02/2025, 12:51 PMsamplesheetToList function is completely decoupled from the parameters and there is no way to know which parameter is linked to the samplesheetNicolas Vannieuwkerke
09/02/2025, 12:52 PMnf-validation but that made the function very confusing to use so we decided to step away from it (also Ben advised it that way)Adam Talbot
09/02/2025, 12:57 PMmy_samplesheet = Samplesheet(params, schema)
my_samplesheet.validate() // raise error!
my_samplesheet.schema // ./assets/schema.json
my_samplesheet.toList(validate: true)
Channel.fromList(my_samplesheet.toList())Adam Talbot
09/02/2025, 1:00 PMparameters = Parameters(params, schema)
parameters.summaryLog() // print sumamry
<http://parameters.help|parameters.help> // print help string
parameters.toList()
// Validation object
validation = parameters.validation // Validation object
validation.status // bool for validation
validation.errors // array of errorsPhil Ewels
09/02/2025, 1:28 PM.validate() thing)Nicolas Vannieuwkerke
09/02/2025, 1:40 PMNicolas Vannieuwkerke
09/02/2025, 1:40 PM3.0 update of nf-schema 😛, so let's not rush that for nowBen Sherman
09/02/2025, 2:05 PMparams block and record defintions in the code but wouldn't be used directly by the codeNicolas Vannieuwkerke
09/02/2025, 2:08 PMAdam Talbot
09/04/2025, 3:46 PMfromList without accessing it twice?Adam Talbot
09/04/2025, 3:47 PM"input_restart": {
"type": "string",
"description": "Automatic retrieval for restart",
"fa_icon": "fas fa-file-csv",
"format": "file-path",
"exists": true,
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$",
"hidden": true,
"schema": "assets/schema_input.json"
},
samplesheetToList(params.input, "$projectDir/assets/schema_inputs.json")
(note the small change)Nicolas Vannieuwkerke
09/05/2025, 9:06 AMAdam Talbot
09/05/2025, 9:14 AMsamplesheetToList method. Is there a way of enforcing they're the same? Or perhaps accessing the input_restart.schema field in the above example?Nicolas Vannieuwkerke
09/05/2025, 9:16 AMPhil Ewels
09/05/2025, 9:20 AMPhil Ewels
09/05/2025, 9:20 AMsamplesheetToList should be able to take the path from the params schema, no?Nicolas Vannieuwkerke
09/05/2025, 9:20 AMPhil Ewels
09/05/2025, 9:20 AMNicolas Vannieuwkerke
09/05/2025, 9:21 AMsamplesheetToList is not a parameter name, but a value. There is no way to know from what parameter this cameNicolas Vannieuwkerke
09/05/2025, 9:21 AMPhil Ewels
09/05/2025, 9:22 AMNicolas Vannieuwkerke
09/05/2025, 9:23 AMsamplesheetToList but that would just create the same problem. how do you enforce that the value and the parameter name are coming from the same parameterRike Hanssen
09/05/2025, 9:24 AMNicolas Vannieuwkerke
09/05/2025, 9:26 AMAdam Talbot
09/05/2025, 9:39 AMPhil Ewels
09/05/2025, 9:43 AMPhil Ewels
09/05/2025, 9:44 AMPhil Ewels
09/05/2025, 9:44 AMNicolas Vannieuwkerke
09/05/2025, 9:44 AMI'd be happy to help with thatAwesome! I'd love that
Phil Ewels
09/05/2025, 9:45 AMNicolas Vannieuwkerke
09/05/2025, 9:45 AM$schema key in JSON schema. and it would bring us closer to the standard syntax