Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Private Attributes | Friends

Compomer Class Reference

Holds information on an edge connecting two features from a (putative) charge ladder. More...

#include <OpenMS/DATASTRUCTURES/Compomer.h>

List of all members.

Public Types

enum  SIDE { LEFT, RIGHT, BOTH }
 

side of compomer (LEFT ^ substract; RIGHT ^ add)

More...
typedef Map< String, AdductCompomerSide
typedef std::vector< CompomerSideCompomerComponents
 adducts and their abundance etc

Public Member Functions

 Compomer ()
 container for the two sides [0]=left, [1]=right
 Compomer (Int net_charge, DoubleReal mass, DoubleReal log_p)
 Constructor with net-charge and mass.
 Compomer (const Compomer &p)
 Copy C'tor.
Compomeroperator= (const Compomer &source)
 Assignment Operator.
void add (const Adduct &a, UInt side)
 Add a.amount of Adduct.
bool isConflicting (const Compomer &cmp, UInt side_this, UInt side_other) const
void setID (const Size &id)
 set an Id which allows unique identification of a compomer
const SizegetID () const
 return Id which allows unique identification of this compomer
const CompomerComponentsgetComponent () const
 left and right adducts of this compomer
const IntgetNetCharge () const
 net charge of compomer (i.e. difference between left and right side of compomer)
const DoubleRealgetMass () const
 mass of all contained adducts
const IntgetPositiveCharges () const
 summed positive charges of contained adducts
const IntgetNegativeCharges () const
 summed negative charges of contained adducts
const DoubleRealgetLogP () const
 return log probability
const DoubleRealgetRTShift () const
 return log probability
String getAdductsAsString () const
 get adducts with their abundance as compact string for both sides
String getAdductsAsString (UInt side) const
bool isSingleAdduct (Adduct &a, const UInt side) const
 check if Compomer only contains a single adduct on side side
Compomer removeAdduct (const Adduct &a) const
 Remove all adducts of type a.
Compomer removeAdduct (const Adduct &a, const UInt side) const
 Remove all adducts of type a from side (LEFT or RIGHT).
StringList getLabels (const UInt side) const
 Returns the adduct labels from side (LEFT or RIGHT).
void add (const CompomerSide &add_side, UInt side)
 Adds add_side to this compomer.

Private Attributes

CompomerComponents cmp_
Int net_charge_
DoubleReal mass_
Int pos_charges_
Int neg_charges_
DoubleReal log_p_
DoubleReal rt_shift_
Size id_

Friends

bool operator< (const Compomer &c1, const Compomer &c2)
 Sort compomer by (in order of importance): net-charge, mass, probability.
std::ostream & operator<< (std::ostream &os, const Compomer &cmp)
 Print the contents of a Compomer to a stream.
bool operator== (const Compomer &a, const Compomer &b)
 Comparator.

Detailed Description

Holds information on an edge connecting two features from a (putative) charge ladder.

A compomer is storing information on the adducts used on LEFT and RIGHT nodes (Features) that are connected by the egde (i.e. ChargePair) holding the compomer. Additionally meta information on the edge (net_charge, edge score, id) which is kept up-to-date when adducts are added to either side is stored.


Member Typedef Documentation

typedef std::vector<CompomerSide> CompomerComponents

adducts and their abundance etc


Member Enumeration Documentation

enum SIDE

side of compomer (LEFT ^ substract; RIGHT ^ add)

Enumerator:
LEFT 
RIGHT 
BOTH 

Constructor & Destructor Documentation

Compomer (  ) 

container for the two sides [0]=left, [1]=right

Default Constructor

Compomer ( Int  net_charge,
DoubleReal  mass,
DoubleReal  log_p 
)

Constructor with net-charge and mass.

Compomer ( const Compomer p  ) 

Copy C'tor.


Member Function Documentation

void add ( const Adduct a,
UInt  side 
)

Add a.amount of Adduct.

Parameters:
a to Compomer's
side and update its properties
void add ( const CompomerSide add_side,
UInt  side 
)

Adds add_side to this compomer.

String getAdductsAsString (  )  const

get adducts with their abundance as compact string for both sides

String getAdductsAsString ( UInt  side  )  const

get adducts with their abundance as compact string (amounts are absolute unless side=BOTH)

Parameters:
side Use LEFT for left, RIGHT for right
const CompomerComponents& getComponent (  )  const

left and right adducts of this compomer

const Size& getID (  )  const

return Id which allows unique identification of this compomer

StringList getLabels ( const UInt  side  )  const

Returns the adduct labels from side (LEFT or RIGHT).

Get a list of labels for the side (useful for assigning channels (light, heavy etc) to features).

const DoubleReal& getLogP (  )  const

return log probability

const DoubleReal& getMass (  )  const

mass of all contained adducts

const Int& getNegativeCharges (  )  const

summed negative charges of contained adducts

const Int& getNetCharge (  )  const

net charge of compomer (i.e. difference between left and right side of compomer)

const Int& getPositiveCharges (  )  const

summed positive charges of contained adducts

const DoubleReal& getRTShift (  )  const

return log probability

bool isConflicting ( const Compomer cmp,
UInt  side_this,
UInt  side_other 
) const

indicates if these two compomers can coexist for one feature

Parameters:
cmp The other Compomer we compare to
side_this Indicates which "side"(negative or positive adducts) we are looking at. Negative adducts belong to the left side of the ChargePair.
side_other See above.
bool isSingleAdduct ( Adduct a,
const UInt  side 
) const

check if Compomer only contains a single adduct on side side

Compomer& operator= ( const Compomer source  ) 

Assignment Operator.

Compomer removeAdduct ( const Adduct a,
const UInt  side 
) const

Remove all adducts of type a from side (LEFT or RIGHT).

remove ALL instances of the given adduct from the given side (LEFT or RIGHT), BUT use the given adducts parameters (charge, logp, mass etc) to update the compomers members

Compomer removeAdduct ( const Adduct a  )  const

Remove all adducts of type a.

Remove ALL instances of the given adduct, BUT use the given adducts parameters (charge, logp, mass etc) to update the compomers members

void setID ( const Size id  ) 

set an Id which allows unique identification of a compomer


Friends And Related Function Documentation

bool operator< ( const Compomer c1,
const Compomer c2 
) [friend]

Sort compomer by (in order of importance): net-charge, mass, probability.

std::ostream& operator<< ( std::ostream &  os,
const Compomer cmp 
) [friend]

Print the contents of a Compomer to a stream.

bool operator== ( const Compomer a,
const Compomer b 
) [friend]

Comparator.


Member Data Documentation

Size id_ [private]
DoubleReal log_p_ [private]
DoubleReal mass_ [private]
Int neg_charges_ [private]
Int net_charge_ [private]
Int pos_charges_ [private]
DoubleReal rt_shift_ [private]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:51 using doxygen 1.7.1