~ubuntu-branches/ubuntu/saucy/libbpp-seq/saucy-proposed

« back to all changes in this revision

Viewing changes to src/Bpp/Seq/Alphabet/ProteicAlphabet.cpp

  • Committer: Package Import Robot
  • Author(s): Julien Dutheil
  • Date: 2013-03-05 14:31:00 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130305143100-2jox395vr1ghao46
Tags: 2.1.0-1
* 'omics' tools now in bpp-seq-omics
* Extended BppO support
* StateProperties renamed to AlphabetIndex

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
//
8
8
 
9
9
/*
10
 
Copyright or © or Copr. CNRS, (November 17, 2004)
 
10
Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
11
11
 
12
12
This software is a computer program whose purpose is to provide classes
13
13
for sequences analysis.
55
55
ProteicAlphabet::ProteicAlphabet()
56
56
{
57
57
        // Alphabet size definition
58
 
        resize(27);
 
58
        resize(28);
59
59
 
60
60
        // Alphabet content definition
61
61
  setState( 0, ProteicAlphabetState(-1, "-", "GAP", "Gap"));
85
85
  setState(24, ProteicAlphabetState(22, "O", "O", "Unresolved amino acid"));
86
86
  setState(25, ProteicAlphabetState(22, "0", "0", "Unresolved amino acid"));
87
87
  setState(26, ProteicAlphabetState(22, "?", "?", "Unresolved amino acid"));
 
88
  setState(27, ProteicAlphabetState(-2, "*", "STOP", "Stop"));
88
89
}
89
90
 
90
91
/******************************************************************************/
91
92
 
92
 
string ProteicAlphabet::getAbbr(const string & aa) const throw (AlphabetException)
 
93
string ProteicAlphabet::getAbbr(const string& aa) const throw (AlphabetException)
93
94
{
94
95
        string AA = TextTools::toUpper(aa);
95
96
  return (getState(aa).getAbbreviation());