sourmash-bio / sourmash

Quickly search, compare, and analyze genomic and metagenomic data sets.
http://sourmash.readthedocs.io/en/latest/
Other
473 stars 80 forks source link

Python3 dockerfile?? #497

Closed olgabot closed 6 years ago

olgabot commented 6 years ago

The current dockerfile uses Python2.7 and I'd like to use current khmer:master which is not backwards-compatible with Python 2.7. What docker image would you recommend using? I tried building off of the khmer dockerfile here but I get this error with sourmash:

  docker run -it czbiohub/kmer-hashing
main@b7137f242139:/home$ /usr/local/bin/sourmash
Traceback (most recent call last):
  File "/usr/local/bin/sourmash", line 11, in <module>
    load_entry_point('sourmash==2.0.0a7', 'console_scripts', 'sourmash')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/dist-packages/sourmash-2.0.0a7-py3.5-linux-x86_64.egg/sourmash/__init__.py", line 16, in <module>
    from .sbtmh import load_sbt_index, search_sbt_index, create_sbt_index
  File "/usr/local/lib/python3.5/dist-packages/sourmash-2.0.0a7-py3.5-linux-x86_64.egg/sourmash/sbtmh.py", line 7, in <module>
    from .sbt import Leaf, SBT, GraphFactory
  File "/usr/local/lib/python3.5/dist-packages/sourmash-2.0.0a7-py3.5-linux-x86_64.egg/sourmash/sbt.py", line 55, in <module>
    import khmer
  File "/usr/local/lib/python3.5/dist-packages/khmer-3.0.0a1+97.g8279f31d-py3.5-linux-x86_64.egg/khmer/__init__.py", line 67, in <module>
    from khmer._oxli.graphs import (Counttable, QFCounttable, Nodetable,
  File "/usr/local/lib/python3.5/dist-packages/khmer-3.0.0a1+97.g8279f31d-py3.5-linux-x86_64.egg/khmer/_oxli/__init__.py", line 1, in <module>
    from .assembly import LinearAssembler
ImportError: No module named 'khmer._oxli.assembly'
olgabot commented 6 years ago

FYI This dockerfile works for me: https://github.com/czbiohub/kmer-hashing/commit/f27329ea6dd9c5b6b9642eedd4cd9b7581331f3e

luizirber commented 6 years ago

Relevant info: khmer is used in the search and gather subcommands, so if you're using compute and compare the khmer version is not important.

If you are using search/gather, then it's relevant! We are not compatible with khmer master yet (see https://github.com/bioconda/bioconda-recipes/pull/9546 for an example...), but there are discussion on how to best support it (see https://github.com/dib-lab/khmer/issues/1861)