OpenStructure
Public Member Functions | Static Public Member Functions | Data Fields
AAIndexData Class Reference

Public Member Functions

def __init__ (self)
 
def GetScore (self, olc)
 
def GetPairScore (self, olc_one, olc_two)
 

Static Public Member Functions

def Parse (data)
 

Data Fields

 key
 
 desc
 
 ref
 
 authors
 
 title
 
 journal
 
 anno_type
 
 anno
 

Detailed Description

Data object representing an annotation in aaindex, preferably 
constructed from it's static :func:`Parse` method. The following 
attributes are available:

* key: aaindex accession number (e.g. ANDN920101)
* desc: descriptive title
* ref: Reference to article if available
* authors: Authors of article if available
* title: Title of article if available
* journal: Journal of article if available
* anno_type: Enum (:class:`AnnoType`) specifying whether we're dealing 
             with a single or pairwise amino acid annotation/score.
* anno: :class:`dict` with annotation. If *anno_type* is SINGLE,
        keys are amino acid one letter codes (single character strings).
        If *anno_type* is PAIR, keys are two one letter codes added 
        together (two character strings). Even when the thing is 
        symmetric, both keys exist. I.e. 'AB' AND 'BA'.
        Values are of type :class:`float` (None if not available).

Definition at line 21 of file aaindex.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Definition at line 41 of file aaindex.py.

Member Function Documentation

◆ GetPairScore()

def GetPairScore (   self,
  olc_one,
  olc_two 
)
Score/Annotation getter

:param olc_one: One letter code of first amino acid
:type olc_one: :class:`string`
:param olc_two: One letter code of second amino acid
:type olc_two: :class:`string`
:returns: Pairwise annotation/score for *olc_one*/*olc_two*
:raises: :class:`ValueError`  if key constructed from *olc_one* and 
         *olc_two* is not known or 
         :class:`RuntimeError` if anno_type of this 
         :class:`AAIndexData` object is not AnnoType.PAIR.

Definition at line 228 of file aaindex.py.

◆ GetScore()

def GetScore (   self,
  olc 
)
Score/Annotation getter

:param olc: One letter code of amino acid
:type olc: :class:`string`
:returns: Annotation/score for *olc*
:raises: :class:`ValueError` if *olc* is not known or 
         :class:`RuntimeError` if anno_type of this 
         :class:`AAIndexData` object is not AnnoType.SINGLE.

Definition at line 210 of file aaindex.py.

◆ Parse()

def Parse (   data)
static
Creates :class:`AAIndexData` from data.

:param data: Iterable with strings in data format described for aaindex.
:returns: :class:`AAIndexData`, if iterable contains several entries, 
           parsing stops at separation sequence ('//'). None is returned
           if nothing could be parsed.
:raises: descriptive error in case of corrupt data

Definition at line 52 of file aaindex.py.

Field Documentation

◆ anno

anno

Definition at line 49 of file aaindex.py.

◆ anno_type

anno_type

Definition at line 48 of file aaindex.py.

◆ authors

authors

Definition at line 45 of file aaindex.py.

◆ desc

desc

Definition at line 43 of file aaindex.py.

◆ journal

journal

Definition at line 47 of file aaindex.py.

◆ key

key

Definition at line 42 of file aaindex.py.

◆ ref

ref

Definition at line 44 of file aaindex.py.

◆ title

title

Definition at line 46 of file aaindex.py.


The documentation for this class was generated from the following file: