Skip to content

The sdrf file check for 'sdrf' in the filename seems arbitrary #585

@fabianegli

Description

@fabianegli

The sdrf file check for 'sdrf' in the filename seems arbitrary:

if (input_file.toString().toLowerCase().contains("sdrf")) {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions