Git Product home page Git Product logo

py4bio's People

Contributors

basavarajkovi avatar kozo2 avatar manabuishii avatar raionik avatar sbassi avatar virmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py4bio's Issues

muscleserver.py doesn't work

Dear Seulab,

When running muscleserver.py, I got two errors.

  File "muscleserver.py", line 38, in result
    fi_fh.write(sequence)
TypeError: a bytes-like object is required, not 'str'
    % if bad_option:
NameError: name 'bad_option' is not defined

For the latter one, I fixed it by changing "bad_opt" in line 55 to "bad_option".

And for the former one, I changed "fi_fh.write(sequence)" in line 38 to "fi_fh.write(sequence.encode(โ€™utf-8โ€™))" but I'm not sure this is right way.

Could you give me some advice?

protnetcharge2.py does not work

[murphy@eva02 ch4]$ python3 protnetcharge.py 
Enter protein sequence: KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDVQAWIRGCRL
7.736999999999999
[murphy@eva02 ch4]$ python3 protnetcharge2.py 
  File "protnetcharge2.py", line 8
    nd{verbatim}
      ^
SyntaxError: invalid syntax
[murphy@eva02 ch4]$ cat protnetcharge2.py 
prot_seq = input('Enter protein sequence: ').upper()
charge = -0.002
aa_charge = {'C':-.045,'D':-.999,'E':-.998,'H':.091,
             'K':1,'R':1,'Y':-.001}
for aa in prot_seq:
    charge += aa_charge.get('aa', 0)
print(charge)
nd{verbatim}
[murphy@eva02 ch4]$ vim protnetcharge2.py 
[murphy@eva02 ch4]$ head -n 7 protnetcharge2.py > pnc2.py
[murphy@eva02 ch4]$ tail pnc2.py 
prot_seq = input('Enter protein sequence: ').upper()
charge = -0.002
aa_charge = {'C':-.045,'D':-.999,'E':-.998,'H':.091,
             'K':1,'R':1,'Y':-.001}
for aa in prot_seq:
    charge += aa_charge.get('aa', 0)
print(charge)
[murphy@eva02 ch4]$ python3 pnc2.py 
Enter protein sequence: KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDVQAWIRGCRL
-0.002

primer31.py doesn't work

Dear @sbassi,

When I run primer3 using the file generated with primer31.py I got the following error.

$ ./primer3_core < swforprimer3.txt
...
PRIMER_PRODUCT_SIZE_RANGE=45-57544
PRIMER_ERROR=thermodynamic approach chosen, but path to thermodynamic parameters not specified
=

I fixed it by changing the template like this,
https://github.com/Serulab/Py4Bio/tree/master/code/ch17

PRIMER_SEQUENCE_ID={title}
SEQUENCE_TEMPLATE={seq}
TARGET={pos},{win_size}
PRIMER_OPT_SIZE=18
PRIMER_MIN_SIZE=15
PRIMER_MAX_SIZE=20
PRIMER_NUM_NS_ACCEPTED=0
PRIMER_EXPLAIN_FLAG=1
PRIMER_PRODUCT_SIZE_RANGE={win_size}-{len_seq}
PRIMER_THERMODYNAMIC_PARAMETERS_PATH=primer3-2.4.0/src/primer3_config/
=
  • Added "=" at the end of the template.
  • Change "SEQUENCE" to "SEQUENCE_TEMPLATE".
  • Added "PRIMER_THERMODYNAMIC_PARAMETERS_PATH" option.

https://www.biostars.org/p/355320/
https://primer3.org/manual.html#inputOutputConventions

Could you check these and give me any advice?

Best regards,
kzfm

seachindict.py does not work as expected

[murphy@eva02 ch4]$ python3 seachindict.py 
Traceback (most recent call last):
  File "seachindict.py", line 4, in <module>
    print(color_code[name])
TypeError: list indices must be integers or slices, not str
[murphy@eva02 ch4]$ cat seachindict.py 
color_code = [('red',1), ('green',2), ('blue',3), ('black',4)]
name = 'blue'
color_code_d = dict(color_code)
print(color_code[name])
[murphy@eva02 ch4]$ python
Python 3.7.4 (default, Aug 12 2019, 14:45:07) 
[GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> color_code = [('red',1), ('green',2), ('blue',3), ('black',4)]
>>> name = 'blue'
>>> color_code_d = dict(color_code)
>>> print(color_code[name])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers or slices, not str

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.