A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PqueryPlacement Class Reference

#include <genesis/placement/pquery/placement.hpp>

Detailed Description

One placement position of a Pquery on a Tree.

This class is modeled after the jplace standard, which allows for multiple placement positions for a Pquery. Usually, those positions are on different branches of the tree. The property values of this class describe one such placement position.

In order to check the position of this placement on the tree, see proximal_length, pendant_length and edge(). In order to check the likelihood and probability of this placement beging placed exaclty where it is, see likelihood and like_weight_ratio.

Definition at line 75 of file placement/pquery/placement.hpp.

Public Member Functions

 PqueryPlacement ()
 Default constructor. Sets all values to 0. More...
 
 PqueryPlacement (PlacementTreeEdge &edge)
 Constructor that takes the edge where this placement is being placed at. More...
 
 PqueryPlacement (PqueryPlacement const &)=default
 
 PqueryPlacement (PqueryPlacement &&)=default
 
 ~PqueryPlacement ()=default
 
const PlacementTreeEdgeedge () const
 Get the PlacementTreeEdge where this PqueryPlacement is placed. More...
 
PlacementTreeEdgeedge ()
 Get the PlacementTreeEdge where this PqueryPlacement is placed. More...
 
int edge_num () const
 Get the edge_num where this PqueryPlacement is placed. More...
 
PqueryPlacementoperator= (PqueryPlacement const &)=default
 
PqueryPlacementoperator= (PqueryPlacement &&)=default
 
void reset_edge (PlacementTreeEdge &edge)
 Set the PlacementTreeEdge at which this PqueryPlacement is placed. More...
 

Public Attributes

double like_weight_ratio
 Likelihood weight ratio of this placement. More...
 
double likelihood
 Total likelihood of the tree with this placement attached to it. More...
 
int parsimony
 Parsimony value. More...
 
double pendant_length
 Length of the attached branch of this placement. More...
 
double proximal_length
 Distance of this placement to the next node towards the root. More...
 

Constructor & Destructor Documentation

PqueryPlacement ( )
inline

Default constructor. Sets all values to 0.

Definition at line 86 of file placement/pquery/placement.hpp.

PqueryPlacement ( PlacementTreeEdge edge)
inline

Constructor that takes the edge where this placement is being placed at.

Definition at line 98 of file placement/pquery/placement.hpp.

~PqueryPlacement ( )
default
PqueryPlacement ( PqueryPlacement const &  )
default
PqueryPlacement ( PqueryPlacement &&  )
default

Member Function Documentation

const PlacementTreeEdge& edge ( ) const
inline

Get the PlacementTreeEdge where this PqueryPlacement is placed.

Definition at line 194 of file placement/pquery/placement.hpp.

PlacementTreeEdge& edge ( )
inline

Get the PlacementTreeEdge where this PqueryPlacement is placed.

Definition at line 202 of file placement/pquery/placement.hpp.

int edge_num ( ) const
inline

Get the edge_num where this PqueryPlacement is placed.

This number corresponds to the edge_num property as described in the jplace standard. It is not to be confused with the index of the PlacementTreeEdge.

Definition at line 186 of file placement/pquery/placement.hpp.

PqueryPlacement& operator= ( PqueryPlacement const &  )
default
PqueryPlacement& operator= ( PqueryPlacement &&  )
default
void reset_edge ( PlacementTreeEdge edge)
inline

Set the PlacementTreeEdge at which this PqueryPlacement is placed.

This should be rarely needed. It is mostly intended for the Readers that populate the data. When setting this value, the user is responsible to make sure that the new value is actually a PlacementTreeEdge of the PlacementTree that belongs to the Sample where the Pquery of this PqueryPlacement is stored.

Definition at line 215 of file placement/pquery/placement.hpp.

Member Data Documentation

double like_weight_ratio

Likelihood weight ratio of this placement.

The likelihood weight ratio is a probability-like value of how certain the placement algorithm was when placing the Pquery at the edge of this placement. The like_weight_ratios of all placements for one Pquery sum up to 1.0. As not all of them might be stored in the Pquery, however, the sum might be lower.

This property is defined by the jplace standard.

Definition at line 139 of file placement/pquery/placement.hpp.

double likelihood

Total likelihood of the tree with this placement attached to it.

This property is defined by the jplace standard.

Definition at line 127 of file placement/pquery/placement.hpp.

int parsimony

Parsimony value.

This property is defined by the jplace standard. It is currently not used.

Definition at line 174 of file placement/pquery/placement.hpp.

double pendant_length

Length of the attached branch of this placement.

The placement can be interpreted as a new branch on the Tree. This value then gives the length of that branch.

This property is defined by the jplace standard.

Definition at line 167 of file placement/pquery/placement.hpp.

double proximal_length

Distance of this placement to the next node towards the root.

This value determines the distance of the placement attachement position on the edge to the next TreeNode that lies towards the root of the Tree.

This property is not defined by the jplace standard. Instead, the standard uses distal_length, which is the opposite of this value: It determines the distance to the next node that lies away from the root. We use the proximal_length instead, as it is much more convenient for most purposes. In order to obtain the distal_length, use

PqueryPlacement p;
double distal_length = p.edge().data<PlacementEdgeData>().branch_length - p.proximal_length;

This is also the formula that is internally used to convert between the two.

Definition at line 157 of file placement/pquery/placement.hpp.


The documentation for this class was generated from the following file: