The sdrf file check for 'sdrf' in the filename seems arbitrary
The sdrf file check for 'sdrf' in the filename seems arbitrary:
https://github.com/bigbio/quantms/blob/e516ddca04a2ff9eedae1df951995b8793c82c62/subworkflows/local/input_check/main.nf#L15
This means the input file name without 'sdrf' fails, even when the file is a valid SDRF file. E.g.
% nextflow run bigbio/quantms input_file.csv
N E X T F L O W ~ version 25.04.7
Launching `https://github.com/bigbio/quantms` [cheeky_boyd] DSL2 - revision: e516ddca04 [master]
ERROR ~ Argument of `file` function cannot be null
-- Check script '/Users/eglif/.nextflow/assets/bigbio/quantms/workflows/quantms.nf' at line: 45 or see '.nextflow.log' file for more details
On the other hand the workflow seems to succeed, even if a non-existent file is supplied.
eglif@mbpm4 d01e87b997b84c985868204b1ed26749902fd7f9_data % nextflow run bigbio/quantms --input input_file.csv
N E X T F L O W ~ version 25.04.7
Launching `https://github.com/bigbio/quantms` [scruffy_liskov] DSL2 - revision: e516ddca04 [master]
ERROR ~ If no SDRF was given, specifying --labelling_type and --acquisition_method is mandatory.
-- Check '.nextflow.log' file for details
Also note, that the file extension is not 'sdrf.tsv' as one would reasonably expect but the SDRF spec does not set hard restrictions on the file name. See https://github.com/bigbio/proteomics-sample-metadata/blame/4e0fd5e91a5f7aa8752f6613a835fcc28ecdec16/sdrf-proteomics/README.adoc#L140. The file name should probably not be used as an input validity check. Instead, I propose to simply validate the file with sdrf-pipelines.
I actually think that part of the code checks if we have an sdrf vs the also supported openms-specific design which is also a csv format.
Either we drop support for the simpler design or we need to check the contents very carefully and decide based on that.
Or we leave it like this.