OpenMS
2.7.0
|
A map alignment algorithm based on peptide identifications from MS2 spectra. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/MapAlignmentAlgorithmTreeGuided.h>
Public Member Functions | |
MapAlignmentAlgorithmTreeGuided () | |
Default constructor. More... | |
~MapAlignmentAlgorithmTreeGuided () override | |
Destructor. More... | |
void | treeGuidedAlignment (const std::vector< BinaryTreeNode > &tree, std::vector< FeatureMap > &feature_maps_transformed, std::vector< std::vector< double >> &maps_ranges, FeatureMap &map_transformed, std::vector< Size > &trafo_order) |
Align feature maps tree guided using align() of OpenMS::MapAlignmentAlgorithmIdentification and use TreeNode with larger 10/90 percentile range as reference. More... | |
void | align (std::vector< FeatureMap > &data, std::vector< TransformationDescription > &transformations) |
Align feature maps tree guided using align() of OpenMS::MapAlignmentAlgorithmIdentification and use TreeNode with larger 10/90 percentile range as reference. More... | |
void | computeTrafosByOriginalRT (std::vector< FeatureMap > &feature_maps, FeatureMap &map_transformed, std::vector< TransformationDescription > &transformations, const std::vector< Size > &trafo_order) |
Extract original RT ("original_RT" MetaInfo) and transformed RT for each feature to compute RT transformations. More... | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Public Member Functions inherited from ProgressLogger | |
ProgressLogger () | |
Constructor. More... | |
virtual | ~ProgressLogger () |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (const ProgressLogger &other) |
Assignment Operator. More... | |
void | setLogType (LogType type) const |
Sets the progress log that should be used. The default type is NONE! More... | |
LogType | getLogType () const |
Returns the type of progress log being used. More... | |
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
Initializes the progress display. More... | |
void | setProgress (SignedSize value) const |
Sets the current progress. More... | |
void | endProgress () const |
Ends the progress display. More... | |
void | nextProgress () const |
increment progress by 1 (according to range begin-end) More... | |
Static Public Member Functions | |
static void | buildTree (std::vector< FeatureMap > &feature_maps, std::vector< BinaryTreeNode > &tree, std::vector< std::vector< double >> &maps_ranges) |
Extract RTs given for individual features of each map, calculate distances for each pair of maps and cluster hierarchical using average linkage. More... | |
static void | computeTransformedFeatureMaps (std::vector< FeatureMap > &feature_maps, const std::vector< TransformationDescription > &transformations) |
Apply transformations on input maps. More... | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &prefix="") |
Writes all parameters to meta values. More... | |
Protected Types | |
typedef std::map< String, DoubleList > | SeqAndRTList |
Type to store feature retention times given for individual peptide sequence. More... | |
Protected Member Functions | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Static Protected Member Functions | |
static void | addPeptideSequences_ (const std::vector< PeptideIdentification > &peptides, SeqAndRTList &peptide_rts, std::vector< double > &map_range, double feature_rt) |
For given peptide identifications extract sequences and store with associated feature RT. More... | |
static void | extractSeqAndRt_ (const std::vector< FeatureMap > &feature_maps, std::vector< SeqAndRTList > &maps_seq_and_rt, std::vector< std::vector< double >> &maps_ranges) |
For each input map, extract peptide identifications (sequences) of existing features with associated feature RT. More... | |
Static Protected Member Functions inherited from ProgressLogger | |
static String | logTypeToFactoryName_ (LogType type) |
Return the name of the factory product used for this log type. More... | |
Protected Attributes | |
String | model_type_ |
Type of transformation model. More... | |
Param | model_param_ |
Default params of transformation models linear, b_spline, lowess and interpolated. More... | |
MapAlignmentAlgorithmIdentification | align_algorithm_ |
Instantiation of alignment algorithm. More... | |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Protected Attributes inherited from ProgressLogger | |
LogType | type_ |
time_t | last_invoke_ |
ProgressLoggerImpl * | current_logger_ |
Private Member Functions | |
MapAlignmentAlgorithmTreeGuided (const MapAlignmentAlgorithmTreeGuided &) | |
Copy constructor intentionally not implemented -> private. More... | |
MapAlignmentAlgorithmTreeGuided & | operator= (const MapAlignmentAlgorithmTreeGuided &) |
Assignment operator intentionally not implemented -> private. More... | |
Additional Inherited Members | |
Public Types inherited from ProgressLogger | |
enum | LogType { CMD , GUI , NONE } |
Possible log types. More... | |
Static Protected Attributes inherited from ProgressLogger | |
static int | recursion_depth_ |
A map alignment algorithm based on peptide identifications from MS2 spectra.
ID groups with the same sequence in different maps represent points of correspondence in RT between the maps. They are used to evaluate the distances between the maps for hierarchical clustering and form the basis for the alignment. Only the best PSM per spectrum is considered as the correct identification.
For each pair of maps, the similarity is determined based on the intersection of the contained identifications using Pearson correlation. For small intersections, the Pearson value is reduced by multiplying the ratio of the intersection size to the union size: Using hierarchical clustering together with average linkage a binary tree is produced. Following the tree, the maps are aligned, resulting in a transformed feature map that contains both the original and the transformed retention times. As long as there are at least two clusters, the alignment is done as follows: Of every pair of clusters, the one with the larger 10/90 percentile retention time range is selected as reference for the align() method of OpenMS::MapAlignmentAlgorithmIdentification. align() aligns the median retention time of each ID group in the second cluster to the reference retention time of this group. Cubic spline smoothing is used to convert this mapping to a smooth function. Retention times in the second cluster are transformed to the reference scale by applying this function. Additionally, the original retention times are stored in the meta information of each feature. The reference is combined with the transformed cluster.
The resulting map is used to extract transformation descriptions for each input map. For each map cubic spline smoothing is used to convert the mapping to a smooth function. Retention times of each map are transformed by applying the smoothed function.
|
protected |
Type to store feature retention times given for individual peptide sequence.
Default constructor.
|
override |
Destructor.
|
private |
Copy constructor intentionally not implemented -> private.
|
staticprotected |
For given peptide identifications extract sequences and store with associated feature RT.
peptides | Vector of peptide identifications to extract sequences. |
peptide_rts | Map to store a list of feature RTs for each peptide sequence as key. |
map_range | Vector in which all feature RTs are stored for given peptide identifications. |
feature_rt | RT value of the feature to which the peptide identifications to be analysed belong. |
void align | ( | std::vector< FeatureMap > & | data, |
std::vector< TransformationDescription > & | transformations | ||
) |
Align feature maps tree guided using align() of OpenMS::MapAlignmentAlgorithmIdentification and use TreeNode with larger 10/90 percentile range as reference.
|
static |
Extract RTs given for individual features of each map, calculate distances for each pair of maps and cluster hierarchical using average linkage.
feature_maps | Vector of input maps (FeatureMap) whose distance is to be calculated. |
tree | Vector of BinaryTreeNodes that will be computed |
maps_ranges | Vector to store all sorted RTs of extracted identifications for each map in feature_maps ; needed to determine the 10/90 percentiles |
void computeTrafosByOriginalRT | ( | std::vector< FeatureMap > & | feature_maps, |
FeatureMap & | map_transformed, | ||
std::vector< TransformationDescription > & | transformations, | ||
const std::vector< Size > & | trafo_order | ||
) |
Extract original RT ("original_RT" MetaInfo) and transformed RT for each feature to compute RT transformations.
feature_maps | Vector of input maps for size information. |
map_transformed | FeatureMap that contains all features of combined maps with original and transformed RTs in order of alignment. |
transformations | Vector to store transformation descriptions for each map. (output) |
trafo_order | Vector that contains the indices of aligned maps in order of alignment. |
|
static |
Apply transformations on input maps.
feature_maps | Vector of maps to be transformed (output) |
transformations | Vector that contains TransformationDescriptions that are applied to input maps |
|
staticprotected |
For each input map, extract peptide identifications (sequences) of existing features with associated feature RT.
feature_maps | Vector of original maps containing peptide identifications. |
maps_seq_and_rt | Vector of maps to store feature RTs given for individual peptide sequences for each feature map. |
maps_ranges | Vector to store all feature RTs of extracted identifications for each map; needed to determine the 10/90 percentiles. |
|
private |
Assignment operator intentionally not implemented -> private.
void treeGuidedAlignment | ( | const std::vector< BinaryTreeNode > & | tree, |
std::vector< FeatureMap > & | feature_maps_transformed, | ||
std::vector< std::vector< double >> & | maps_ranges, | ||
FeatureMap & | map_transformed, | ||
std::vector< Size > & | trafo_order | ||
) |
Align feature maps tree guided using align() of OpenMS::MapAlignmentAlgorithmIdentification and use TreeNode with larger 10/90 percentile range as reference.
tree | Vector of BinaryTreeNodes that contains order for alignment. |
feature_maps_transformed | Vector with input maps for transformation process. Because the transformed maps are stored within this vector it's not const. |
maps_ranges | Vector that contains all sorted RTs of extracted identifications for each map; needed to determine the 10/90 percentiles. |
map_transformed | FeatureMap to store all features of combined maps with original and transformed RTs in order of alignment. |
trafo_order | Vector to store indices of maps in order of alignment. |
|
overrideprotectedvirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
protected |
Instantiation of alignment algorithm.
|
protected |
Default params of transformation models linear, b_spline, lowess and interpolated.
|
protected |
Type of transformation model.