stephensolis / kameris

A fast, user-friendly analysis and evaluation toolkit for some DNA sequence classification tasks
MIT License
14 stars 4 forks source link

failing in running kameris with mac #4

Closed mavino closed 5 years ago

mavino commented 5 years ago
kameris classify hiv1-mlp hiv1-genomes
INFO     retrieving 'https://raw.githubusercontent.com/stephensolis/kameris-experiments/master/files.yml'
/Users/Lab/anaconda/lib/python2.7/site-packages/urllib3/util/ssl_.py:354: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
INFO     file 'https://raw.githubusercontent.com/stephensolis/kameris-experiments/master/models/hiv1-mlp-py2.mm-model' already downloaded, using cached version
INFO     started loading model
INFO     finished loading model in 0.01 seconds
INFO     started computing input CGRs
INFO     running command ""/Users/Lab/anaconda/lib/python2.7/site-packages/kameris/scripts/generation_cgr_mac_avx2" cgr "hiv1-genomes" "/var/folders/5p/mvgcw45d5rs13x2hr3k59nlw0000gn/T/tmpFkwgSm/cgrs.mm-repr" 6 16"
INFO     5 files, using 8 threads
INFO     20% [======>                            ] 1/5 ETA:0s
INFO     started frequency-normalizing CGRs
ERROR    an unexpected error occurred: TypeError: Struct() argument 1 must be string, not unicode
ERROR    ***if you believe this is a bug, please report it at https://github.com/stephensolis/kameris/issues and include ALL the following text:***
Traceback (most recent call last):
  File "/Users/Lab/anaconda/lib/python2.7/site-packages/kameris/__main__.py", line 41, in main
    run_module.run(args)
  File "/Users/Lab/anaconda/lib/python2.7/site-packages/kameris/subcommands/classify.py", line 48, in run
    backend.run_backend_kmers(options, {})
  File "/Users/Lab/anaconda/lib/python2.7/site-packages/kameris/job_steps/backend.py", line 45, in run_backend_kmers
    reader = kameris_formats.repr_reader(options['output_file'])
  File "/Users/Lab/anaconda/lib/python2.7/site-packages/kameris_formats/repr_reader.py", line 27, in __init__
    self.count, = struct.unpack('<Q', self.file.read(8))
TypeError: Struct() argument 1 must be string, not unicode
stephensolis commented 5 years ago

Should be fixed with https://github.com/stephensolis/kameris-formats/commit/24a120d0ba7ee3f146c72988f7c08ff94ccc4f06

Run pip install --upgrade kameris-formats and it should work.