Package CHEM :: Package Annotation :: Module ChemicalAnnotators :: Class ChemicalIDAnnotator
[hide private]
[frames] | no frames]

Class ChemicalIDAnnotator



BaseAnnotator.BaseAnnotator --+    
                              |    
  BaseAnnotator.SingleAnnotator --+
                                  |
                                 ChemicalIDAnnotator

Given an OEMolBase, return the chemical_id corresponding to it. Assume it is is an int, but stored as the molecule's title string.
>>> from openeye.oechem import OEGraphMol, OEParseSmiles
>>> annotator = ChemicalIDAnnotator();
>>> mol = OEGraphMol();
>>> OEParseSmiles(mol,"c1ccccc1O");
1
>>> mol.SetTitle("1234");
1
>>> print annotator(mol);
1234


Instance Methods [hide private]
 
allColumns(self)
Return an ordered sequence of all the column names that this multiple annotator can generate values for.
 
allValues(self, input)
Return an ordered sequence of all the values this multiple annotator can calculate off of the input.

Inherited from BaseAnnotator.SingleAnnotator: __call__, __init__, columnName

Inherited from BaseAnnotator.BaseAnnotator: annotateDict, iteritems, iterkeys, itervalues, keys, specifyColumns, values

Class Variables [hide private]

Inherited from BaseAnnotator.BaseAnnotator: specificCols

Method Details [hide private]

allColumns(self)

 

Return an ordered sequence of all the column names that this multiple annotator can generate values for.

To facilitate ease of filtering with case-insensitivity, all of the values returned by this method should be lowercase.
Overrides: BaseAnnotator.BaseAnnotator.allColumns
(inherited documentation)

allValues(self, input)

 
Return an ordered sequence of all the values this multiple annotator can calculate off of the input. The order must correspond to the column list returned by allColumns so the caller can know which element is which.
Overrides: BaseAnnotator.BaseAnnotator.allValues
(inherited documentation)