rhpvorderman / sequali

Fast sequencing data quality metrics
GNU Affero General Public License v3.0
11 stars 0 forks source link

Crash on empty input #64

Closed marcelm closed 10 months ago

marcelm commented 10 months ago

Just testing the edge cases ...

$ touch empty.fastq
$ sequali empty.fastq
Processing empty.fastq: 0.00iB [00:00, ?iB/s]Traceback (most recent call last):
  File ".../.venv/bin/sequali", line 8, in <module>
    sys.exit(main())
  File ".../.venv/lib/python3.10/site-packages/sequali/__main__.py", line 142, in main
    seqtech = guess_sequencing_technology_from_file(file)  # type: ignore
  File ".../.venv/lib/python3.10/site-packages/sequali/util.py", line 117, in guess_sequencing_technology_from_file
    if data[0] == ord("@"):
IndexError: index out of range
Processing empty.fastq: 0.00iB [00:00, ?iB/s]