.. _section_example_oebio_reshist:

Printing protein amino acids histograms
================================================================================

A program that prints a histogram of the occurrences of various amino acids in a protein. An example command would be:

.. oe:language:: c++

   .. code-block:: console

      prompt> reshist input.pdb

.. oe:language:: python

   .. code-block:: console

      prompt> python reshist.py input.pdb

.. oe:language:: java

   .. code-block:: console

      prompt> java ResHist input.pdb

.. oe:language:: csharp

   .. code-block:: console

      prompt> ResHist input.pdb

Code
--------------------------------------------------------------------------------

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`reshist.cpp <../../../../../sublibs/tklibs/bio/examples/reshist.cpp>`

   .. only:: oepdf

      .. oe:source:: reshist.cpp
         :language: c++

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`reshist.py <../../../../../wrappers/python/examples/bio/reshist.py>`

      ..    literalinclude:: ../../../../../wrappers/python/examples/bio/reshist.py

   .. only:: oepdf

      .. oe:source:: reshist.py
         :language: python


.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ResHist.java <../../../../../wrappers/java/examples/openeye/examples/oebio/ResHist.java>`

   .. only:: oepdf

      .. oe:source:: ResHist.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ResHist.cs <../../../../../wrappers/csharp/Csharp-Examples/OEBio/ResHist.cs>`

   .. only:: oepdf

      .. oe:source:: ResHist.cs
         :language: csharp

.. seealso::

   * :oe:func:`OEChem::OEPerceiveResidues` function
   * :ref:`OEHierView <OEBio_OEHierView>` class
   * :ref:`OEHierResidue <OEBio_OEHierResidue>` class
   * :oe:meth:`OEBio::OEHierResidue::GetOEResidue` method
