Coder Social home page Coder Social logo

Comments (13)

ar0ch avatar ar0ch commented on July 23, 2024

Hi Mike,

There's is an oddball bug in Python in early version of Python 2.7 (2.7.x < 2.7.5 if memory serves). What version of Python 2.7 are you running (python --version will tell you)?

from stringmlst.

mikeyweigand avatar mikeyweigand commented on July 23, 2024

Thanks. I get this error with Python 2.7.6; and a similar error with Python 3.4.3.

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

I'll take a look this week

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

I haven't forgotten about this issue Mike, just haven't had the time to look at it yet. I'm sorry for the wait! 😞

from stringmlst.

garfinjm avatar garfinjm commented on July 23, 2024

Hello,

I am encountering the same issue with python 2.7.12 and 3.5.2, working in a docker container based on ubuntu:xenial. I get the same error with the Neisseria test dataset and a Salmonella enterica dataset.

I am using the suggested samtools/bedtools/bwa versions.

For Neisseria I tried:

stringMLST.py --predict -1 tests/fastqs/ERR026529_1.fastq.gz -2 tests/fastqs/ERR026529_2.fastq.gz --prefix Nm -k 35 --coverage --config datasets/Neisseria_spp/neisseria_config.txt -o testingout

and my error looks like:

Traceback (most recent call last):
  File "/stringMLST/stringMLST.py", line 1613, in <module>
    getCoverage(results)
  File "/stringMLST/stringMLST.py", line 790, in getCoverage
    allele = gene+'_'+re.sub("*", "", str(results[sample][gene]))
  File "/usr/lib/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib/python2.7/re.py", line 251, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat

Let me know if there is anything you want me to try. Thanks!

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

Alright...I'll carve out some time during the begining of January to finally squash this bug. It's been around long enough and I should really fix it.

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

Alrighty, this bug should be fixed now. I missed escaping the "*" in the re.sub statement on line 790 while refactoring code .

python2 --version;python2 ./stringMLST.py --predict -d tests/fastqs -P neisseria/nmb --coverage --config neisseria/nmb_config.txt; python3 --version; python3 ./stringMLST.py --predict -d tests/fastqs -P neisseria/nmb --coverage --config neisseria/nmb_config.txt

Python 2.7.11
Sample  abcZ    adk     aroE    fumC    gdh     pdhC    pgm  ST
ERR027250       581 (100.00)    408 (99.35)     655 (91.63)  602 (92.47)        633 (99.60)     612 (100.00)    632 (97.33)     10252
ERR026529       231 (100.00)    180 (100.00)    306 (100.00) 612 (100.00)       269 (100.00)    277 (100.00)    260 (99.78)     10174
ERR036104       2 (100.00)      3 (100.00)      4 (100.00)   3 (100.00) 8 (100.00)      4 (100.00)      6 (100.00)      11

Python 3.6.3 :: Anaconda custom (64-bit)
Sample  abcZ    adk     aroE    fumC    gdh     pdhC    pgm  ST
ERR026529       231 (100.00)    180 (100.00)    306 (100.00) 612 (100.00)       269 (100.00)    277 (100.00)    260 (99.78)     10174
ERR027250       581 (100.00)    408 (99.35)     655 (91.63)  602 (92.47)        633 (99.60)     612 (100.00)    632 (97.33)     10252
ERR036104       2 (100.00)      3 (100.00)      4 (100.00)   3 (100.00) 8 (100.00)      4 (100.00)      6 (100.00)      11


And this also has made me realize why #36 is happening... So hopefully I'll get that fixed today as well

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

@mikeyweigand @garfinjm Does the update from last week (you can update via pip if you want) solve this for you?

from stringmlst.

garfinjm avatar garfinjm commented on July 23, 2024

Works perfect for me with the Neisseria test dataset.

Thanks for the fix!

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

Great! 😄

from stringmlst.

garfinjm avatar garfinjm commented on July 23, 2024

Sorry to reopen this one, could you do 0.5.2 release on github? For validation purposes, I would like to have a static release to put in my dockerfile, but I am getting an error with pip3:

root@3510db9e948f:/stringMLST-0.5.2# pip3 install stringMLST
Collecting stringMLST
  Using cached https://files.pythonhosted.org/packages/c0/15/beb76e4fcbc196862812c4ad08f86ca1ace2d67424eeb02d257309deaa37/stringMLST-0.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-u7exvti2/stringMLST/setup.py", line 9, in <module>
        with open("README.md", "r") as fh:
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

Thanks again for all your help with this, let me know if you want any more debugging info from my attempts with pip.

from stringmlst.

ar0ch avatar ar0ch commented on July 23, 2024

Done! https://github.com/jordanlab/stringMLST/releases/tag/0.5.2

I'll track down that pip error and put out a new pip bundle

from stringmlst.

garfinjm avatar garfinjm commented on July 23, 2024

Working perfect now. Thanks for your help!

from stringmlst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.