|  | OpenMS
    2.6.0
    | 
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 ^ subtract; RIGHT ^ add)  More... | |
| typedef std::map< String, Adduct > | CompomerSide | 
| adducts and their abundance etc  More... | |
| typedef std::vector< CompomerSide > | CompomerComponents | 
| container for the two sides [0]=left, [1]=right  More... | |
| Public Member Functions | |
| Compomer () | |
| Default Constructor.  More... | |
| Compomer (Int net_charge, double mass, double log_p) | |
| Constructor with net-charge and mass.  More... | |
| Compomer (const Compomer &p) | |
| Copy C'tor.  More... | |
| Compomer & | operator= (const Compomer &source) | 
| Assignment Operator.  More... | |
| void | add (const Adduct &a, UInt side) | 
| Add a.amount of Adduct.  More... | |
| 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  More... | |
| const Size & | getID () const | 
| return Id which allows unique identification of this compomer  More... | |
| const CompomerComponents & | getComponent () const | 
| left and right adducts of this compomer  More... | |
| const Int & | getNetCharge () const | 
| net charge of compomer (i.e. difference between left and right side of compomer)  More... | |
| const double & | getMass () const | 
| mass of all contained adducts  More... | |
| const Int & | getPositiveCharges () const | 
| summed positive charges of contained adducts  More... | |
| const Int & | getNegativeCharges () const | 
| summed negative charges of contained adducts  More... | |
| const double & | getLogP () const | 
| return log probability  More... | |
| const double & | getRTShift () const | 
| return log probability  More... | |
| String | getAdductsAsString () const | 
| get adducts with their abundance as compact string for both sides  More... | |
| String | getAdductsAsString (UInt side) const | 
| bool | isSingleAdduct (Adduct &a, const UInt side) const | 
| check if Compomer only contains a single adduct on side sideMore... | |
| Compomer | removeAdduct (const Adduct &a) const | 
| Remove all adducts of type a.  More... | |
| Compomer | removeAdduct (const Adduct &a, const UInt side) const | 
| Remove all adducts of type afromside(LEFT or RIGHT)  More... | |
| StringList | getLabels (const UInt side) const | 
| Returns the adduct labels from side(LEFT or RIGHT)  More... | |
| void | add (const CompomerSide &add_side, UInt side) | 
| Adds add_sideto this compomer.  More... | |
| Private Attributes | |
| CompomerComponents | cmp_ | 
| adducts of left and right side  More... | |
| Int | net_charge_ | 
| net charge (right - left)  More... | |
| double | mass_ | 
| net mass (right - left)  More... | |
| Int | pos_charges_ | 
| net charges on the right  More... | |
| Int | neg_charges_ | 
| net charges on the left  More... | |
| double | log_p_ | 
| log probability of compomer  More... | |
| double | rt_shift_ | 
| expected net RT shift of compomer (-shift_leftside + shift_rightside)  More... | |
| Size | id_ | 
| Friends | |
| bool | operator< (const Compomer &c1, const Compomer &c2) | 
| Sort compomer by (in order of importance): net-charge, mass, probability.  More... | |
| std::ostream & | operator<< (std::ostream &os, const Compomer &cmp) | 
| Print the contents of a Compomer to a stream.  More... | |
| bool | operator== (const Compomer &a, const Compomer &b) | 
| Comparator.  More... | |
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 edge (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 | 
container for the two sides [0]=left, [1]=right
| typedef std::map<String, Adduct> CompomerSide | 
adducts and their abundance etc
| enum SIDE | 
| Compomer | ( | ) | 
Default Constructor.
| 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 double& getLogP | ( | ) | const | 
return log probability
| const double& 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 double& 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. 
Remove ALL instances of the given adduct, BUT use the given adducts parameters (charge, logp, mass etc) to update the compomers members
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
| 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.
| 
 | friend | 
Print the contents of a Compomer to a stream.
| 
 | private | 
adducts of left and right side
| 
 | private | 
| 
 | private | 
log probability of compomer
| 
 | private | 
net mass (right - left)
| 
 | private | 
net charges on the left
| 
 | private | 
net charge (right - left)
| 
 | private | 
net charges on the right
| 
 | private | 
expected net RT shift of compomer (-shift_leftside + shift_rightside)
 1.8.16
 1.8.16