Giter VIP home page Giter VIP logo

Comments (7)

ikizhvatov avatar ikizhvatov commented on June 27, 2024

Mentioning csv in the help is confusing, I see. Input csv should contain a peptide per line. I have added example_input.csv and the corresponding output csv to the repo.

from hmmhc.

DadongZ avatar DadongZ commented on June 27, 2024

Thanks! That's helpful.

from hmmhc.

DadongZ avatar DadongZ commented on June 27, 2024

Thanks, I got the below error with csv as input (~150K peptides):

Traceback (most recent call last):
  File "/home/dz33/.conda/envs/hmmhc/bin/hmmhc-predict", line 8, in <module>
    sys.exit(main())
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/cmdline.py", line 53, in main
    predictions = predictor.predict(peptides)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 70, in predict
    normalizedLogOdds = self.computeLogOdds(peptidesList)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 103, in computeLogOdds
    sequenceSetBlocks = self.toSequenceSetBlocks(peptideList)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 156, in toSequenceSetBlocks
    [list(p) for p in peptideList[rangeStart:rangeEnd]]
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 948, in __init__
    internalInput = [self.emissionDomain.internalSequence(seq) for seq in sequenceSetInput]
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 393, in internalSequence
    result = map(lambda i: self.index[i], result)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 393, in <lambda>
    result = map(lambda i: self.index[i], result)
KeyError: 'X'

Some suggestions?

from hmmhc.

ikizhvatov avatar ikizhvatov commented on June 27, 2024

At least one of your peptide-encoding strings contains character 'X' which denotes an unknown amino acid and is not supported by the predictor. 'U' is also not supported.

As a quick solution, for now please input only the peptide strings containing the 20 amino acids ACDEFGHIKLMNPQRSTVWY.

We will consider filtering the peptides with unsupported amino acids in the tool itself.

from hmmhc.

DadongZ avatar DadongZ commented on June 27, 2024

I removed all peptides contains X and U but still got error

Traceback (most recent call last):
  File "/home/dz33/.conda/envs/hmmhc/bin/hmmhc-predict", line 8, in <module>
    sys.exit(main())
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/cmdline.py", line 53, in main
    predictions = predictor.predict(peptides)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 70, in predict
    normalizedLogOdds = self.computeLogOdds(peptidesList)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 103, in computeLogOdds
    sequenceSetBlocks = self.toSequenceSetBlocks(peptideList)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/hmmhc/hmmhc.py", line 156, in toSequenceSetBlocks
    [list(p) for p in peptideList[rangeStart:rangeEnd]]
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 948, in __init__
    internalInput = [self.emissionDomain.internalSequence(seq) for seq in sequenceSetInput]
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 393, in internalSequence
    result = map(lambda i: self.index[i], result)
  File "/home/dz33/.conda/envs/hmmhc/lib/python2.7/site-packages/ghmm.py", line 393, in <lambda>
    result = map(lambda i: self.index[i], result)
KeyError: '*'

from hmmhc.

ikizhvatov avatar ikizhvatov commented on June 27, 2024

As said, peptide strings shall only contain the 20 canonical amino acids. You have '*' (it usually denotes a stop codon) in at least one of the strings.

from hmmhc.

DadongZ avatar DadongZ commented on June 27, 2024

A stop codon in peptide? These are peptides from genes CDS though and I have removed all X/U letters.

from hmmhc.

Related Issues (5)

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.