GithubHelp home page GithubHelp logo

tmhmm.py's People

Contributors

dansondergaard 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tmhmm.py's Issues

Fasta with multiple sequences

Screenshot_utils_py

When running the program using a FASTA input file with multiple sequences, all of the output was being directed to the first header. It seems that in your load_fasta_file function of your utils.py script, you forgot a line in your else statement redefining the header. For some reason, without defining a new header, the sequences and annotations were all directed to the first header of the FASTA. Putting a line in the else statement to make a new header (as I did here in line 53) seemed to resolve the issue. Thanks for writing this program!

Best,
Jason

Running tmhmm on test.fa fails

Hi,

Thanks for creating this package. However, I am encountering an issue. Running tmhmm -m TMHMM2.0.model -f test.fa, I get the following error message:

/anaconda3/lib/python3.6/site-packages/tmhmm/init.py:21: RuntimeWarning: divide by zero encountered in log
_, path = viterbi(sequence, *model)

Any insights/help would be greatly appreciated!

Thanks,
Paulina

predict() missing 1 required positional argument: 'model_or_filelike'

This previously was working for me, but it is still possible i am doing something wrong.

I am using: annotation,pos_memb=tmhmm.predict(fasta,'TMHMM.model'), as I iterate through a list of FASTA sequences.

I am (now) getting the following error:
"TypeError: predict() missing 1 required positional argument: 'model_or_filelike'"

Any tips would be appreciated.

"missing 1 required positional argument"

Traceback (most recent call last):
  File "./annotate_with_hmms.py", line 180, in <module>
    main()
  File "./annotate_with_hmms.py", line 48, in main
    annotator.find_tms()
  File "./annotate_with_hmms.py", line 121, in find_tms
    locations = self.run_tmhmm(gb)
  File "./annotate_with_hmms.py", line 125, in run_tmhmm
    annotation, posterior = tmhmm.predict(str(gb.seq), 'TMHMM2.0.model')
TypeError: predict() missing 1 required positional argument: 'model_or_filelike'

By the way, str(gb.seq) is just protein sequence, not a fasta file name.

conda installation fails - numpy>=1.14.0 does not work

Hi @dansondergaard ,

I've set up a clean env to install your tool and installing just your package works, but execution results in this error

Traceback (most recent call last):
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 789, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.15.4 (/home/ibis/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages), Requirement.parse('numpy<1.14.0,>=1.9.2'), {'scikit-bio'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/bin/tmhmm", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module>
    @_call_aside
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/pgsb/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages/pkg_resources/__init__.py", line 789, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.15.4 (/home/ibis/daniel.lang/anaconda3/envs/membrane/lib/python3.6/site-packages), Requirement.parse('numpy<1.14.0,>=1.9.2'), {'scikit-bio'})

Forcing downgrading to numpy==1.13.0 solves the problem.

pip install numpy==1.13.0

Easy fix would be to adjust the yml...

Thanks for sharing this nice tool - finally an open-source implementation ๐Ÿ‘

Best,
Daniel

begginer-TMHMM2.0.model-etc-problems

Hello, sorry but I have to ask as a beginer:

If trying to use tmhmm.py as a library in Python 3.8.2:
import tmhmm
annotation, posterior = tmhmm.predict(sequence, 'mymodel.model')

I do not know how to use it

  • especialy "mymodel.model".

I tried TMHMM2.model file getting:
"TypeError: predict() missing 1 required positional argument: "model_or_filelike"

Shall I use "TMHMM1.0.model" or "PDBseqs.fasta"?

Could you give me some advice, please?

Thank you very much.

Petr Adamek

Error:U in protein sequence

Dear dansondergaard,
first congratulation you developed such a good software,I have installed it.if I used the test.fa,it will work successful ,But If I used a protein with a "U" in sequence,it doesn't work and produce a error.
but if I put this protein with "U" in TMHMM website,it will work and produce a prediction result. can you help how to solve this problem?

ValueError: Not enough values to unpack

Hi,

I am getting this error.

command: tmhmm -f test.fa -m /TMHMM2.0.model
Traceback (most recent call last):
File "/usr/local/bin/tmhmm", line 10, in
sys.exit(cli())
File "/usr/local/lib/python3.7/dist-packages/tmhmm/cli.py", line 77, in cli
for entry in load_fasta_file(args.sequence_file):
File "/usr/local/lib/python3.7/dist-packages/tmhmm/utils.py", line 52, in load_fasta_file
append_entry(header, sequence_parts, entries)
File "/usr/local/lib/python3.7/dist-packages/tmhmm/utils.py", line 38, in append_entry
id, description = header.split(None, 1)
ValueError: not enough values to unpack (expected 2, got 1)

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.