OpenMS  2.8.0
List of all members
ChargePair Class Reference

Representation of a (putative) link between two Features, which stem from the same compound but have different charge (including different adduct ions (H+, Na+, ..) More...

#include <OpenMS/DATASTRUCTURES/ChargePair.h>

Collaboration diagram for ChargePair:
[legend]

Constructors and destructor

Size feature0_index_
 Int of the first element within the FeatureMap. More...
 
Size feature1_index_
 Int of the second element within the FeatureMap. More...
 
Int feature0_charge_
 Assumed charge of the first feature. More...
 
Int feature1_charge_
 Assumed charge of the second feature. More...
 
Compomer compomer_
 Compomer that explains the mass difference. More...
 
double mass_diff_
 mass difference (after explanation by compomer) More...
 
double score_
 Score of this edge used in ILP. More...
 
bool is_active_
 was this pair realized by ILP? More...
 
 ChargePair ()
 Default constructor. More...
 
 ChargePair (const Size &index0, const Size &index1, const Int &charge0, const Int &charge1, const Compomer &compomer, const double &mass_diff, const bool active)
 Constructor from map index, element index and Feature. More...
 
 ChargePair (const ChargePair &rhs)
 Copy constructor. More...
 
ChargePairoperator= (const ChargePair &rhs)
 Assignment operator. More...
 
virtual ~ChargePair ()=default
 Destructor. More...
 
Int getCharge (UInt pairID) const
 Returns the charge (for element 0 or 1) More...
 
void setCharge (UInt pairID, Int e)
 Set the charge (for element 0 or 1) More...
 
Size getElementIndex (UInt pairID) const
 Returns the element index (for element 0 or 1) More...
 
void setElementIndex (UInt pairID, Size e)
 Set the element index (for element 0 or 1) More...
 
const CompomergetCompomer () const
 Returns the Id of the compomer that explains the mass difference. More...
 
void setCompomer (const Compomer &compomer)
 Set the compomer id. More...
 
double getMassDiff () const
 Returns the mass difference. More...
 
void setMassDiff (double mass_diff)
 Sets the mass difference. More...
 
double getEdgeScore () const
 Returns the ILP edge score. More...
 
void setEdgeScore (double score)
 Sets the ILP edge score. More...
 
bool isActive () const
 is this pair realized? More...
 
void setActive (const bool active)
 
virtual bool operator== (const ChargePair &i) const
 Equality operator. More...
 
virtual bool operator!= (const ChargePair &i) const
 Equality operator. More...
 

Detailed Description

Representation of a (putative) link between two Features, which stem from the same compound but have different charge (including different adduct ions (H+, Na+, ..)

A ChargePair represents an edge between two Features and specifies their respective charge and adducts, so that when decharged they can be explained as stemming from the same compound.

Constructor & Destructor Documentation

◆ ChargePair() [1/3]

Default constructor.

◆ ChargePair() [2/3]

ChargePair ( const Size index0,
const Size index1,
const Int charge0,
const Int charge1,
const Compomer compomer,
const double &  mass_diff,
const bool  active 
)

Constructor from map index, element index and Feature.

◆ ChargePair() [3/3]

ChargePair ( const ChargePair rhs)

Copy constructor.

◆ ~ChargePair()

virtual ~ChargePair ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getCharge()

Int getCharge ( UInt  pairID) const

Returns the charge (for element 0 or 1)

◆ getCompomer()

const Compomer& getCompomer ( ) const

Returns the Id of the compomer that explains the mass difference.

◆ getEdgeScore()

double getEdgeScore ( ) const

Returns the ILP edge score.

◆ getElementIndex()

Size getElementIndex ( UInt  pairID) const

Returns the element index (for element 0 or 1)

◆ getMassDiff()

double getMassDiff ( ) const

Returns the mass difference.

◆ isActive()

bool isActive ( ) const

is this pair realized?

◆ operator!=()

virtual bool operator!= ( const ChargePair i) const
virtual

Equality operator.

◆ operator=()

ChargePair& operator= ( const ChargePair rhs)

Assignment operator.

◆ operator==()

virtual bool operator== ( const ChargePair i) const
virtual

Equality operator.

◆ setActive()

void setActive ( const bool  active)

◆ setCharge()

void setCharge ( UInt  pairID,
Int  e 
)

Set the charge (for element 0 or 1)

◆ setCompomer()

void setCompomer ( const Compomer compomer)

Set the compomer id.

◆ setEdgeScore()

void setEdgeScore ( double  score)

Sets the ILP edge score.

◆ setElementIndex()

void setElementIndex ( UInt  pairID,
Size  e 
)

Set the element index (for element 0 or 1)

◆ setMassDiff()

void setMassDiff ( double  mass_diff)

Sets the mass difference.

Member Data Documentation

◆ compomer_

Compomer compomer_
protected

Compomer that explains the mass difference.

◆ feature0_charge_

Int feature0_charge_
protected

Assumed charge of the first feature.

◆ feature0_index_

Size feature0_index_
protected

Int of the first element within the FeatureMap.

◆ feature1_charge_

Int feature1_charge_
protected

Assumed charge of the second feature.

◆ feature1_index_

Size feature1_index_
protected

Int of the second element within the FeatureMap.

◆ is_active_

bool is_active_
protected

was this pair realized by ILP?

◆ mass_diff_

double mass_diff_
protected

mass difference (after explanation by compomer)

◆ score_

double score_
protected

Score of this edge used in ILP.