Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

AASequence Class Reference
[Chemistry]

#include <OpenMS/CHEMISTRY/AASequence.h>

List of all members.


Detailed Description

Representation of a peptide/protein sequence.

Public Types

Typedefs
typedef std::vector< const
Residue * >::iterator 
iterator
typedef std::vector< const
Residue * >::const_iterator 
const_iterator
typedef std::vector< const
Residue * >::iterator 
Iterator
typedef std::vector< const
Residue * >::const_iterator 
ConstIterator

Public Member Functions

AASequenceoperator= (const AASequence &rhs)
 assignment operator
Constructors and Destructors
 AASequence ()
 default constructor
 AASequence (const AASequence &rhs)
 copy constructor
 AASequence (const String &rhs) throw (Exception::ParseError)
 copy constructor from a String
 AASequence (ResidueDB *res_db)
 constructor with given residue db pointer
 AASequence (ConstIterator begin, ConstIterator end)
 constructor with given a residue range
virtual ~AASequence ()
 destructor
Accessors
const ResiduegetResidue (Int index) const throw (Exception::IndexUnderflow, Exception::IndexOverflow)
 returns a pointer to the residue, which is at position index
const ResiduegetResidue (UInt index) const throw (Exception::IndexOverflow)
 returns a pointer to the residue, which is at position index
EmpiricalFormula getFormula (Residue::ResidueType type=Residue::Full, Int charge=0) const
 returns the formula of the peptide
DoubleReal getAverageWeight (Residue::ResidueType type=Residue::Full, Int charge=0) const
 returns the average weight of the peptide
DoubleReal getMonoWeight (Residue::ResidueType type=Residue::Full, Int charge=0) const
 returns the mono isotopic weight of the peptide
HashMap< const
EmpiricalFormula *, UInt
getNeutralLosses () const
 fills in the map the neutral loss formulas associated with their occuring frequency
const Residueoperator[] (Int index) const throw (Exception::IndexUnderflow, Exception::IndexOverflow)
 returns a pointer to the residue at given position
const Residueoperator[] (UInt index) const throw (Exception::IndexOverflow)
 returns a pointer to the residue at given position
AASequence operator+ (const AASequence &peptide) const
 adds the residues of the peptide
AASequence operator+ (const String &peptide) const throw (Exception::ParseError)
 adds the residues of the peptide, which is given as a string
AASequenceoperator+= (const AASequence &)
 adds the residues of a peptide
AASequenceoperator+= (const String &) throw (Exception::ParseError)
 adds the residues of a peptide, which is given as a string
void setResidueDB (ResidueDB *res_db=0)
UInt size () const
 returns the number of residues
AASequence getPrefix (UInt index) const throw (Exception::IndexOverflow)
 returns a peptide sequence of the first index residues
AASequence getSuffix (UInt index) const throw (Exception::IndexOverflow)
 returns a peptide sequence of the last index residues
AASequence getSubsequence (UInt index, UInt number) const throw (Exception::IndexOverflow)
 returns a peptide sequence of number residues, beginning at position index
Predicates
bool has (const Residue *residue) const
 returns true if the peptude contains the given residue
bool has (const String &name) const
 returns true if the peptide contains the given residue
bool hasSubsequence (const AASequence &peptide) const
 returns true if the peptide contains the given peptide
bool hasSubsequence (const String &peptide) const throw (Exception::ParseError)
 returns true if the peptide contains the given peptide
bool hasPrefix (const AASequence &peptide) const
 returns true if the peptide has the given prefix
bool hasPrefix (const String &peptide) const throw (Exception::ParseError)
 returns true if the peptide has the given prefix
bool hasSuffix (const AASequence &peptide) const
 returns true if the peptide has the given suffix
bool hasSuffix (const String &peptide) const throw (Exception::ParseError)
 returns true if the peptide has the given suffix
bool operator== (const AASequence &) const
 equality operator
bool operator== (const String &) const throw (Exception::ParseError)
 equality operator given the peptide as a string
bool operator!= (const AASequence &) const
 inequality operator
bool operator!= (const String &) const throw (Exception::ParseError)
 inequality operator given the peptide as a string
Iterators
Iterator begin ()
ConstIterator begin () const
Iterator end ()
ConstIterator end () const

Protected Member Functions

ResidueDBgetResidueDB_ () const
void parseString_ (std::vector< const Residue * > &sequence, const String &peptide) const throw (Exception::ParseError)

Protected Attributes

std::vector< const Residue * > peptide_

Static Protected Attributes

static ResidueDBcustom_res_db_

Friends

std::ostream & operator<< (std::ostream &os, const AASequence &peptide)
 writes a peptide to an output stream
std::istream & operator>> (std::istream &is, const AASequence &peptide)
 reads a peptide from an input stream

Member Typedef Documentation

typedef std::vector<const Residue*>::iterator iterator

typedef std::vector<const Residue*>::const_iterator const_iterator

typedef std::vector<const Residue*>::iterator Iterator

typedef std::vector<const Residue*>::const_iterator ConstIterator


Constructor & Destructor Documentation

AASequence (  ) 

default constructor

AASequence ( const AASequence rhs  ) 

copy constructor

AASequence ( const String rhs  )  throw (Exception::ParseError)

copy constructor from a String

AASequence ( ResidueDB res_db  ) 

constructor with given residue db pointer

AASequence ( ConstIterator  begin,
ConstIterator  end 
)

constructor with given a residue range

virtual ~AASequence (  )  [virtual]

destructor


Member Function Documentation

AASequence& operator= ( const AASequence rhs  ) 

assignment operator

const Residue* getResidue ( Int  index  )  const throw (Exception::IndexUnderflow, Exception::IndexOverflow)

returns a pointer to the residue, which is at position index

const Residue* getResidue ( UInt  index  )  const throw (Exception::IndexOverflow)

returns a pointer to the residue, which is at position index

EmpiricalFormula getFormula ( Residue::ResidueType  type = Residue::Full,
Int  charge = 0 
) const

returns the formula of the peptide

DoubleReal getAverageWeight ( Residue::ResidueType  type = Residue::Full,
Int  charge = 0 
) const

returns the average weight of the peptide

DoubleReal getMonoWeight ( Residue::ResidueType  type = Residue::Full,
Int  charge = 0 
) const

returns the mono isotopic weight of the peptide

HashMap<const EmpiricalFormula*, UInt> getNeutralLosses (  )  const

fills in the map the neutral loss formulas associated with their occuring frequency

const Residue* operator[] ( Int  index  )  const throw (Exception::IndexUnderflow, Exception::IndexOverflow)

returns a pointer to the residue at given position

const Residue* operator[] ( UInt  index  )  const throw (Exception::IndexOverflow)

returns a pointer to the residue at given position

AASequence operator+ ( const AASequence peptide  )  const

adds the residues of the peptide

AASequence operator+ ( const String peptide  )  const throw (Exception::ParseError)

adds the residues of the peptide, which is given as a string

AASequence& operator+= ( const AASequence  ) 

adds the residues of a peptide

AASequence& operator+= ( const String  )  throw (Exception::ParseError)

adds the residues of a peptide, which is given as a string

void setResidueDB ( ResidueDB res_db = 0  ) 

sets the residue db from an residue db; ATTENTION this affects all instances! calling with no argument resets to the default residues db usage

UInt size (  )  const

returns the number of residues

AASequence getPrefix ( UInt  index  )  const throw (Exception::IndexOverflow)

returns a peptide sequence of the first index residues

AASequence getSuffix ( UInt  index  )  const throw (Exception::IndexOverflow)

returns a peptide sequence of the last index residues

AASequence getSubsequence ( UInt  index,
UInt  number 
) const throw (Exception::IndexOverflow)

returns a peptide sequence of number residues, beginning at position index

bool has ( const Residue residue  )  const

returns true if the peptude contains the given residue

bool has ( const String name  )  const

returns true if the peptide contains the given residue

bool hasSubsequence ( const AASequence peptide  )  const

returns true if the peptide contains the given peptide

bool hasSubsequence ( const String peptide  )  const throw (Exception::ParseError)

returns true if the peptide contains the given peptide

bool hasPrefix ( const AASequence peptide  )  const

returns true if the peptide has the given prefix

bool hasPrefix ( const String peptide  )  const throw (Exception::ParseError)

returns true if the peptide has the given prefix

bool hasSuffix ( const AASequence peptide  )  const

returns true if the peptide has the given suffix

bool hasSuffix ( const String peptide  )  const throw (Exception::ParseError)

returns true if the peptide has the given suffix

bool operator== ( const AASequence  )  const

equality operator

bool operator== ( const String  )  const throw (Exception::ParseError)

equality operator given the peptide as a string

bool operator!= ( const AASequence  )  const

inequality operator

bool operator!= ( const String  )  const throw (Exception::ParseError)

inequality operator given the peptide as a string

Iterator begin (  )  [inline]

ConstIterator begin (  )  const [inline]

Iterator end (  )  [inline]

ConstIterator end (  )  const [inline]

ResidueDB* getResidueDB_ (  )  const [protected]

void parseString_ ( std::vector< const Residue * > &  sequence,
const String peptide 
) const throw (Exception::ParseError) [protected]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AASequence peptide 
) [friend]

writes a peptide to an output stream

std::istream& operator>> ( std::istream &  is,
const AASequence peptide 
) [friend]

reads a peptide from an input stream


Member Data Documentation

ResidueDB* custom_res_db_ [static, protected]

std::vector<const Residue*> peptide_ [protected]


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:42 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1