methylseq icon indicating copy to clipboard operation
methylseq copied to clipboard

Sample Sheets >2048 character give Error: Could not determine delimiter (DSL2)

Open TheodoreMarkulin opened this issue 3 years ago • 1 comments

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:

  1. Create a large delimited samplesheet, any delimiter works so long as the samplesheet has more than 2048 characters
  2. import check_samplesheet- may need to append its location into your sys.path
  3. Create a pair of Path objects, one for the sample sheet, one for the file output
  4. Run check_samplesheet.check_samplesheet(<IN>, <OUT>)
  5. 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

TheodoreMarkulin avatar May 18 '22 18:05 TheodoreMarkulin

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

ewels avatar May 18 '22 20:05 ewels