chengsly / DeepMicroClass

Other
24 stars 2 forks source link

predict.py fails with "TypeError: unsupported operand type" for length parameter #2

Closed johnbullard-uf closed 2 years ago

johnbullard-uf commented 2 years ago

https://github.com/chengsly/DeepMicrobeFinder/blob/7d05b2c0055ec3a8fbf8766fa7213d0ef70b46e1/predict.py#L19

The "length" parameter in the above referenced line is set to type="string" which causes failures in the predict_single() function when it tries to use that string for math functions:

Step 2/3: Encode and predict...
Traceback (most recent call last):
  File "/apps/deepmicrobefinder/20210731/repo/predict.py", line 203, in <module>
    score = predict_single(seq, options.modelLength)
  File "/apps/deepmicrobefinder/20210731/repo/predict.py", line 149, in predict_single
    count_iter = seqLength / length
TypeError: unsupported operand type(s) for /: 'int' and 'str'

The length parameter should be set to type="int".

chengsly commented 2 years ago

fixed in latest commit for predict.py