marbl / ModDotPlot

MIT License
101 stars 7 forks source link

ValueError Crash (sequences too small?) #19

Closed bkille closed 3 months ago

bkille commented 3 months ago

Ran ModDotPlot with the yeast reference genome.

moddotplot interactive -f ~/Data/assemblies/yeast-ref/yeast_genome.fna --port 8989

  __  __           _   _____        _     _____  _       _
 |  \/  |         | | |  __ \      | |   |  __ \| |     | |
 | \  / | ___   __| | | |  | | ___ | |_  | |__) | | ___ | |_
 | |\/| |/ _ \ / _` | | |  | |/ _ \| __| |  ___/| |/ _ \| __|
 | |  | | (_) | (_| | | |__| | (_) | |_  | |    | | (_) | |_
 |_|  |_|\___/ \__,_| |_____/ \___/ \__| |_|    |_|\___/ \__|

v0.8.0

...

And ran into the following error:

17 sequences were detected, however interactive mode can only load two sequences at a time.

Interactive mode will proceed with NC_001133.9 and NC_001134.8

Traceback (most recent call last):
  File "/home/Users/blk6/Contribute/ModDotPlot/venv/bin/moddotplot", line 5, in <module>
    from moddotplot.__main__ import main
  File "/home/Users/blk6/Contribute/ModDotPlot/venv/lib/python3.10/site-packages/moddotplot/__main__.py", line 11, in <module>
    sys.exit(main())
  File "/home/Users/blk6/Contribute/ModDotPlot/venv/lib/python3.10/site-packages/moddotplot/moddotplot.py", line 557, in main
    raise ValueError(
ValueError: Minimum window size must be greater than or equal to the modimizer sketch size

Here's the .fai entries for the relevant sequences:

NC_001133.9     230218  76      80      81
NC_001134.8     813184  233249  80      81

I'm guessing these sequences are too short for the default params. Would there be a way for the params to automatically adjust based on the shortest query sequence?

alexsweeten commented 3 months ago

Thanks for the catch. Smaller sized genomes should run in interactive mode without error in v0.8.1