Holds information on an edge connecting two features from a (putative) charge ladder. More...
#include <OpenMS/DATASTRUCTURES/Compomer.h>
Public Types | |
| enum | SIDE { LEFT, RIGHT, BOTH } |
side of compomer (LEFT ^ substract; RIGHT ^ add) More... | |
| typedef Map< String, Adduct > | CompomerSide |
| typedef std::vector< CompomerSide > | CompomerComponents |
| 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. | |
| Compomer & | operator= (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 Size & | getID () const |
| return Id which allows unique identification of this compomer | |
| const CompomerComponents & | getComponent () const |
| left and right adducts of this compomer | |
| const Int & | getNetCharge () const |
| net charge of compomer (i.e. difference between left and right side of compomer) | |
| const DoubleReal & | getMass () const |
| mass of all contained adducts | |
| const Int & | getPositiveCharges () const |
| summed positive charges of contained adducts | |
| const Int & | getNegativeCharges () const |
| summed negative charges of contained adducts | |
| const DoubleReal & | getLogP () const |
| return log probability | |
| const DoubleReal & | getRTShift () 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. | |
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.
| typedef std::vector<CompomerSide> CompomerComponents |
adducts and their abundance etc
| typedef Map<String, Adduct> CompomerSide |
| enum SIDE |
| 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.
Add a.amount of Adduct.
| 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
get adducts with their abundance as compact string (amounts are absolute unless side=BOTH)
| 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
indicates if these two compomers can coexist for one feature
| 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. |
check if Compomer only contains a single adduct on side side
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
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
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.
CompomerComponents cmp_ [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 |