Sample Sheets >2048 character give Error: Could not determine delimiter (DSL2)
Description of the bug
When using a particularly large sample sheet the sniff_format function is unable to determine the format of the sample sheet and returns an error. This appears to happen when the size given to handle.read is smaller than the size of the file.
Steps to reproduce
Steps to reproduce the behavior:
- Create a large delimited samplesheet, any delimiter works so long as the samplesheet has more than 2048 characters
- import
check_samplesheet- may need to append its location into yoursys.path - Create a pair of
Pathobjects, one for the sample sheet, one for the file output - Run
check_samplesheet.check_samplesheet(<IN>, <OUT>) - See error:
Error("Could not determine delimiter")
Additional context
Drastically upping the value given to line 147 in check_samplesheet.py fixes this issue.
https://github.com/nf-core/methylseq/blob/acdc4afccf9fd3dd4150fc4963134300cd5d26d7/bin/check_samplesheet.py#L132-L147
This was a bug in the nf-core template and should have been fixed in the latest release of nf-core/tools I believe. As such this should be resolved once https://github.com/nf-core/methylseq/pull/233 is merged 👍🏻
x-ref https://github.com/nf-core/tools/issues/1561 and https://github.com/nf-core/tools/pull/1584