cio-abcd / variantinterpretation

Collaborative Interpretation-Pipeline workflow based on nf-core pipeline structure
MIT License
7 stars 1 forks source link

csv.Sniffer.has_header isnt reliable #11

Closed feiloo closed 1 year ago

feiloo commented 1 year ago

Description of the bug

the samplesheet.csv files contain only paths. pythons cs.Sniffer.has_header can fail because its only a heuristic. this causes the pipeline to fail if there are no numeric looking values in the csv. it happened during my testing

see this line and python csv module documentation

we can probably just replace/remove the check

Command used and terminal output

No response

Relevant files

No response

System information

No response

biolancer commented 1 year ago

Yes, sounds reasonable. Commenting out the lines 112 to 134 of check_samplesheet.py and changing

reader = csv.DictReader(in_handle, dialect=sniff_format(in_handle)) to

reader = csv.DictReader(in_handle)

fixes the problem. It's a rather dirty bugfix by removing the function, we should consider defining the header columns to check for as soon as we have a more complete samplesheet.