Skip to content

Conversation

@jcharkow
Copy link
Owner

@jcharkow jcharkow commented Aug 4, 2025

Description

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out
  • The details of the action statuses at the end of the PR or the "Checks" tab.
  • http://cdash.seqan.de/index.php?project=OpenMS and look for your PR. Use the "Show filters" capability on the top right to search for your PR number.
    If you click in the column that lists the failed tests you will get detailed error messages.

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Comment on lines +270 to +301
std::vector<double> predicted_values(pairs_corrected.size()); // these are the predicted values by applying the trafo on the values
std::vector<double> delta_true_predicted(pairs_corrected.size()); // these are the differences between the predicted and the true values
double sum_rt_differences = 0.0;
TransformationDescription trafo_inverse = trafo_out;
trafo_inverse.invert();
for (size_t i = 0; i < pairs_corrected.size(); ++i)
{
predicted_values[i] = trafo_out.apply(pairs_corrected[i].first);
delta_true_predicted[i] = pairs_corrected[i].first - predicted_values[i];
sum_rt_differences += delta_true_predicted[i]; // sum for computing the mean
OPENMS_LOG_DEBUG << "True - Predicted value: " << pairs_corrected[i].second << " " << predicted_values[i] << std::endl;
}
double mean_rt_difference = sum_rt_differences / delta_true_predicted.size();

// compute the variance
double rt_variance = 0.0;
for (double delta: delta_true_predicted)
{
rt_variance += (delta - mean_rt_difference) * (delta - mean_rt_difference);
}
rt_variance /= delta_true_predicted.size();
double rt_stdev = sqrt(rt_variance);
double rt_extraction_window = rt_stdev * 3.0 * 2; // 3 times the standard deviation, doubled since the window is the full length (not half)
std::cout << "RT variance: " << rt_stdev << std::endl;
std::cout << "RT Extraction Window to Use: " << rt_extraction_window << std::endl;


std::cout << "End of doDataNormalization_ method" << std::endl;

trafo_out.printSummary(std::cout);
}
{
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singjc this is what I did for estimating RT calibration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants