bioinfo-ut / PhenotypeSeeker

Identify phenotype-specific k-mers and predict phenotype using sequenced bacterial strains
GNU General Public License v3.0
18 stars 10 forks source link

SyntaxError in modeling.py #8

Closed thkuo closed 4 years ago

thkuo commented 5 years ago

When finishing the installation, the command ~/.local/bin/phenotypeseeker --version returned

Traceback (most recent call last):
  File "/home/thkuo/.local/bin/phenotypeseeker", line 12, in <module>
    from PhenotypeSeeker import modeling, prediction
  File "/home/thkuo/.local/lib/python2.7/site-packages/PhenotypeSeeker/modeling.py", line 924
    'bootstrap' = [True, False]
                ^
SyntaxError: invalid syntax

Could you help to fix the script?

thkuo commented 5 years ago

I tried solving the above one by myself but then got another when testing it with the example dataset:

Traceback (most recent call last):
  File "/home/thkuo/.local/bin/phenotypeseeker", line 280, in <module>
    Main()
  File "/home/thkuo/.local/bin/phenotypeseeker", line 274, in Main
    args.func(args)
  File "/home/thkuo/.local/lib/python2.7/site-packages/PhenotypeSeeker/modeling.py", line 1476, in modeling
    lambda x: x.get_kmer_lists(), Input.samples.values()
  File "/home/thkuo/.local/lib/python2.7/site-packages/multiprocess/pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/home/thkuo/.local/lib/python2.7/site-packages/multiprocess/pool.py", line 572, in get
    raise self._value
cPickle.PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed

Would the two be independent?

erkiaun commented 4 years ago

These two errors were independent.

Multiprocess module shouldn't use cPickle, thereby it seems that building multiprocess module has failed, probably because you were missing C compiler in your environment.

I now have upgraded PhenotypeSeeker to use Python3. For python 3.3 and above, a C compiler is suggested, but not required to install the multiprocess module.