#include <ms_imputation.hpp>
Public Types | |
enum | IMPUTATION_VARIABLE { IMPUTE_PROTEIN_RATIO , IMPUTE_PEPTIDE_RATIO , IMPUTE_RETENTION_TIME } |
What type of data is being imputed. More... | |
Public Member Functions | |
ms_imputation (const ms_ms1quantitation *ms1quantitation, ms_imputation_method &m, IMPUTATION_VARIABLE imputationVariableChoice) | |
Use this contructor to create an object to impute missing ms1 ratio values. | |
ms_imputation (const ms_ms2quantitation *ms2quantitation, ms_imputation_method &m, IMPUTATION_VARIABLE imputationVariableChoice) | |
Use this contructor to create an object to impute missing ms2 ratio values. | |
~ms_imputation () | |
Imputation Destructor. | |
void | appendErrors (const ms_errors &src) |
Copies all errors from another instance and appends them at the end of own list. | |
void | clearAllErrors () |
Remove all errors from the current list of errors. | |
void | copyFrom (const ms_errors *right) |
Use this member to make a copy of another instance. | |
const ms_errs * | getErrorHandler () const |
Retrive the error object using this function to get access to all errors and error parameters. | |
const IMPUTATION_VARIABLE | getImputationVariableChoice () const |
Get what the imputation object is currently imputing. I.e. protein/peptide ratios from ms1 or ms2 quantitation, or retention times for label free quantitation. | |
bool | getImputeExcludedMs2PeptideRatios () |
Get how the imputation object is currently treating ms2 excluded ratios. I.e. are excluded ratios treated as missing. Not used when imputing ms1 quantitation results. | |
bool | getImputeMs1PeptideExcludedByCorrelationThr () |
Get how the imputation object is currently treating ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results. | |
bool | getImputeMs1PeptideExcludedByFractionThr () |
Get how the imputation object is currently treating ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results. | |
bool | getImputeMs1PeptideExcludedByStdErrThr () |
Get how the imputation object is currently treating ms1 peptide ratios excluded because of the std err threshold. Not used when imputing ms2 quantitation results. | |
bool | getImputeMs1PeptideNegativeRatio () |
Get how the imputation object is currently treating negative ms1 peptide ratios. Not used when imputing ms2 quantitation results. | |
int | getLastError () const |
Return the error description of the last error that occurred. | |
std::string | getLastErrorString () const |
Return the error description of the last error that occurred. | |
std::vector< std::vector< double > > | impute () |
Returns a 2D (m,n) array of doubles. m is the number of variables, implemented so far is quantitation ratios or subprojects n is the number of observations, implemented so far is the number of protein or peptides. | |
bool | isValid () const |
Call this function to determine if there have been any errors. | |
void | setImputationVariableChoice (const IMPUTATION_VARIABLE imputationVariableChoiceIn) |
Set the imputation object to impute protein/peptide ratios from ms1 or ms2 quantitation, or retention times for label free quantitation. | |
void | setImputeExcludedMs2PeptideRatios (bool imputationMs2PeptideChoiceIn) |
Set the imputation object to treat excluded ms2 ratios as missing Not used when imputing ms1 quantitation results. | |
void | setImputeMs1PeptideExcludedByCorrelationThr (bool imputeMs1PeptideExcludedByCorrelationThr) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results. | |
void | setImputeMs1PeptideExcludedByFractionThr (bool imputeMs1PeptideExcludedByFractionThr) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results. | |
void | setImputeMs1PeptideExcludedByStdErrThr (bool imputeMs1PeptideExcludedByStdErrThr) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the std err threshold. Not used when imputing ms2 quantitation results. | |
void | setImputeMs1PeptideNegativeRatio (bool imputeMs1PeptideNegativeRatio) |
Set the imputation object behaviour of negative ms1 peptide ratios. Not used when imputing ms2 quantitation results. | |
This class is the main conduit to execute numerical methods used to predict or impute missing values within incomplete arrays of data.
Data is set using the supplied quantitation objects on ratio or retention time values.
enum IMPUTATION_VARIABLE |
What type of data is being imputed.
Use in the ms1 and ms2 ms_imputation constructors to declare the choice of ratios being imputed.
See Using enumerated values and static const ints in Perl, Java, Python and C#.
ms_imputation | ( | const ms_ms1quantitation * | ms1quantitation, |
ms_imputation_method & | m, | ||
IMPUTATION_VARIABLE | imputationVariableChoice | ||
) |
Use this contructor to create an object to impute missing ms1 ratio values.
Use this constructor for when imputing missing ratio values from ms1 quantitation.
ms1quantitation | is a pointer to the ms1 quantitation object. |
m | is a reference to the chosen imputation method object. |
imputationVariableChoice | is an enum of which values to impute. Only protein or peptide. |
ms_imputation | ( | const ms_ms2quantitation * | ms2quantitation, |
ms_imputation_method & | m, | ||
IMPUTATION_VARIABLE | imputationVariableChoice | ||
) |
Use this contructor to create an object to impute missing ms2 ratio values.
Use this constructor for when imputing missing ratio values from ms2 quantitation.
ms2quantitation | is a pointer to the ms2 quantitation object. |
m | is a reference to the chosen imputation method object. |
imputationVariableChoice | is an enum of which values to impute. Only protein or peptide. |
|
inherited |
Copies all errors from another instance and appends them at the end of own list.
src | The object to copy the errors across from. See Maintaining object references: two rules of thumb. |
|
inherited |
Remove all errors from the current list of errors.
The list of 'errors' can include fatal errors, warning messages, information messages and different levels of debugging messages.
All messages are accumulated into a list in this object, until clearAllErrors() is called.
See Error Handling.
|
inherited |
Use this member to make a copy of another instance.
right | is the source to initialise from |
|
inherited |
Retrive the error object using this function to get access to all errors and error parameters.
See Error Handling.
|
inherited |
Return the error description of the last error that occurred.
All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.
See Error Handling.
|
inherited |
Return the error description of the last error that occurred.
All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.
See Error Handling.
std::vector< std::vector< double > > impute | ( | ) |
Returns a 2D (m,n) array of doubles. m is the number of variables, implemented so far is quantitation ratios or subprojects n is the number of observations, implemented so far is the number of protein or peptides.
The 2D array will contain a mixture of real double values and imputed double values where previously there was missing values. The imputation method executed will be the type chosen in the ms_imputation constructor.
|
inherited |
Call this function to determine if there have been any errors.
This will return true unless there have been any fatal errors.
See Error Handling.
void setImputeMs1PeptideExcludedByCorrelationThr | ( | bool | imputeMs1PeptideExcludedByCorrelationThr | ) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results.
Set how the imputation object is currently treating ms1 peptide ratios excluded because of the std err threshold.
imputeMs1PeptideExcludedByCorrelationThr | is a bool to set if ms1 peptide ratio values excluded by fraction threshold are treated as missing values or not. |
void setImputeMs1PeptideExcludedByFractionThr | ( | bool | imputeMs1PeptideExcludedByFractionThr | ) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the fraction threshold. Not used when imputing ms2 quantitation results.
Set how the imputation object is currently treating ms1 peptide ratios excluded because of the fraction threshold.
imputeMs1PeptideExcludedByFractionThr | is a bool to set if ms1 peptide ratio values excluded by fraction threshold are treated as missing values or not. |
void setImputeMs1PeptideExcludedByStdErrThr | ( | bool | imputeMs1PeptideExcludedByStdErrThr | ) |
Set the imputation object behaviour of ms1 peptide ratios excluded because of the std err threshold. Not used when imputing ms2 quantitation results.
Set how the imputation object is currently treating ms1 peptide ratios excluded because of the std err threshold.
imputeMs1PeptideExcludedByStdErrThr | is a bool to set if ms1 peptide ratio values excluded by std err threshold are treated as missing values or not. |
void setImputeMs1PeptideNegativeRatio | ( | bool | imputeMs1PeptideNegativeRatio | ) |
Set the imputation object behaviour of negative ms1 peptide ratios. Not used when imputing ms2 quantitation results.
Set how the imputation object is currently treating ms1 peptide ratios excluded because of the std err threshold.
imputeMs1PeptideNegativeRatio | is a bool to set if negative ms1 peptide ratio values are treated as missing values or not. |