sourmash-bio / sourmash_plugin_containment_search

An improved `search --containment` for sourmash
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

can only intersect flat MinHash objects #13

Closed AnneliektH closed 9 months ago

AnneliektH commented 9 months ago

When using a query signature that was abundance sketched I get following error:

== This is sourmash version 4.8.4. ==
== Please cite Brown and Irber (2016), doi:10.21105/joss.00027. ==

Loaded 15664 query signatures.
Traceback (most recent call last):
  File "/home/amhorst/mambaforge/envs/sourmash/bin/sourmash", line 11, in <module>
    sys.exit(main())
  File "/home/amhorst/mambaforge/envs/sourmash/lib/python3.10/site-packages/sourmash/__main__.py", line 19, in main
    retval = mainmethod(args)
  File "/home/amhorst/mambaforge/envs/sourmash/lib/python3.10/site-packages/sourmash_plugin_containment_search.py", line 112, in main
    return mg_many_search(args.queries, args.against,
  File "/home/amhorst/mambaforge/envs/sourmash/lib/python3.10/site-packages/sourmash_plugin_containment_search.py", line 290, in mg_many_search
    results_d = _search_metag(query_ss, metag_filename, ksize,
  File "/home/amhorst/mambaforge/envs/sourmash/lib/python3.10/site-packages/sourmash_plugin_containment_search.py", line 390, in _search_metag
    intersect_mh = query_mh.intersection(flat_metag) # CTB: redundant?
  File "/home/amhorst/mambaforge/envs/sourmash/lib/python3.10/site-packages/sourmash/minhash.py", line 889, in intersection
    raise TypeError("can only intersect flat MinHash objects")
TypeError: can only intersect flat MinHash objects
ctb commented 9 months ago

I know what must be happening but I'm having a tough time replicating it!

Could you please paste in the command line, as well as the results of sourmash sig summarize on the query and against sigs? thank you :)

ctb commented 9 months ago

Figured it out! Fixed by #14.

ctb commented 9 months ago

fix released in v0.4.2.