Wotplot

Latest version: v0.4.0

Safety actively analyzes 701786 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.0

New features

- Added the `s1_name` and `s2_name` parameters to `viz_imshow()` and `viz_spy()` ([17](https://github.com/fedarko/wotplot/issues/17)).

- You can use these parameters to adjust the sequence name shown on the x or y axis, respectively.

Performance

- Updated the default algorithm for finding shared _k_-mers between two strings. Rather than manually iterating through the suffix arrays produced by `pydivsufsort.divsufsort()` to identify shared _k_-mers, we now instead use [`pydivsufsort.common_substrings()`](https://github.com/louisabraham/pydivsufsort/issues/42) -- which accomplishes the same thing much faster.

- For example, creating a dot plot of two random 1 Mbp sequences (using _k_ = 20) takes **26.52 seconds** (max memory usage 563.09 MiB) using the old method and **2.16 seconds** (max memory usage 617.53 MiB) using the new method.

- The new method does have higher memory usage for long sequences -- to the point where some test cases crash Jupyter Notebook with the new method, but succeed (albeit after taking a long time) with the old method. If desired, you can choose to use the old method ("suff-only") by passing `suff_only=True` to the `DotPlotMatrix()` constructor.

- When using the old shared-_k_-mer-finding method ("suff-only") and creating a self dot plot (i.e. comparing a sequence with itself), wotplot will now detect if the sequences are identical and reuse the sequence's suffix array (rather than unnecessarily creating the same suffix array twice).

- Note that there are still other, more dramatic ways to speed up the creation of self dot plots; this is a relatively small improvement.

Maintenance

- **Breaking change:** Removed the `binary` parameter of the `DotPlotMatrix()` constructor.

- Now, all matrices are "not binary" by default. If you want to visualize a matrix in a binary way, you can now set `binary=True` when calling `viz_imshow()` or `viz_spy()` (this is analogous to the `force_binary` parameter in wotplot 0.3.0). Matrix visualization defaults to visualizing the matrix in color.

- This change was motivated by benchmarking -- making the matrix "not binary" didn't seem to impact construction speed. It does impact visualization speed slightly, but the effects of this can be (entirely, I think?) offset by using `binary=True` during visualization.

- Sorry for the breaking change. I think this makes the interface a lot more natural to use.

- Abstracted code from the benchmarking notebook to a separate file in the `docs/` folder, and tried to tidy it up.

- Restructured and tested the SciPy version checking code.

- Additional tests.

- Added [`pytest-mock`](https://github.com/pytest-dev/pytest-mock) as a development dependency.

Bug fixes

- Fixed a bug where, if every single cell in the dot plot matrix was a match cell, the resulting dot plot would be empty ([19](https://github.com/fedarko/wotplot/issues/19)).

Documentation

- Add better documentation to `wotplot._make._get_row()` and `wotplot._make._make()`.

- Various updates to the README, tutorial notebook, and benchmarking notebook.

- The tutorial now includes a more complex example of creating a grid of dot plots. The example (shown below) creates a grid figure comparing all pairs of sequences with each other.

Fancy screenshot of a grid of dot plots from the tutorial

![grid](https://github.com/user-attachments/assets/eba7e256-6f37-4c0d-bb6d-fab7e8d56491)

0.3.0

New features

- Added the ability to visualize not-binary matrices in color using `viz_spy()` (11).
- In support of this new feature: added the `force_binary`, `nbcmap`, and `draw_order` parameters to `viz_spy()`.

- Added `verbose` parameters to `viz_spy()` and `viz_imshow()`.

Documentation

- Various updates to the README, tutorial, and benchmarking notebooks.
- Fixed the docstring of `wotplot._make._fill_match_cells()`.
- Small improvements to the docstring of `wotplot.viz_spy()`.

Maintenance

- Added more tests (mostly focusing on checking the visualization functions' `verbose` logging).
- Various small code improvements (abstracting repeated bits of code, etc.)

Fancy screenshot of a large multicolor dotplot matrix

![image](https://github.com/fedarko/wotplot/assets/4177727/b520f3f0-f2c1-4a47-8282-632d5383438a)

0.2.0

Documentation

- Various improvements and updates to the README and notebooks.

Performance

- Used the method proposed at https://bioinformatics.stackexchange.com/a/3585 to speed up and simplify the internal function used for reverse-complementing.

0.1.0

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.