Repository navigation
Hide Eigen from OpenMS public API (Issue #8456) - #8511
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughPublic headers were stripped of Eigen types: a column‑major templated Matrix and std::vector/raw‑pointer interfaces replace Eigen in public APIs; Eigen is moved to private linkage and an internal MatrixEigen.h exposes Eigen::Map helpers for internal zero‑copy operations. Implementations and tests adapted accordingly. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This implements Option D from issue #8456: use Eigen::Map only without PIMPL. Changes: - Move Eigen3::Eigen from PUBLIC to PRIVATE linking in CMakeLists.txt - Rewrite Matrix<T> to use std::vector<T> storage (column-major) - Add internal MatrixEigen.h with eigenView() for zero-copy Eigen access - Refactor TraceFitter/LevMarqFitter1D GenericFunctor to use raw double* instead of Eigen types in public interface - Update all internal code to use eigenView() where Eigen operations needed - Add missing includes (<cmath>, <Eigen/LU>, <Eigen/QR>) where needed - Update tests to link against Eigen when using eigenView() directly The Matrix class now provides: - std::vector storage with data() pointer access - getValue/setValue methods for element access - eigenView() (internal) for full Eigen matrix operations Downstream users no longer need Eigen headers when using OpenMS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
fce8ff1 to
cb4c37c
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (1)
270-321: Duplicate updateOutputMap_ implementations.Similar to
computeStats_, two nearly identical overloads exist differing only in container type access. The same refactoring strategy (templating or unification) from the previous comment could apply here to reduce code duplication.
🧹 Nitpick comments (13)
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (2)
43-62: Consider explicit column-major specification for clarity.The
eigenViewfunctions correctly create zero-copy Eigen::Map views. Since OpenMS Matrix uses column-major storage (per Matrix.h documentation) and Eigen::Map defaults to column-major, the current implementation is correct.However, for clarity and to make the storage order assumption explicit, consider specifying it:
return Eigen::Map<EigenMatrixType<Value>, Eigen::Unaligned, Eigen::Stride<Eigen::Dynamic, 1>>(mat.data(), mat.rows(), mat.cols());Or add a comment documenting the column-major assumption.
117-130: Document column-major storage assumption more clearly.The comment on line 112 mentions "column-major storage," but the actual Eigen::Map construction relies on the default storage order. Consider making this explicit:
// Explicitly specify column-major with default stride return Eigen::Map<EigenMatrixType<Value>, Eigen::Unaligned, Eigen::Stride<Eigen::Dynamic, 1>>(data, rows, cols);This would make the column-major assumption explicit and prevent potential confusion if Eigen defaults ever change.
src/openms/source/FEATUREFINDER/TraceFitter.cpp (1)
114-115: Clarify intent: copy operation, not zero-copy map.Line 115 creates a copy of the data, not a zero-copy map:
Eigen::VectorXd x_eigen = Eigen::Map<Eigen::VectorXd>(x_init.data(), x_init.size());The
Eigen::Mapis created but immediately copied intox_eigendue to the assignment toVectorXd. This is likely intentional since the LM solver modifiesx_eigenin-place and you need to preserve the original until the optimization succeeds. However, the current code is misleading.Consider making the copy explicit for clarity:
// Copy data from std::vector to Eigen::VectorXd for optimization Eigen::VectorXd x_eigen(x_init.size()); x_eigen = Eigen::Map<const Eigen::VectorXd>(x_init.data(), x_init.size());src/tests/class_tests/openms/source/BilinearInterpolation_test.cpp (1)
470-473: Consider simplifying eigenView usage pattern.The current pattern works correctly but is slightly verbose:
eigenView(bifd_small.getData()) = eigenView(bifd_small.getData()).unaryExpr([](double val) { ... });Consider simplifying with a temporary:
auto data_view = eigenView(bifd_small.getData()); data_view = data_view.unaryExpr([](double val) { return Math::round(val); });This avoids calling
eigenView()twice and makes the intent clearer.Also applies to: 483-486
src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp (1)
17-41: Adapter implementation is correct; consider consolidating with TraceFitter's adapter.The
GenericFunctorConstEigenAdaptercorrectly wraps the functor for Eigen's LM solver. However, this is nearly identical toGenericFunctorEigenAdapterinTraceFitter.cpp(lines 24-35 per the relevant snippets). The TODO on line 45 already acknowledges this duplication.Consider extracting a shared adapter to a common internal header to reduce maintenance burden.
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (2)
16-54: Memory leak risk if exception is thrown before cleanup.The raw
new/deletepattern forw,zz, andindxwill leak memory if an exception occurs between allocation and cleanup (e.g., ifNNLS::nnls_throws or if future modifications add throwing code).Consider using
std::vectororstd::unique_ptrfor automatic cleanup:- double* w = new double[A_cols]; - double* zz = new double[A_rows]; - int* indx = new int[A_cols]; + std::vector<double> w(A_cols); + std::vector<double> zz(A_rows); + std::vector<int> indx(A_cols); int mode; - NNLS::nnls_(A, &A_rows, &A_rows, &A_cols, b.data(), x.data(), &rnorm, w, zz, indx, &mode); - - // clean up - delete[] w; - delete[] zz; - delete[] indx; + NNLS::nnls_(A, &A_rows, &A_rows, &A_cols, b.data(), x.data(), &rnorm, w.data(), zz.data(), indx.data(), &mode);
63-149: Same memory safety concern applies here.This overload has multiple
newallocations (lines 76, 92, 103, 105, 106, 107) that could leak on exception. The samestd::vectorrefactor would improve safety:- double* a_vec = new double[A.rows() * A.cols()]; + std::vector<double> a_vec(A.rows() * A.cols()); size_t idx = 0; for (Size col = 0; col < A.cols(); ++col) { for (Size row = 0; row < A.rows(); ++row) { - a_vec[idx] = A(row, col); + a_vec[idx] = A(row, col); idx++; } } // ... similar changes for b_vec, x_vec, w, zz, indx ...This would also allow removing the
delete[]calls at lines 129-134.src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (3)
101-122: Consider adding bounds checking to getValue/setValue.The
getValueandsetValuemethods perform no bounds checking, unlike the equality operator which usesOPENMS_PRECONDITION. Since these methods are explicitly provided for pyOpenMS (which may be more error-prone than C++ usage), consider adding debug-mode bounds validation.Apply this diff to add bounds checking:
const Value& getValue(size_t const row, size_t const col) const { + OPENMS_PRECONDITION(row < rows_ && col < cols_, "Matrix index out of bounds"); return data_[col * rows_ + row]; // Column-major } Value& getValue(size_t const row, size_t const col) { + OPENMS_PRECONDITION(row < rows_ && col < cols_, "Matrix index out of bounds"); return data_[col * rows_ + row]; // Column-major } void setValue(size_t const row, size_t const col, const Value& value) { + OPENMS_PRECONDITION(row < rows_ && col < cols_, "Matrix index out of bounds"); data_[col * rows_ + row] = value; // Column-major }
162-167: Clarify resize() behavior documentation.The comment "contents become undefined after resize" is misleading.
std::vector::resize()preserves existing elements when growing (new elements are value-initialized) and preserves the first n elements when shrinking. Only the layout may change if dimensions change in ways that don't preserve the column-major mapping.Apply this diff to clarify:
- /// Resize matrix (contents become undefined after resize) + /// Resize matrix (existing elements preserved but may be reinterpreted due to dimension change) void resize(size_t rows, size_t cols)Or, if you intend to make no guarantees about content preservation:
- /// Resize matrix (contents become undefined after resize) + /// Resize matrix (no guarantee of content preservation across dimension changes) void resize(size_t rows, size_t cols)
195-206: Consider using consistent integer types.The
setMatrixtemplate useslong intfor theROWSandCOLStemplate parameters and loop indices, which is inconsistent with the rest of the class that usesSize(defined in Types.h). Consider usingstd::size_torSizefor consistency and better portability.Apply this diff:
- template <typename T, long int ROWS, long int COLS> + template <typename T, std::size_t ROWS, std::size_t COLS> void setMatrix(T const (&array)[ROWS][COLS]) { resize(ROWS, COLS); - for (long int i = 0; i < ROWS; ++i) + for (std::size_t i = 0; i < ROWS; ++i) { - for (long int j = 0; j < COLS; ++j) + for (std::size_t j = 0; j < COLS; ++j) { (*this)(i, j) = array[i][j]; } } }src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (3)
93-107: Consider adding a utility for Eigen-to-vector conversion.The manual conversion at line 107
std::vector<double> x_naive(e_mx.data(), e_mx.data() + e_mx.size())works correctly but could be replaced with a utility function inMatrixEigen.hfor consistency and reusability across the codebase.Example utility (to be added to MatrixEigen.h):
/// Convert Eigen::VectorXd to std::vector<double> inline std::vector<double> eigenToVector(const Eigen::VectorXd& vec) { return std::vector<double>(vec.data(), vec.data() + vec.size()); }Then use:
- // Convert naive solution to std::vector for stats - std::vector<double> x_naive(e_mx.data(), e_mx.data() + e_mx.size()); + // Convert naive solution to std::vector for stats + std::vector<double> x_naive = eigenToVector(e_mx);
120-137: Redundant data copying in fillInputVector_.Lines 134-135 populate both the
std::vector<double> bandMatrix<double> m_bwith identical data. This duplication exists because the naive LU path uses the vector while the NNLS path uses the matrix. Consider refactoring to use a single representation or document why both are necessary.If both paths can work with Matrix:
- void fillInputVector_(std::vector<double>& b, - Matrix<double>& m_b, + void fillInputVector_(Matrix<double>& m_b, const ConsensusFeature& cf, const ConsensusMap& cm) { for (ConsensusFeature::HandleSetType::const_iterator it_elements = cf.getFeatures().begin(); it_elements != cf.getFeatures().end(); ++it_elements) { Int index = Int(cm.getColumnHeaders().find(it_elements->getMapIndex())->second.getMetaValue("channel_id")); - b[index] = it_elements->getIntensity(); m_b(index, 0) = it_elements->getIntensity(); } }Then create
bfromm_bdata when needed, or use eigenView throughout.
186-267: Duplicate computeStats_ implementations suggest incomplete refactoring.Two nearly identical overloads exist (lines 186-225 and 228-267), differing only in how they access
m_x(asstd::vector<double>vs.Matrix<double>). This duplication could be eliminated by:
- Unifying on a single representation (Matrix or vector), or
- Using a template to handle both types
Template approach:
template<typename ContainerType> void IsobaricIsotopeCorrector::computeStats_(const ContainerType& m_x, const std::vector<double>& x_naive, const float cf_intensity, const IsobaricQuantitationMethod* quant_method, IsobaricQuantifierStatistics& stats) { Size s_negative(0); Size s_different_count(0); double s_different_intensity(0); for (Size index = 0; index < quant_method->getNumberOfChannels(); ++index) { // Helper to access element regardless of container type double m_x_val = getElement(m_x, index); if (x_naive[index] < 0.0) { ++s_negative; } else if ((((std::fabs(m_x_val - x_naive[index]))/m_x_val)*100) > 1) { ++s_different_count; s_different_intensity += std::fabs(m_x_val - x_naive[index]); } } // ... rest of function }With helper:
inline double getElement(const std::vector<double>& v, Size i) { return v[i]; } inline double getElement(const Matrix<double>& m, Size i) { return m(i, 0); }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
src/openms/CMakeLists.txt(2 hunks)src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h(5 hunks)src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h(2 hunks)src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h(1 hunks)src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h(2 hunks)src/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.h(1 hunks)src/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.h(2 hunks)src/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.h(4 hunks)src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h(4 hunks)src/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.h(2 hunks)src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h(3 hunks)src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cpp(22 hunks)src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp(9 hunks)src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cpp(2 hunks)src/openms/source/ANALYSIS/TOPDOWN/Qvalue.cpp(2 hunks)src/openms/source/DATASTRUCTURES/Matrix.cpp(1 hunks)src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp(5 hunks)src/openms/source/FEATUREFINDER/EmgFitter1D.cpp(5 hunks)src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp(6 hunks)src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp(3 hunks)src/openms/source/FEATUREFINDER/TraceFitter.cpp(4 hunks)src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp(6 hunks)src/tests/class_tests/openms/CMakeLists.txt(1 hunks)src/tests/class_tests/openms/source/BilinearInterpolation_test.cpp(11 hunks)src/tests/class_tests/openms/source/MRMScoring_test.cpp(3 hunks)src/tests/class_tests/openms/source/Matrix_test.cpp(5 hunks)src/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cpp(3 hunks)src/tests/class_tests/openms/source/TraceFitter_test.cpp(1 hunks)src/topp/ImageCreator.cpp(3 hunks)src/topp/IsobaricWorkflow.cpp(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.hsrc/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.hsrc/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cppsrc/openms/source/FEATUREFINDER/LevMarqFitter1D.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.hsrc/openms/source/FEATUREFINDER/TraceFitter.cppsrc/openms/source/ANALYSIS/TOPDOWN/Qvalue.cppsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.hsrc/openms/source/FEATUREFINDER/EGHTraceFitter.cppsrc/openms/source/FEATUREFINDER/GaussTraceFitter.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.hsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp
src/openms/include/OpenMS/**/*.h
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add Doxygen comments for new public methods and classes
Files:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.hsrc/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.hsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.h
src/tests/class_tests/openms/**/*.cpp
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Write unit tests for new functionality
Files:
src/tests/class_tests/openms/source/MRMScoring_test.cppsrc/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cppsrc/tests/class_tests/openms/source/TraceFitter_test.cppsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/tests/class_tests/openms/source/Matrix_test.cpp
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.hsrc/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/topp/ImageCreator.cppsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/FEATUREFINDER/LevMarqFitter1D.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.hsrc/openms/CMakeLists.txtsrc/openms/source/ANALYSIS/TOPDOWN/Qvalue.cppsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/openms/source/FEATUREFINDER/EGHTraceFitter.cppsrc/openms/source/FEATUREFINDER/GaussTraceFitter.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.hsrc/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/topp/ImageCreator.cppsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/FEATUREFINDER/LevMarqFitter1D.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/CMakeLists.txtsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.hsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/openms/source/FEATUREFINDER/GaussTraceFitter.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.hsrc/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/CMakeLists.txtsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality
Applied to files:
src/tests/class_tests/openms/CMakeLists.txtsrc/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cppsrc/tests/class_tests/openms/source/TraceFitter_test.cppsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/tests/class_tests/openms/source/Matrix_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/*Test.cpp : Follow naming convention: `ClassNameTest.cpp` for `ClassName`
Applied to files:
src/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cppsrc/tests/class_tests/openms/source/TraceFitter_test.cppsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/tests/class_tests/openms/source/Matrix_test.cpp
📚 Learning: 2025-09-03T12:58:20.032Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/tests/topp/CMakeLists.txt:1857-1865
Timestamp: 2025-09-03T12:58:20.032Z
Learning: OpenMS tests: When adding new TOPP tests in src/tests/topp/CMakeLists.txt that compare outputs via FuzzyDiff, always add set_tests_properties("<tool>_<n>_out<m>" PROPERTIES DEPENDS "<tool>_<n>") to avoid flakiness under parallel CTest runs.
Applied to files:
src/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/source/MRMScoring_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cppsrc/openms/source/FEATUREFINDER/LevMarqFitter1D.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/openms/source/FEATUREFINDER/EGHTraceFitter.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/tests/class_tests/openms/source/Matrix_test.cppsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp
📚 Learning: 2025-08-14T10:19:54.371Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 8167
File: src/topp/Digestor.cpp:200-226
Timestamp: 2025-08-14T10:19:54.371Z
Learning: In OpenMS (C++ bioinformatics framework), use boost random libraries instead of std library random distributions for cross-platform reproducible random number generation, as std library distributions are not reproducible across platforms.
Applied to files:
src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/topp/ImageCreator.cppsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/CMakeLists.txtsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Applied to files:
src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cppsrc/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/tests/class_tests/openms/source/BilinearInterpolation_test.cppsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Follow the established error handling patterns
Applied to files:
src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cppsrc/openms/source/FEATUREFINDER/EmgFitter1D.cppsrc/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-10-15T07:49:09.293Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerIM.h:11-14
Timestamp: 2025-10-15T07:49:09.293Z
Learning: In OpenMS, DefaultParamHandler.h is located under OpenMS/DATASTRUCTURES/, not OpenMS/CONCEPT/. The correct include is: `#include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>`
Applied to files:
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/tests/class_tests/openms/source/MRMScoring_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Be aware of OpenMS dependencies and external libraries
Applied to files:
src/tests/class_tests/openms/source/MRMScoring_test.cppsrc/openms/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Utilize OpenMS logging mechanisms
Applied to files:
src/tests/class_tests/openms/source/MRMScoring_test.cpp
📚 Learning: 2025-10-21T13:02:16.431Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Applied to files:
src/openms/source/DATASTRUCTURES/Matrix.cppsrc/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use the established naming patterns for classes, methods, and variables
Applied to files:
src/openms/CMakeLists.txt
📚 Learning: 2025-06-16T15:49:26.504Z
Learnt from: FreezB11
Repo: OpenMS/OpenMS PR: 7969
File: src/pyOpenMS/pxds/TMTThirtyTwoPlexQuantitationMethod.pxd:1-3
Timestamp: 2025-06-16T15:49:26.504Z
Learning: In OpenMS Python bindings (.pxd files), derived quantitation method classes like TMTThirtyTwoPlexQuantitationMethod only need to declare their constructors. All other public methods (getName, getChannelInformation, getNumberOfChannels, getIsotopeCorrectionMatrix, getReferenceChannel) are inherited from the base IsobaricQuantitationMethod class and don't need to be redeclared explicitly.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
🧬 Code graph analysis (14)
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (1)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (3)
OpenMS(20-269)data(142-142)data(145-145)
src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h (1)
src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp (7)
x(35-78)x(35-35)df(80-145)df(80-80)getOptimizedParameters_(310-320)getOptimizedParameters_(310-310)x_init(186-186)
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h (4)
src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp (4)
x(35-78)x(35-35)df(80-145)df(80-80)src/openms/source/FEATUREFINDER/EmgFitter1D.cpp (4)
x(25-56)x(25-25)df(59-108)df(59-59)src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp (4)
x(145-170)x(145-145)df(173-204)df(173-173)src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp (4)
x(29-32)x(29-29)x(34-37)x(34-34)
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (2)
src/openms/source/CONCEPT/Exception.cpp (1)
InvalidParameter(230-233)src/openms/source/ML/NNLS/NNLS.cpp (2)
nnls_(96-523)nnls_(96-98)
src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp (1)
src/openms/source/FEATUREFINDER/TraceFitter.cpp (9)
functor_(25-25)functor_(26-26)x(28-31)x(28-28)x(33-36)x(33-33)optimize_(101-135)optimize_(101-101)lmSolver(120-120)
src/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.h (1)
src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp (6)
getOptimizedParameters_(130-135)getOptimizedParameters_(130-130)x(145-170)x(145-145)df(173-204)df(173-173)
src/openms/source/FEATUREFINDER/TraceFitter.cpp (1)
src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp (9)
functor_(26-26)functor_(27-27)x(29-32)x(29-29)x(34-37)x(34-34)optimize_(43-75)optimize_(43-43)lmSolver(62-62)
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (1)
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (6)
solve(16-54)solve(16-17)solve(56-61)solve(56-56)solve(63-149)solve(63-63)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (2)
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (1)
OpenMS(18-132)src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (1)
OpenMS(14-76)
src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp (3)
src/openms/source/FEATUREFINDER/EmgFitter1D.cpp (8)
x(25-56)x(25-25)x_map(28-28)x_map(62-62)fvec_map(29-29)df(59-108)df(59-59)J_map(63-63)src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp (11)
x(145-170)x(145-145)x_map(148-148)x_map(176-176)fvec_map(149-149)df(173-204)df(173-173)J_map(177-177)x_init(55-55)getOptimizedParameters_(130-135)getOptimizedParameters_(130-130)src/openms/source/FEATUREFINDER/TraceFitter.cpp (4)
x(28-31)x(28-28)x(33-36)x(33-33)
src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp (1)
src/openms/source/FEATUREFINDER/EmgFitter1D.cpp (8)
x(25-56)x(25-25)x_map(28-28)x_map(62-62)fvec_map(29-29)df(59-108)df(59-59)J_map(63-63)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (1)
src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (16)
correctIsotopicImpurities(28-37)correctIsotopicImpurities(29-30)correctIsotopicImpurities(39-117)correctIsotopicImpurities(40-42)fillInputVector_(119-137)fillInputVector_(120-123)getIntensities_(139-158)getIntensities_(140-142)solveNNLS_(160-170)solveNNLS_(161-162)solveNNLS_(172-183)solveNNLS_(173-175)computeStats_(185-225)computeStats_(186-190)computeStats_(227-267)computeStats_(228-232)
src/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.h (1)
src/openms/source/FEATUREFINDER/EmgFitter1D.cpp (4)
x(25-56)x(25-25)df(59-108)df(59-59)
src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (1)
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (6)
solve(16-54)solve(16-17)solve(56-61)solve(56-56)solve(63-149)solve(63-63)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cppcheck-test
🔇 Additional comments (67)
src/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.h (2)
12-12: LGTM! Necessary include forstd::modf.The
#include <cmath>is required forstd::modfused in theaddValuemethod (lines 299, 313, 373, 423). This ensures the header is self-contained.
510-510: LGTM! Cleaner API without Eigen dependency.The change from
data_.getEigenMatrix().size() == 0todata_.empty()correctly implements the refactoring to remove Eigen from the public API. This is more idiomatic and maintains the same semantics while using the new Matrix interface.src/openms/CMakeLists.txt (1)
58-71: LGTM! Eigen successfully moved to private linkage.The change correctly moves Eigen3::Eigen from public to private dependencies, preventing exposure in the public API/ABI. The added comment on line 61 clearly documents the rationale.
src/tests/class_tests/openms/CMakeLists.txt (1)
70-70: LGTM! Test linkage updated correctly.Since Eigen is now private in the main library, tests that use eigenView() or other Eigen-based operations need to link against Eigen3::Eigen explicitly. This is consistent with the existing pattern for SpectraSTSimilarityScore_test and BinnedSpectrum_test.
src/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cpp (2)
14-14: LGTM! Correct include for internal Eigen utilities.The MatrixEigen.h include provides access to Eigen types (e.g., Eigen::Index) needed by the test without exposing Eigen in the public Matrix API.
56-56: LGTM! Test updated to use new Matrix API.The change from
x.getEigenMatrix().resize(4,1)tox.resize(4,1)correctly uses the public Matrix API instead of accessing the internal Eigen representation directly.Also applies to: 81-81
src/tests/class_tests/openms/source/MRMScoring_test.cpp (2)
12-12: LGTM! Correct include for eigenView helper.The MatrixEigen.h include provides the eigenView() utility for zero-copy Eigen access on Matrix objects.
738-739: LGTM! Test updated to use eigenView pattern.The changes correctly replace direct
getEigenMatrix()calls witheigenView(), which provides zero-copy Eigen access without exposing Eigen in the Matrix public API.Also applies to: 759-760
src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cpp (2)
24-25: LGTM! Correct internal Eigen includes.Replacing
Eigen/DensewithMatrixEigen.handEigen/LUaligns with the new internal Eigen access pattern and includes only the necessary Eigen components.
51-57: LGTM! Improved condition check for empty matrix.The changes correctly use
eigenView(correction_matrix)for Eigen access and improve the emptiness check at line 52 from!(em.size() == 0)to!(correction_matrix.empty()). Checking the Matrix object directly rather than the Eigen view is more robust and semantically correct.src/openms/source/ANALYSIS/TOPDOWN/Qvalue.cpp (2)
11-12: LGTM! Correct includes for Eigen operations.The MatrixEigen.h and Eigen/QR includes provide the necessary functionality for eigenView() and the complete orthogonal decomposition used in the least squares computation.
110-117: LGTM! Eigen operations correctly wrapped with eigenView.The changes properly wrap Matrix objects with eigenView() to enable Eigen operations (completeOrthogonalDecomposition, pseudoInverse, matrix multiplication) while maintaining zero-copy access.
src/topp/ImageCreator.cpp (3)
16-16: LGTM! Correct include for eigenView.The MatrixEigen.h include provides the eigenView() utility needed for Eigen operations on the BilinearInterpolation data.
283-284: LGTM! Matrix initialization updated to use public API.The change from
getEigenMatrix().resize()and.setZero()to directresize()andfill(0.0)correctly uses the public Matrix API without exposing Eigen internals.
364-364: LGTM! Max coefficient computation wrapped with eigenView.Using
eigenView(bilip.getData()).maxCoeff()correctly enables the Eigen maxCoeff operation while maintaining the abstraction between Matrix and Eigen.src/topp/IsobaricWorkflow.cpp (1)
604-608: The copy is necessary. TheNonNegativeLeastSquaresSolver::solve()method has three overloads, including one that takes a non-constMatrix<double>&reference and explicitly modifies the input during computation. The code calls this overload, so the defensive copy is both correct and required to preserve the original correction matrix.Likely an incorrect or invalid review comment.
src/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.h (1)
62-64: LGTM: Functor interface successfully migrated to raw pointers.The functor signatures now use raw pointers instead of Eigen types, achieving the PR's goal of removing Eigen from the public API. The implementation in EmgFitter1D.cpp correctly uses
Eigen::Mapwrappers for safe access, maintaining zero-copy semantics while hiding Eigen internally.src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (3)
11-13: Clear internal-only header designation.The comment clearly marks this as an internal header that should not be included in public headers, which aligns with the PR's objective to hide Eigen from the public API.
20-30: Well-defined type aliases for internal Eigen types.The type aliases provide clear, consistent naming for dynamic Eigen matrix and vector types used internally.
72-107: Consistent vector view utilities.The
eigenVectorViewoverloads provide convenient zero-copy access to std::vector and raw arrays as Eigen column vectors. The API is consistent and well-documented.src/tests/class_tests/openms/source/TraceFitter_test.cpp (1)
83-86: LGTM: Test updated to match new interface.The test's
getOptimizedParameters_override correctly updated fromEigen::VectorXdtostd::vector<double>, aligning with the PR's goal of removing Eigen from public/protected APIs.src/openms/source/FEATUREFINDER/TraceFitter.cpp (2)
16-40: Well-designed adapter for Eigen LM solver integration.The
GenericFunctorEigenAdaptercleanly wraps the raw-pointer-basedGenericFunctorinterface to work with Eigen's Levenberg-Marquardt solver, which expects Eigen types. The delegation pattern is correct and maintains zero-copy semantics for the functor calls.
117-134: Optimization flow correctly implemented.The Levenberg-Marquardt optimization flow is correct: adapter creation, solver configuration, execution, error handling, and result synchronization back to
x_init. The final call togetOptimizedParameters_receives the updated vector as expected.src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (2)
24-41: Excellent documentation for the correction algorithm.The enhanced Doxygen documentation clearly explains the isotope impurity correction algorithm, including the NNLS approach, correction matrix structure, and the physical meaning of non-negative constraints. This follows OpenMS coding guidelines for public headers.
74-75: API successfully migrated to standard library types.All private and static helper method signatures have been updated to use
std::vector<double>instead of Eigen types, successfully removing Eigen from this public header. The overloads maintain compatibility with both Matrix and vector-based workflows.Also applies to: 98-101, 113-115, 138-144, 158-162, 176-180
src/tests/class_tests/openms/source/BilinearInterpolation_test.cpp (2)
13-13: Test successfully migrated to new Matrix API.The test now uses the Matrix public API directly (
resize(),fill()) instead of accessing the internal Eigen matrix viagetEigenMatrix(). This is cleaner and aligns with the PR's goal of hiding Eigen from public interfaces.Also applies to: 67-67, 102-102, 135-136, 157-158
519-522: Test thoroughly updated with new Matrix API.The test has been comprehensively migrated to use the new Matrix API (
resize(),fill()) andeigenView()for Eigen-specific operations. The changes are consistent throughout and properly validate the new interface.src/openms/source/DATASTRUCTURES/Matrix.cpp (1)
11-20: Appropriate explicit template instantiations for ABI stability.The explicit instantiations of
Matrix<int>,Matrix<double>, andMatrix<float>ensure that symbols exist in the compiled library for these common types, maintaining backward compatibility. The comment correctly notes that Matrix is now header-only, with these instantiations provided for library symbol stability.src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cpp (3)
30-32: Matrix resize operations correctly migrated.All matrix resize operations have been updated from
getEigenMatrix().resize()to directresize()calls on the Matrix objects. This is cleaner and aligns with the new Matrix public API.Also applies to: 97-99, 128-129, 152-152, 177-177, 190-190, 234-234
370-372: Appropriate use of eigenView for Eigen operations.The code correctly uses
eigenView()to create Eigen::Map views when Eigen-specific operations likesum(),size(), ordata()access are needed. This maintains zero-copy semantics while keeping Eigen types out of the Matrix interface.Also applies to: 395-396, 499-500, 545-546, 562-563, 828-829, 868-869, 879-880, 890-891
728-729: Matrix initialization correctly updated.The matrix initialization pattern now uses
resize()followed byfill(0.0), which is the appropriate replacement for the previousgetEigenMatrix().resize()andsetZero()pattern.Also applies to: 767-768
src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h (2)
43-46: LGTM! Clean API transition from Eigen types to raw pointers.The functor interface now uses
const double*anddouble*instead ofEigen::VectorXd/Eigen::MatrixXd, successfully hiding Eigen from the public API while the implementation (per the relevant code snippets) usesEigen::Mapinternally for zero-copy access.
110-110: Signature change is consistent with the refactoring pattern.Using
std::vector<double>instead ofEigen::VectorXdaligns with the broader refactoring effort and is consistent with the implementation shown in the relevant code snippets.src/openms/source/FEATUREFINDER/EmgFitter1D.cpp (3)
25-56: LGTM! Correct use of Eigen::Map for internal computation.The implementation creates appropriately-sized
Eigen::Mapviews over the raw pointer inputs, enabling convenient Eigen-style indexing while keeping Eigen out of the public interface. The map dimensions correctly usem_inputsandm_values.
59-108: Jacobian computation correctly uses Eigen::Map with proper dimensions.The
J_mapis correctly sized as(m_values, m_inputs)matching the expected Jacobian shape, and the column-major storage assumption aligns with Eigen's default layout.
174-178: Parameter initialization correctly transitioned to std::vector.The change from
Eigen::VectorXdtostd::vector<double>with bracket indexing is consistent with the updatedoptimize_()signature.src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp (1)
55-74: Optimization flow correctly converts between std::vector and Eigen types.The implementation properly:
- Creates an
Eigen::VectorXdfromx_initviaEigen::Map- Wraps the functor with the adapter
- Runs the LM solver
- Copies results back to
x_initNote that unlike
TraceFitter::optimize_(), this base class implementation doesn't callgetOptimizedParameters_()— that's handled by derived classes (e.g.,EmgFitter1D), which is the correct design.src/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.h (2)
71-71: Signature change aligns with the refactoring pattern.The transition from
Eigen::VectorXdtostd::vector<double>is consistent with the base class and sibling fitters.
80-83: LGTM! Functor interface successfully removes Eigen from public API.The raw pointer interface (
const double*,double*) hides Eigen types while the implementation (per relevant code snippets from GaussTraceFitter.cpp lines 144-203) usesEigen::Mapinternally for efficient computation.src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (3)
31-41: Documentation is clear and complete for the Matrix-based overload.The Doxygen comments properly document parameters, return values, and exceptions as per coding guidelines.
43-58: Well-documented raw-buffer interface for NumPy/Cython interoperability.The new overload clearly documents:
- Column-major storage requirement for
A- In-place modification warnings for
Aandb- Exception conditions
This aligns with the PR objective to improve NumPy/Cython interoperability.
60-73: Convenience overload provides clean OpenMS-native interface.The documentation appropriately warns that both
Aandbwill be modified during computation, which is important for callers to understand.src/tests/class_tests/openms/source/Matrix_test.cpp (4)
43-52: LGTM! Empty matrix iteration tests are correctly implemented.The tests verify that loop bodies are not executed on empty matrices for both mutable and const iteration, which is proper behavior validation.
65-78: LGTM! Resize and fill tests correctly use the new Matrix API.The transition from
getEigenMatrix().resize()andgetEigenMatrix().fill()to directresize()andfill()methods aligns with the PR objective to hide Eigen from the public API.
94-110: LGTM! Column-major iteration order is correctly validated.The test properly verifies that iteration via
begin()/end()andcbegin()/cend()follows column-major order: (0,0), (1,0), (0,1), (1,1), (0,2), (1,2). This matches the expected storage layout for NumPy/Cython interoperability.
161-181: LGTM! getValue tests properly validate reference semantics.The test confirms that
getValue()returns a modifiable reference (line 179:+= 5operation), which is essential for the buffer-access pattern.src/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.h (3)
27-30: LGTM! Documentation clearly explains the raw pointer interface.The comment appropriately guides implementers to use
Eigen::Mapto wrap the pointers internally, which is the correct pattern demonstrated in the.cppimplementations.
52-56: LGTM! Pure virtual methods correctly define the raw pointer interface.The signatures align with the internal adapter pattern shown in
LevMarqFitter1D.cpp(lines 28-36 in relevant snippets) where raw data pointers are passed through to the functor.
101-101: LGTM! optimize_ signature correctly uses std::vector.This change removes Eigen from the protected interface while maintaining the same optimization workflow.
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h (3)
33-36: LGTM! Documentation matches LevMarqFitter1D.h pattern.The consistent documentation across both functor interfaces helps maintain clarity for implementers.
48-51: LGTM! Raw pointer interface correctly defined.The signatures are consistent with the implementations in
EGHTraceFitter.cppandGaussTraceFitter.cppthat useEigen::Mapviews internally.
157-161: LGTM! Protected methods updated to std::vector-based interface.Both
getOptimizedParameters_andoptimize_now usestd::vector<double>, removing Eigen dependencies from the class interface while maintaining functionality.src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp (4)
35-44: LGTM! Eigen::Map views correctly wrap raw pointers.The
const Eigen::VectorXdmap for input parameters and mutable map for output residuals provide zero-copy access while maintaining the Eigen-free public interface.
80-89: LGTM! Jacobian computation correctly uses Eigen::Map.The
J_mapis correctly sized as(m_values, m_inputs)for column-major storage, matching Eigen's default layout and the documented interface.
186-197: LGTM! fit() correctly initializes std::vector and calls optimize_.The transition from
Eigen::VectorXdtostd::vector<double>forx_initis clean and maintains the same initialization logic.
310-320: LGTM! getOptimizedParameters_ correctly uses vector indexing.The bracket-style indexing
x_init[i]is appropriate forstd::vectoraccess, replacing the previous Eigen parentheses-based indexing.src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp (4)
55-65: LGTM! fit() correctly initializes std::vector and delegates to optimize_.The implementation mirrors
EGHTraceFitter::fit(), maintaining consistency across the codebase.
130-135: LGTM! getOptimizedParameters_ correctly applies std::fabs to sigma.Using
std::fabsensures sigma remains non-negative after optimization, which is consistent with the physical meaning of the parameter.
145-170: LGTM! operator() correctly uses Eigen::Map for zero-copy access.The implementation follows the established pattern with proper map sizing using
m_inputsandm_values.
173-204: LGTM! df() correctly computes Jacobian via Eigen::Map.The Jacobian computation using
J_map(count, col)indexing is correct for column-major storage.src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (1)
56-61: LGTM! Delegation overload correctly extracts Matrix dimensions.This overload cleanly bridges the
Matrix<double>interface to the raw pointer implementation.src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (4)
22-32: LGTM! Clear documentation of design intent.The class documentation clearly explains the column-major storage, NumPy/Cython interoperability goals, and the internal eigenView() pattern. This provides good context for users migrating from the old Eigen-based API.
141-154: LGTM! Buffer access methods correctly implement column-major layout.The stride methods correctly reflect column-major storage:
innerStride()= 1 (consecutive rows in the same column are adjacent in memory)outerStride()= rows (columns are separated by rows_ elements)This is consistent with the indexing formula
data_[col * rows_ + row]and enables efficient zero-copy NumPy/Cython interoperability.
231-241: LGTM! Comparison operators are correct.The equality operator appropriately uses
OPENMS_PRECONDITIONfor dimension checking (debug mode only) and delegates to vector comparison. The release-mode behavior (comparing different-sized vectors returns false) is safe and well-defined.
37-73: LGTM! Modern C++ best practices followed.The class correctly implements:
- Standard container type aliases
- Rule of zero/five for special member functions
noexceptmove operations (appropriate forstd::vectorstorage)- Proper initialization in the parameterized constructor
src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (2)
19-21: LGTM! Proper use of internal Eigen utilities.The inclusion of
MatrixEigen.hcorrectly accesses the internaleigenView()API while keeping Eigen out of the public headers. This aligns with the PR's goal of hiding Eigen from the OpenMS public API.
54-64: LGTM! Correct eigenView pattern.The migration from
getEigenMatrix().isIdentity()toeigenView(correction_matrix).isIdentity()correctly implements the new zero-copy pattern. TheeigenViewprovides an Eigen::Map for Eigen-specific operations without exposing Eigen in the public API.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (1)
208-208: Fix parameter direction in documentation.Line 208 marks
m_xas@param[out]but the parameter isconst Matrix<double>&, indicating it's an input parameter. Change to@param[in].Apply this diff:
- @param[out] m_x Matrix of corrected intensities + @param[in] m_x Matrix of corrected intensities
🧹 Nitpick comments (1)
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h (1)
48-51: Consider clarifying Jacobian buffer layout.The raw pointer interface successfully removes Eigen from the public API. The documentation is mostly clear, but line 51 could be slightly more explicit.
Consider this documentation improvement:
- /// Compute Jacobian matrix. x has size inputs(), J is values() x inputs() (column-major) + /// Compute Jacobian matrix. x has size inputs(), J points to a contiguous buffer of size values() * inputs() in column-major order
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h(7 hunks)src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h(5 hunks)src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h(2 hunks)src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h
🧰 Additional context used
📓 Path-based instructions (2)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
src/openms/include/OpenMS/**/*.h
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add Doxygen comments for new public methods and classes
Files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
🧠 Learnings (12)
📓 Common learnings
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-10-21T13:02:16.431Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h
📚 Learning: 2025-08-14T10:19:54.371Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 8167
File: src/topp/Digestor.cpp:200-226
Timestamp: 2025-08-14T10:19:54.371Z
Learning: In OpenMS (C++ bioinformatics framework), use boost random libraries instead of std library random distributions for cross-platform reproducible random number generation, as std library distributions are not reproducible across platforms.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Follow the established error handling patterns
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-06-16T15:49:26.504Z
Learnt from: FreezB11
Repo: OpenMS/OpenMS PR: 7969
File: src/pyOpenMS/pxds/TMTThirtyTwoPlexQuantitationMethod.pxd:1-3
Timestamp: 2025-06-16T15:49:26.504Z
Learning: In OpenMS Python bindings (.pxd files), derived quantitation method classes like TMTThirtyTwoPlexQuantitationMethod only need to declare their constructors. All other public methods (getName, getChannelInformation, getNumberOfChannels, getIsotopeCorrectionMatrix, getReferenceChannel) are inherited from the base IsobaricQuantitationMethod class and don't need to be redeclared explicitly.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
📚 Learning: 2025-10-15T07:49:09.293Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerIM.h:11-14
Timestamp: 2025-10-15T07:49:09.293Z
Learning: In OpenMS, DefaultParamHandler.h is located under OpenMS/DATASTRUCTURES/, not OpenMS/CONCEPT/. The correct include is: `#include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>`
Applied to files:
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h
🧬 Code graph analysis (2)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (1)
src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp (16)
correctIsotopicImpurities(28-37)correctIsotopicImpurities(29-30)correctIsotopicImpurities(39-117)correctIsotopicImpurities(40-42)fillInputVector_(119-137)fillInputVector_(120-123)getIntensities_(139-158)getIntensities_(140-142)solveNNLS_(160-170)solveNNLS_(161-162)solveNNLS_(172-183)solveNNLS_(173-175)computeStats_(185-225)computeStats_(186-190)computeStats_(227-267)computeStats_(228-232)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (2)
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (1)
OpenMS(18-132)src/tests/class_tests/openms/source/Matrix_test.cpp (6)
Matrix(33-54)Matrix(33-33)Matrix(57-60)Matrix(57-57)Matrix(194-198)Matrix(194-194)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: build-macos-arm
- GitHub Check: build-lnx
- GitHub Check: build-win
- GitHub Check: build-and-test (macos-14, xcode, 15.4)
- GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
- GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
- GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
- GitHub Check: cppcheck-test
🔇 Additional comments (19)
src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h (4)
14-14: LGTM!The
<vector>include is necessary forstd::vector<double>used in the updated method signatures.
33-36: LGTM!The updated documentation clearly explains the design choice to use raw pointers instead of Eigen types in the public interface, and provides helpful guidance that implementations should use Eigen::Map internally.
157-157: LGTM!Replacing the Eigen parameter type with
std::vector<double>successfully removes Eigen from the public interface while providing a standard, compatible container.
161-161: LGTM!The updated signature using
std::vector<double>for parameters and the refactoredGenericFunctorinterface is consistent with the PR's goal to eliminate Eigen from public headers.src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (5)
13-13: LGTM!The addition of
#include <vector>is appropriate given the updated method signatures usingstd::vector<double>.
24-41: LGTM!The class documentation is comprehensive, clearly explaining the isotope impurity correction algorithm and its NNLS approach.
61-75: LGTM!The documentation for the vector-based
correctIsotopicImpuritiesoverload is clear and accurate, with proper parameter and exception documentation.
81-101: LGTM!The documentation for
fillInputVector_is thorough, with helpful warnings about cardinality requirements and a clear TMT16plex example.
104-115: LGTM!The documentation for
getIntensities_is clear and concise.src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (10)
22-42: LGTM!The class documentation clearly explains the column-major storage design and interoperability strategy. Type aliases are appropriate.
44-73: LGTM!The constructors and special member functions follow the rule of five correctly. The parameterized constructor properly initializes the column-major storage.
77-90: LGTM!The dimension accessor methods are correctly implemented.
94-139: LGTM!The element access methods correctly implement column-major indexing (
col * rows_ + row). Providing both named accessors (getValue/setValue) and operator() is good for both pyOpenMS and C++ usage.
143-160: LGTM!The buffer access methods correctly expose column-major storage characteristics. The stride values and rowMajor() flag are accurate for NumPy/Cython interoperability.
163-211: LGTM!The modifier methods are correctly implemented. The
setMatrixtemplate properly handles row-major input arrays, and the resize/fill/clear operations maintain proper invariants.
215-223: LGTM!The iterator interface is correctly implemented. Note that iteration traverses elements in column-major order, which is consistent with the storage layout.
225-246: LGTM!The comparison operators are correctly implemented with dimension precondition checks.
250-274: LGTM!The stream output operator correctly formats the matrix in row-major order for human readability, properly accessing the column-major storage via operator(). Private member layout is appropriate.
18-18: I'm ready to verify and rewrite the review comment, but I don't see one provided. Please share the review comment you'd like me to verify and rewrite, and I'll provide the rewritten version in the required format.
There was a problem hiding this comment.
Pull request overview
This PR successfully removes Eigen from OpenMS's public API by implementing Option D from issue #8456: using std::vector<T> storage for Matrix with zero-copy Eigen::Map access internally via a new MatrixEigen.h header. This change reduces coupling for downstream users who no longer need Eigen headers when using OpenMS.
Key Changes:
- Matrix reimplemented with std::vector storage (column-major) instead of inheriting from Eigen
- New internal MatrixEigen.h header provides eigenView() for zero-copy Eigen::Map access
- TraceFitter/LevMarqFitter1D functors refactored to use raw pointer interfaces instead of Eigen types
- CMake configuration updated to make Eigen3::Eigen a PRIVATE dependency
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/openms/CMakeLists.txt | Moves Eigen3::Eigen from PUBLIC to PRIVATE linking |
| src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h | Complete rewrite: std::vector storage with column-major layout, no Eigen inheritance |
| src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h | New internal header providing eigenView() utilities for zero-copy Eigen access |
| src/openms/source/DATASTRUCTURES/Matrix.cpp | Updated with explicit template instantiations |
| src/openms/include/OpenMS/FEATUREFINDER/TraceFitter.h | GenericFunctor interface changed to use raw double* instead of Eigen::VectorXd |
| src/openms/include/OpenMS/FEATUREFINDER/LevMarqFitter1D.h | GenericFunctor interface changed to use raw double* instead of Eigen::VectorXd |
| src/openms/include/OpenMS/FEATUREFINDER/GaussTraceFitter.h | Functor signatures updated to use raw pointers |
| src/openms/include/OpenMS/FEATUREFINDER/EGHTraceFitter.h | Functor signatures updated to use raw pointers |
| src/openms/include/OpenMS/FEATUREFINDER/EmgFitter1D.h | Functor signatures updated to use raw pointers |
| src/openms/source/FEATUREFINDER/TraceFitter.cpp | Added GenericFunctorEigenAdapter for LM solver integration |
| src/openms/source/FEATUREFINDER/LevMarqFitter1D.cpp | Added GenericFunctorConstEigenAdapter for LM solver integration |
| src/openms/source/FEATUREFINDER/GaussTraceFitter.cpp | Implementation updated to use raw pointers with Eigen::Map internally |
| src/openms/source/FEATUREFINDER/EGHTraceFitter.cpp | Implementation updated to use raw pointers with Eigen::Map internally |
| src/openms/source/FEATUREFINDER/EmgFitter1D.cpp | Implementation updated to use raw pointers with Eigen::Map internally |
| src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h | Added new overloads for raw pointer and Matrix/vector interfaces |
| src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp | Refactored to support multiple interfaces, maintains in-place modification behavior |
| src/openms/include/OpenMS/ML/INTERPOLATION/BilinearInterpolation.h | Updated empty() to use Matrix::empty() instead of Eigen |
| src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h | Removed Eigen forward declarations, updated signatures to use std::vector |
| src/openms/source/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.cpp | Uses eigenView() for Eigen operations, updated to work with vectors |
| src/openms/source/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.cpp | Uses eigenView() for Eigen operations |
| src/openms/source/ANALYSIS/TOPDOWN/Qvalue.cpp | Uses eigenView() for Eigen matrix operations |
| src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cpp | Uses Matrix::resize() and eigenView() instead of getEigenMatrix() |
| src/topp/IsobaricWorkflow.cpp | Creates copy of correction matrix before NNLS (which modifies input) |
| src/topp/ImageCreator.cpp | Uses eigenView() for maxCoeff() operation, updated Matrix API usage |
| src/tests/class_tests/openms/source/TraceFitter_test.cpp | Updated test to match new functor signature |
| src/tests/class_tests/openms/source/Matrix_test.cpp | Updated to use new Matrix API (resize, fill, iterators) |
| src/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cpp | Updated to use Matrix::resize() instead of getEigenMatrix().resize() |
| src/tests/class_tests/openms/source/BilinearInterpolation_test.cpp | Updated to use new Matrix API, uses eigenView() for Eigen operations |
| src/tests/class_tests/openms/source/MRMScoring_test.cpp | Updated to use eigenView() for Eigen operations |
| src/tests/class_tests/openms/CMakeLists.txt | Added Eigen3::Eigen link for BilinearInterpolation_test |
| #include "OpenMS/OPENSWATHALGO/OpenSwathAlgoConfig.h" | ||
|
|
||
| #include "OpenMS/ANALYSIS/OPENSWATH/MRMScoring.h" | ||
| #include "OpenMS/DATASTRUCTURES/MatrixEigen.h" |
There was a problem hiding this comment.
The test file includes MatrixEigen.h and uses eigenView(), but it doesn't appear to have an explicit link to Eigen3::Eigen in CMakeLists.txt. While the test might work because it links against OpenMS which has Eigen as a PRIVATE dependency, tests that directly use Eigen types or eigenView() should explicitly link against Eigen3::Eigen for clarity and to ensure they can access Eigen headers. Consider adding target_link_libraries(MRMScoring_test Eigen3::Eigen) in the test CMakeLists.txt.
Add testMatrixDoubleColumnMajorOrdering() to verify that the Matrix class correctly preserves row/column ordering when passing data between numpy and C++. This test catches potential column-major vs row-major issues that could cause data transposition. The test verifies: - Shape preservation (3x4 matrix stays 3x4, not transposed to 4x3) - Element-by-element verification via getValue matches numpy indexing - Round-trip preservation (numpy -> C++ -> numpy) - View indexing matches getValue for all elements - Modifications through numpy view are reflected in C++ object - Highly non-square matrices (2x5) work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update the documentation for the non-const solveNNLS_ overload to correctly indicate that correction_matrix is modified in-place by the NNLS solver. Changed @PARAM[in] to @PARAM[in,out] and added a @note explaining that this overload mutates the matrix for efficiency, with a reference to the const-preserving overload for cases where the original must be preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Change @PARAM[out] x_naive to @PARAM[in] (it's const reference input) - Change @PARAM[in] stats to @PARAM[in,out] (it's modified by function) - Clarify that x_naive is LU-decomposition solution, not "uncorrected" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add proper @PARAM[in], @PARAM[out], @PARAM[in,out] annotations based on actual implementation behavior: - const Matrix& overload: A and b are [in] (copies made internally) - raw pointer overload: A and b are [in,out] (modified by NNLS solver) - Matrix& overload: A and b are [in,out] (passed to raw pointer version) Also clarify in @brief that const overload preserves originals while non-const overloads modify inputs in-place for efficiency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Remove contradictory comment that said "No explicit template instantiations needed" when explicit instantiations are present. Clarify that these are explicit instantiations to compile template code into libOpenMS.so, not "default instances for backwards compatibility". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Hmmmm what do you think? Should work but you lose a lot of readability in the methods if everything is just a double*. |
|
Can we maybe add a shim/strong typedef in OpenMS at least? Not sure if possible. |
|
we could also use std::span which would give at least some boundary checks in debug mode. |
Remove include of internal MatrixEigen.h header and replace Eigen::Index with Size. This aligns with the PR goal of hiding Eigen from the public API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (2)
123-130: Fix parameter direction form_xin documentation.Line 125 marks
m_xas@param[in], but the signature at line 130 showsMatrix<double>& m_x(non-const reference), which is the output vector of corrected intensities.Apply this diff:
- @param[in] m_x The output vector of corrected intensities (x) + @param[out] m_x The output vector of corrected intensities (x)
201-216: Fix parameter directions in the secondupdateOutputMap_overload.Two documentation issues:
- Line 208:
@param[out] consensus_map_outis inconsistent with line 191's@param[in,out]for the same parameter in the first overload.- Line 210:
@param[out] m_xis incorrect—the signature at line 216 showsconst Matrix<double>& m_x, which is an input parameter.Apply this diff:
- @param[out] consensus_map_out The output consensus map to be updated - @param[in] current_cf Index of the current consensus feature - @param[out] m_x Matrix of corrected intensities + @param[in,out] consensus_map_out The output consensus map to be updated + @param[in] current_cf Index of the current consensus feature + @param[in] m_x Matrix of corrected intensities
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h(7 hunks)src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h(3 hunks)src/openms/source/DATASTRUCTURES/Matrix.cpp(1 hunks)src/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cpp(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/tests/class_tests/openms/source/NonNegativeLeastSquaresSolver_test.cpp
🧰 Additional context used
📓 Path-based instructions (2)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
src/openms/include/OpenMS/**/*.h
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add Doxygen comments for new public methods and classes
Files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
🧠 Learnings (12)
📓 Common learnings
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-10-21T13:02:16.431Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-07-29T10:05:48.139Z
Learnt from: poshul
Repo: OpenMS/OpenMS PR: 8133
File: src/openms/include/OpenMS/ANALYSIS/TARGETED/TargetedExperimentHelper.h:0-0
Timestamp: 2025-07-29T10:05:48.139Z
Learning: In the Nuctide class in TargetedExperimentHelper.h, the Modification struct is intentionally defined but not used (no mods_ member or related methods). This is by design and should be documented with a comment to avoid confusion.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/openms/source/DATASTRUCTURES/Matrix.cpp
📚 Learning: 2025-08-14T10:19:54.371Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 8167
File: src/topp/Digestor.cpp:200-226
Timestamp: 2025-08-14T10:19:54.371Z
Learning: In OpenMS (C++ bioinformatics framework), use boost random libraries instead of std library random distributions for cross-platform reproducible random number generation, as std library distributions are not reproducible across platforms.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Follow the established error handling patterns
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.hsrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-06-16T15:49:26.504Z
Learnt from: FreezB11
Repo: OpenMS/OpenMS PR: 7969
File: src/pyOpenMS/pxds/TMTThirtyTwoPlexQuantitationMethod.pxd:1-3
Timestamp: 2025-06-16T15:49:26.504Z
Learning: In OpenMS Python bindings (.pxd files), derived quantitation method classes like TMTThirtyTwoPlexQuantitationMethod only need to declare their constructors. All other public methods (getName, getChannelInformation, getNumberOfChannels, getIsotopeCorrectionMatrix, getReferenceChannel) are inherited from the base IsobaricQuantitationMethod class and don't need to be redeclared explicitly.
Applied to files:
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h
🧬 Code graph analysis (1)
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (1)
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (6)
solve(16-54)solve(16-17)solve(56-61)solve(56-56)solve(63-149)solve(63-63)
🔇 Additional comments (10)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricIsotopeCorrector.h (5)
11-13: Includes correctly updated for the new Eigen-free API.The addition of
<vector>and removal of Eigen forward declarations aligns well with the PR objective of hiding Eigen from the public API. The Matrix.h include provides the OpenMS container needed for the interface.
59-75: Clean public API using std::vector for Cython/NumPy interop.The new
correctIsotopicImpuritiesoverload takingstd::vector<double>&provides the stable, Eigen-free buffer interface mentioned in the PR objectives. Documentation correctly indicates in-place modification with@param[in,out].
98-115: Private helpers correctly refactored to use OpenMS containers.Both
fillInputVector_andgetIntensities_now usestd::vector<double>andMatrix<double>, keeping Eigen out of the header. Documentation accurately describes parameter directions.
132-146: Documentation for in-place modification correctly added (addresses past review).The
@noteclarifying thatcorrection_matrixis mutated in-place and the@param[in,out]direction marker properly address the previous review feedback.
148-182: Documentation forcomputeStats_overloads is correct.Both overloads now have accurate parameter direction markers. The previous issue with
x_naivebeing marked as@param[out]when it's a const reference has been correctly fixed to@param[in].src/openms/source/DATASTRUCTURES/Matrix.cpp (2)
13-14: Comment correctly explains explicit template instantiation.The updated comment accurately describes explicit template instantiation and addresses the previous review feedback.
15-17: All Matrix types used in the codebase are properly instantiated. The three instantiations (Matrix<int>,Matrix<double>,Matrix<float>) cover all actual usage:
Matrix<int>is used in SpectralDeconvolution and MRMScoring production codeMatrix<double>is used in quantitation methods and signal processingMatrix<float>is used in PeakGroup and interpolation algorithmsNo other numeric types (unsigned int, long, size_t, etc.) are instantiated with Matrix in the codebase.
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (3)
12-12: LGTM!The
<vector>include is necessary for the newstd::vector<double>parameters in the added overloads.
31-43: LGTM!The const-qualified signature and documentation clearly communicate that inputs are preserved. The implementation confirms that A and b are copied before solving.
62-74: Implementation is correctly present. Thesolve(Matrix<double>&, std::vector<double>&, std::vector<double>&)overload is properly implemented at lines 56-61 ofsrc/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp. It extracts matrix dimensions and delegates to the lower-level solver, consistent with the documented in-place modification behavior. Documentation is accurate and complete.
Test coverage for the internal Eigen-based utilities in MatrixEigen.h: - eigenView() for mutable and const Matrix - eigenVectorView() for std::vector and raw pointers - eigenMatrixView() for raw pointers - Zero-copy verification (modifications through view affect original) - Eigen operations work correctly on views - Matrix/view consistency with column-major storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Document memory requirements, ownership semantics, and lifetime constraints for the double* A parameter: - Must be non-null, pointing to A_rows * A_cols contiguous doubles - Column-major storage order required - Caller retains ownership and must ensure validity during call - Contents modified in-place and undefined after call - nullptr or undersized buffer is undefined behavior Also add note recommending Matrix& overload for safety and mention std::span as potential future improvement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
MRMScoring_test.cpp includes MatrixEigen.h which requires Eigen headers. Since Eigen is a PRIVATE dependency of OpenMS, tests that directly include internal Eigen-dependent headers must explicitly link to Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (2)
45-68: Well-documented raw pointer interface addresses previous safety concerns.The comprehensive documentation on lines 50-55 successfully addresses the previous review comments about pointer safety, memory requirements, ownership, and undefined behavior. The note about
std::spanas a future alternative (lines 64-65) is a good forward-looking suggestion.Optional parameter description clarifications:
For completeness, consider these minor refinements:
- Line 58 (
@param[in,out] b): Explicitly state "of size A_rows" to reinforce the dimensional constraint checked at line 62.- Line 59 (
@param[out] x): Note that x will be resized to A_cols by the implementation (per line 10 of the .cpp), so initial size is irrelevant.🔎 Optional documentation refinements
- @param[in,out] b Input vector b of size m. Modified in-place by the solver. - @param[out] x Output vector with non-negative least square solution of size n. + @param[in,out] b Input vector b of size A_rows (m). Modified in-place by the solver. + @param[out] x Output vector with non-negative least square solution of size A_cols (n). Resized automatically.
70-82: LGTM: Consistent in-place semantics across overloads.The documentation clearly states that both
Aandbare modified in-place (lines 75-77), which correctly reflects the implementation (delegates to the raw pointer version) and maintains consistency with the raw pointer overload. This addresses the previous review concern about inconsistent documentation between theMatrix&and raw pointer overloads.Optional: As with the raw pointer overload, consider noting that
xis resized automatically to matchA.cols()(line 77).
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h(3 hunks)src/tests/class_tests/openms/CMakeLists.txt(1 hunks)src/tests/class_tests/openms/executables.cmake(1 hunks)src/tests/class_tests/openms/source/MatrixEigen_test.cpp(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
src/openms/include/OpenMS/**/*.h
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add Doxygen comments for new public methods and classes
Files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
src/tests/class_tests/openms/**/*.cpp
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Write unit tests for new functionality
Files:
src/tests/class_tests/openms/source/MatrixEigen_test.cpp
🧠 Learnings (11)
📓 Common learnings
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
📚 Learning: 2025-09-03T12:58:20.032Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/tests/topp/CMakeLists.txt:1857-1865
Timestamp: 2025-09-03T12:58:20.032Z
Learning: OpenMS tests: When adding new TOPP tests in src/tests/topp/CMakeLists.txt that compare outputs via FuzzyDiff, always add set_tests_properties("<tool>_<n>_out<m>" PROPERTIES DEPENDS "<tool>_<n>") to avoid flakiness under parallel CTest runs.
Applied to files:
src/tests/class_tests/openms/executables.cmakesrc/tests/class_tests/openms/source/MatrixEigen_test.cppsrc/tests/class_tests/openms/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality
Applied to files:
src/tests/class_tests/openms/executables.cmakesrc/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.hsrc/tests/class_tests/openms/source/MatrixEigen_test.cppsrc/tests/class_tests/openms/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/*Test.cpp : Follow naming convention: `ClassNameTest.cpp` for `ClassName`
Applied to files:
src/tests/class_tests/openms/executables.cmakesrc/tests/class_tests/openms/source/MatrixEigen_test.cppsrc/tests/class_tests/openms/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Follow the established error handling patterns
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-14T10:19:54.371Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 8167
File: src/topp/Digestor.cpp:200-226
Timestamp: 2025-08-14T10:19:54.371Z
Learning: In OpenMS (C++ bioinformatics framework), use boost random libraries instead of std library random distributions for cross-platform reproducible random number generation, as std library distributions are not reproducible across platforms.
Applied to files:
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/tests/class_tests/openms/source/MatrixEigen_test.cppsrc/tests/class_tests/openms/CMakeLists.txt
🧬 Code graph analysis (1)
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (1)
src/openms/source/ML/NNLS/NonNegativeLeastSquaresSolver.cpp (6)
solve(16-54)solve(16-17)solve(56-61)solve(56-56)solve(63-149)solve(63-63)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: build-lnx-arm
- GitHub Check: build-lnx
- GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
- GitHub Check: build-and-test (macos-14, xcode, 15.4)
- GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
- GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
- GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
- GitHub Check: cppcheck-test
🔇 Additional comments (5)
src/tests/class_tests/openms/source/MatrixEigen_test.cpp (1)
1-269: Excellent comprehensive test coverage for internal MatrixEigen utilities.The test suite thoroughly exercises all eigenView variants:
- Mutable and const Matrix views with bidirectional zero-copy validation
- Vector views over std::vector and raw pointers
- Matrix views over raw pointers with explicit column-major layout verification
- Eigen operations (isIdentity, isDiagonal, sum, trace, matrix-vector multiplication)
- Cross-view consistency checks
The tests properly validate the zero-copy semantics and follow OpenMS test conventions.
Optional: Consider adding edge case tests
While the current coverage is comprehensive for the expected usage patterns, you could optionally add tests for edge cases:
- Empty matrices (0x0) and vectors (size 0)
- Single-element matrices (1x1) and vectors (size 1)
- Very large dimensions to ensure no overflow in stride calculations
Given that MatrixEigen.h is an internal API with controlled usage, the current test coverage is sufficient for approval.
src/tests/class_tests/openms/executables.cmake (1)
68-68: LGTM! Test executable properly registered.MatrixEigen_test is correctly added to the datastructures_executables_list in alphabetical order and appropriate category.
src/tests/class_tests/openms/CMakeLists.txt (1)
70-72: LGTM! Eigen linkage correctly added for tests using internal Eigen utilities.These three tests now require Eigen linkage because they use internal MatrixEigen utilities (eigenView, etc.):
- BilinearInterpolation_test
- MatrixEigen_test
- MRMScoring_test
This aligns with the PR's architecture where Eigen is a private dependency of OpenMS, and tests exercising internal Eigen-based utilities link explicitly to Eigen3::Eigen.
src/openms/include/OpenMS/ML/NNLS/NonNegativeLeastSquaresSolver.h (2)
12-12: LGTM: Include directive correctly added.The
<vector>include is necessary and correctly placed for the new API that usesstd::vector<double>.
31-43: LGTM: Clear documentation of copy semantics.The updated documentation explicitly states this overload preserves the input by copying, which helps users distinguish it from the in-place variants and choose the appropriate overload for their use case.
- Add maxValue() and minValue() methods to Matrix class using std::max_element/std::min_element - Update ImageCreator.cpp to use Matrix::maxValue() instead of eigenView().maxCoeff() - Remove MatrixEigen.h include from ImageCreator.cpp This fixes the build error where ImageCreator failed to compile because it included MatrixEigen.h but TOPP tools don't link against Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Part of hiding Eigen from the public API. Tests should not use Eigen types directly since Eigen is an internal implementation detail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix build failure caused by missing std::atomic include. This was previously provided transitively through Eigen headers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp (1)
125-157: Synchronizeerror_messagewrites in generic exception handler within spectrum population loopA data race occurs when two threads access the same memory without proper synchronization. The spectrum population code at lines 125-157 has an unsynchronized write to the shared
error_messagevariable in the genericcatch (...)block:catch (...) { ++errCount; error_message = "Unknown exception during spectrum data population"; }While the
BaseExceptionhandler protects both updates under#pragma omp critical(MZMLErrorHandling), the generic catch lacks this protection. This creates a data race since multiple threads can write toerror_messagesimultaneously.The chromatogram error handler (lines 190+) differs by not assigning to
error_messagein its generic catch, but the spectrum code should follow the same synchronization pattern:catch (...) { - ++errCount; - error_message = "Unknown exception during spectrum data population"; + #pragma omp critical(MZMLErrorHandling) + { + ++errCount; + error_message = "Unknown exception during spectrum data population"; + } }This keeps error handling consistent across both catch blocks and eliminates the undefined behavior.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
🧠 Learnings (7)
📓 Common learnings
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Follow the established error handling patterns
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Be mindful of memory usage when processing large datasets
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
- GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
- GitHub Check: build-and-test (macos-14, xcode, 15.4)
- GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
- GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
- GitHub Check: build-lnx
- GitHub Check: build-macos-arm
- GitHub Check: build-lnx-arm
- GitHub Check: build-win
- GitHub Check: cppcheck-test
🔇 Additional comments (1)
src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp (1)
21-21: Including<atomic>here is correct and necessary
std::atomic<int> errCountinpopulateSpectraWithData_()requires<atomic>; adding this include removes reliance on transitive headers and improves portability.Please confirm your targeted compilers all support C++11
<atomic>(they should), and that no other translation unit still usesstd::atomicwithout including<atomic>directly.
@copilot fix
|
|
@timosachsenberg I've opened a new pull request, #8529, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Fix Doxygen warnings in Matrix.h getValue/setValue documentation Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 6
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h(5 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/openms/**/*.{cpp,h,hpp,cc,cxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms
Files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
src/openms/include/OpenMS/**/*.h
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add Doxygen comments for new public methods and classes
Files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
🧠 Learnings (7)
📓 Common learnings
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use appropriate OpenMS containers and algorithms
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Consider algorithmic complexity for data processing operations
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-11-18T20:08:08.900Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8374
File: src/pyOpenMS/pxds/SimpleSVM.pxd:0-0
Timestamp: 2025-11-18T20:08:08.900Z
Learning: In pyOpenMS .pxd files, copy constructors should be declared for wrapped C++ classes (e.g., `ClassName(ClassName&) except + nogil`) even when the C++ class has a deleted copy constructor. This is a standard pyOpenMS/Cython convention required for proper wrapper generation and Python object semantics.
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/pyOpenMS/**/*.h : Add Doxygen comments for new public methods and classes in pyOpenMS bindings
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
📚 Learning: 2025-10-21T13:02:16.431Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8318
File: src/openms/include/OpenMS/ML/CLUSTERING/HashGrid.h:466-480
Timestamp: 2025-10-21T13:02:16.431Z
Learning: In OpenMS, when making internal methods public (e.g., in HashGrid.h), remove XXX/TODO comments about implementation details rather than documenting them in the public API documentation.
Applied to files:
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h
🧬 Code graph analysis (1)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (2)
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h (1)
OpenMS(18-132)src/tests/class_tests/openms/source/Matrix_test.cpp (6)
Matrix(33-54)Matrix(33-33)Matrix(57-60)Matrix(57-57)Matrix(194-198)Matrix(194-194)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
- GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
- GitHub Check: build-and-test (macos-14, xcode, 15.4)
- GitHub Check: cppcheck-test
🔇 Additional comments (8)
src/openms/include/OpenMS/DATASTRUCTURES/Matrix.h (8)
12-32: LGTM! Clear documentation of design decisions.The class documentation effectively explains the column-major storage choice and internal/external API separation. The includes are appropriate for the new implementation.
37-42: LGTM! Standard container type aliases.Following STL conventions improves code consistency and enables generic programming patterns.
44-73: LGTM! Proper RAII and rule-of-five implementation.The constructors correctly initialize the column-major storage, and defaulted special members are appropriate for this design.
77-92: LGTM! Standard dimension accessors.The dimension accessors are correctly implemented and follow STL container conventions.
106-137: LGTM! Correct column-major indexing and good documentation.The getValue() and setValue() methods correctly implement column-major indexing (col × rows + row) and provide complete Doxygen documentation including the rationale for pyOpenMS compatibility.
235-260: LGTM! Well-documented reduction operations.The maxValue() and minValue() methods correctly use STL algorithms and clearly document the empty-matrix behavior (returning default-constructed Value). This is a pragmatic design choice that avoids exceptions.
287-305: LGTM! Correct stream output with proper documentation.The operator<< correctly outputs the matrix in row-major format (intuitive for reading) even though internal storage is column-major. Documentation is complete.
307-311: LGTM! Clear private member organization.The private members are well-organized with clear inline comments indicating the column-major storage layout.
* [FEATURE] Add FAIMS support to ProteomicsLFQ (#8478) - Annotate peptide IDs with FAIMS_CV from spectrum data before feature detection, enabling proper per-CV filtering in FeatureFinderIdentificationAlgorithm - Add documentation describing FAIMS support: automatic detection, per-CV processing, feature merging, and downstream alignment/linking FAIMS data is now automatically handled: 1. FFI splits data by compensation voltage and processes each CV group 2. Features from different CVs representing the same analyte are merged 3. Merged features are aligned and linked based on RT and m/z 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> * Add append() and extend() methods to pyOpenMS map classes with __len__ support (#8510) Implements feature request #8124 by adding Pythonic methods to: - ConsensusMap: __len__, append, extend - FeatureMap: __len__, append, extend - PeptideIdentificationList: append, extend (already had __len__) These methods provide a more Pythonic interface: - __len__() enables use of built-in len() function - append() adds single items (equivalent to push_back()) - extend() adds multiple items from iterables or other map objects Includes comprehensive unit tests for all new methods. Co-authored-by: Claude <[email protected]> * Store PeptideIndexer settings as metavalues in SearchParameters (#8489) * Initial plan * Add PeptideIndexer settings as metavalues in ProteinIdentification Co-authored-by: jpfeuffer <[email protected]> * Extract metavalue keys as constants to improve maintainability Co-authored-by: jpfeuffer <[email protected]> * Remove trailing whitespace from PeptideIndexing.h Co-authored-by: jpfeuffer <[email protected]> * Use !empty() instead of size() > 0 for better readability Co-authored-by: jpfeuffer <[email protected]> * Store PeptideIndexer settings in SearchParameters instead of ProteinIdentification Co-authored-by: jpfeuffer <[email protected]> * Remove unnecessary static constants for metavalue keys Co-authored-by: jpfeuffer <[email protected]> * Fix PeptideIndexing test and update test output files - Fix unit test to provide ProteinIdentification before running (the test was creating an empty prot_ids vector but expecting metavalues to be set - the code only updates existing ProteinIdentifications) - Update all PeptideIndexer TOPP test expected output files to include the new metavalues in SearchParameters 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add PeptideIndexer settings to TOPP test expected output files (#8509) Update expected output files to include PeptideIndexer settings that are now written to SearchParameters. This includes decoy_string, enzyme, enzyme_specificity, and related parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * Add PeptideIndexer params to SageAdapter test output (#8518) Update the SageAdapter_1_out.idXML test file to include the PeptideIndexer metavalues that were missing from the PR #8509 update which added these to other adapter test files. Co-authored-by: Claude <[email protected]> * Check the return value of configure so that we stop on configure errors (#8515) * Check the return value of configure so that we stop on configure errors * make sure nsis is in path. * Simplify notarization step in CI workflow Removed redundant notarization parameters from CI workflow. * fix cat-on-keyboard error Updated the workflow to use a structured THIRDPARTY directory. * Simplify CI workflow by removing deb dependency check Removed conditional dependency installation for deb packages in CI workflow. * Use external libraries from Debian repos to prevent deb package conflicts (#8496) * Initial plan * Use external SQLite3, SQLiteCpp, nlohmann-json, and SIMDe from Debian repos Co-authored-by: jpfeuffer <[email protected]> * Fix debian package dependencies - SQLiteCpp is static library Co-authored-by: jpfeuffer <[email protected]> * Add documentation for USE_EXTERNAL_* CMake options Co-authored-by: jpfeuffer <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Samuel Wein <[email protected]> * Use unsigned channel identifiers in peptide quantification (#8516) * Remove non-schema CMakeLists.txt from OPENSWATH directory (#8513) * Initial plan * Remove non-standard CMakeLists.txt from OPENSWATH directory Co-authored-by: jpfeuffer <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> * explicitly add timestamping to notarization process (#8527) * Hide Eigen from OpenMS public API (Issue #8456) (#8511) * Hide Eigen from OpenMS public API (Issue #8456) This implements Option D from issue #8456: use Eigen::Map only without PIMPL. Changes: - Move Eigen3::Eigen from PUBLIC to PRIVATE linking in CMakeLists.txt - Rewrite Matrix<T> to use std::vector<T> storage (column-major) - Add internal MatrixEigen.h with eigenView() for zero-copy Eigen access - Refactor TraceFitter/LevMarqFitter1D GenericFunctor to use raw double* instead of Eigen types in public interface - Update all internal code to use eigenView() where Eigen operations needed - Add missing includes (<cmath>, <Eigen/LU>, <Eigen/QR>) where needed - Update tests to link against Eigen when using eigenView() directly The Matrix class now provides: - std::vector storage with data() pointer access - getValue/setValue methods for element access - eigenView() (internal) for full Eigen matrix operations Downstream users no longer need Eigen headers when using OpenMS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add pyOpenMS test for Matrix column-major ordering Add testMatrixDoubleColumnMajorOrdering() to verify that the Matrix class correctly preserves row/column ordering when passing data between numpy and C++. This test catches potential column-major vs row-major issues that could cause data transposition. The test verifies: - Shape preservation (3x4 matrix stays 3x4, not transposed to 4x3) - Element-by-element verification via getValue matches numpy indexing - Round-trip preservation (numpy -> C++ -> numpy) - View indexing matches getValue for all elements - Modifications through numpy view are reflected in C++ object - Highly non-square matrices (2x5) work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen for solveNNLS_ to document in-place matrix modification Update the documentation for the non-const solveNNLS_ overload to correctly indicate that correction_matrix is modified in-place by the NNLS solver. Changed @param[in] to @param[in,out] and added a @note explaining that this overload mutates the matrix for efficiency, with a reference to the const-preserving overload for cases where the original must be preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen for computeStats_ to correctly document parameters - Change @param[out] x_naive to @param[in] (it's const reference input) - Change @param[in] stats to @param[in,out] (it's modified by function) - Clarify that x_naive is LU-decomposition solution, not "uncorrected" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen param annotations for NonNegativeLeastSquaresSolver Add proper @param[in], @param[out], @param[in,out] annotations based on actual implementation behavior: - const Matrix& overload: A and b are [in] (copies made internally) - raw pointer overload: A and b are [in,out] (modified by NNLS solver) - Matrix& overload: A and b are [in,out] (passed to raw pointer version) Also clarify in @brief that const overload preserves originals while non-const overloads modify inputs in-place for efficiency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix misleading comments about Matrix template instantiations Remove contradictory comment that said "No explicit template instantiations needed" when explicit instantiations are present. Clarify that these are explicit instantiations to compile template code into libOpenMS.so, not "default instances for backwards compatibility". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove Eigen dependency from NonNegativeLeastSquaresSolver_test Remove include of internal MatrixEigen.h header and replace Eigen::Index with Size. This aligns with the PR goal of hiding Eigen from the public API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add unit tests for internal MatrixEigen utilities Test coverage for the internal Eigen-based utilities in MatrixEigen.h: - eigenView() for mutable and const Matrix - eigenVectorView() for std::vector and raw pointers - eigenMatrixView() for raw pointers - Zero-copy verification (modifications through view affect original) - Eigen operations work correctly on views - Matrix/view consistency with column-major storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add pointer-safety documentation for NNLS raw-pointer overload Document memory requirements, ownership semantics, and lifetime constraints for the double* A parameter: - Must be non-null, pointing to A_rows * A_cols contiguous doubles - Column-major storage order required - Caller retains ownership and must ensure validity during call - Contents modified in-place and undefined after call - nullptr or undersized buffer is undefined behavior Also add note recommending Matrix& overload for safety and mention std::span as potential future improvement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Link MRMScoring_test to Eigen3::Eigen MRMScoring_test.cpp includes MatrixEigen.h which requires Eigen headers. Since Eigen is a PRIVATE dependency of OpenMS, tests that directly include internal Eigen-dependent headers must explicitly link to Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove Eigen dependency from ImageCreator - Add maxValue() and minValue() methods to Matrix class using std::max_element/std::min_element - Update ImageCreator.cpp to use Matrix::maxValue() instead of eigenView().maxCoeff() - Remove MatrixEigen.h include from ImageCreator.cpp This fixes the build error where ImageCreator failed to compile because it included MatrixEigen.h but TOPP tools don't link against Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Replace Eigen::Index with Size in test files Part of hiding Eigen from the public API. Tests should not use Eigen types directly since Eigen is an internal implementation detail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add missing <atomic> include to MzMLHandler.cpp Fix build failure caused by missing std::atomic include. This was previously provided transitively through Eigen headers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen documentation warnings in Matrix.h (#8529) * Initial plan * Fix Doxygen warnings in Matrix.h getValue/setValue documentation Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Copilot <[email protected]> * Wrap Math::getPPM template functions for Python bindings (#8525) * Initial plan * Add Math.pxd wrapper and unit tests for Math::getPPM functions Co-authored-by: timosachsenberg <[email protected]> * Update Math.pxd to properly handle template functions with concrete double type Co-authored-by: timosachsenberg <[email protected]> * Remove unnecessary wrap-as directives from Math.pxd Co-authored-by: timosachsenberg <[email protected]> * Improve documentation for Math class wrapper with usage examples Co-authored-by: timosachsenberg <[email protected]> * Add wrap-doc documentation at function level for all Math functions Co-authored-by: timosachsenberg <[email protected]> * Update Math class documentation to be more general and extensible Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Add precursor m/z range filter to PeakFileOptions (#8526) * Initial plan * Add precursor m/z range filter support to PeakFileOptions Co-authored-by: timosachsenberg <[email protected]> * Implement precursor m/z range filtering in MzML, MzXML, and MzData handlers Co-authored-by: timosachsenberg <[email protected]> * Fix MzXMLHandler to properly skip filtered spectra by removing from spectrum_data_ Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Initial plan * Changes before error encountered Co-authored-by: timosachsenberg <[email protected]> * Remove MS level check from precursor m/z range filter Co-authored-by: timosachsenberg <[email protected]> * [DOC] Add AGENTS.md guidance (#8537) * [DOC] Add AGENTS.md guidance * [DOC] Update TOPP tool documentation paths * Implement to_df directly in Cython files (#8520) * Move get_df() methods directly into Cython .pyx addon files Instead of using Python wrapper classes in _dataframes.py to add DataFrame export functionality, implement get_df() directly in the Cython addon files alongside get_data_dict(). This simplifies the architecture by: - Removing the "duck typing hack" of wrapper classes that override Cython classes - Putting all DataFrame logic in one place (the Cython addon files) - Making the code flow more straightforward Changes: - MSSpectrum.pyx: Added get_df() - MSChromatogram.pyx: Added get_df() - Mobilogram.pyx: Added get_df() - MSExperiment.pyx: Added get_df_columns(), get_df(), get_ion_df(), get_massql_df() - ConsensusMap.pyx: Added get_df_columns(), get_intensity_df(), get_metadata_df(), get_df() - FeatureMap.pyx: Added get_df_columns(), get_df(), get_assigned_peptide_identifications() - MRMTransitionGroupCP.pyx: New addon with get_chromatogram_df(), get_feature_df() methods - _dataframes.py: Simplified to only export standalone functions - README.md: Updated documentation to reflect new pattern * Add get_df() to PeptideIdentificationList and comprehensive tests - Add get_df() and update_scores_from_df() methods to PeptideIdentificationList.pyx following the same pattern as other data structures - Update _dataframes.py to use backwards-compatible wrapper functions that call the new methods (peptide_identifications_to_df → peps.get_df(), update_scores_from_df → peps.update_scores_from_df()) - Simplify _dataframes.py by removing duplicate implementation code - Add comprehensive tests for: - PeptideIdentificationList.get_df() with various parameters - PeptideIdentificationList.update_scores_from_df() - Mobilogram.get_df() column selection - Backwards-compatible wrapper functions * Fix Cython compilation errors in get_df() addon methods - Use lazy pandas imports inside methods to avoid module-level import issues - Replace bool() calls with len() > 0 to avoid Cython type conflicts - Replace {bool: ...} dict keys with {type(True): ...} for same reason - Rename 'long' parameter to 'long_format' to avoid Cython keyword conflict 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add to_arrow() methods for Apache Arrow Table export Add to_arrow() methods to pyOpenMS classes following the Polars naming convention: - MSSpectrum.to_arrow() - reuses get_data_dict() for efficient numpy-to-Arrow conversion - MSChromatogram.to_arrow() - reuses get_data_dict() - Mobilogram.to_arrow() - reuses get_data_dict() - MSExperiment.to_arrow() - supports long_format parameter like get_df() - ConsensusMap.to_arrow() - wraps get_df() with pa.Table.from_pandas() - FeatureMap.to_arrow() - wraps get_df() with pa.Table.from_pandas() - MRMTransitionGroupCP.chromatograms_to_arrow(), features_to_arrow() - PeptideIdentificationList.to_arrow() All methods use lazy imports for pyarrow to keep it as an optional dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix UnboundLocalError in PeptideIdentificationList.get_df() When a PeptideHit doesn't have a particular metavalue, the code would reference an undefined 'val' variable. Fix by using the precomputed dmv[idx] array which already contains the correct default missing value for each metavalue's type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix bugs and add tests for DataFrame/Arrow export Bug fixes: - ConsensusMap.get_intensity_df(): Fix np.fromiter count truncation by computing actual row count (one row per file per feature) - MSExperiment.get_massql_df(): Fix division by zero in intensity normalization for empty spectra or all-zero intensities - _dataframes.py: Fix 'any' to 'Any' type hint import Tests added: - TestToArrowMethods: 7 tests for to_arrow() across all classes - TestBugFixes: 3 tests for the bug fixes above 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix FeatureMap.get_df() missing spectrum_native_id check Add existence check for 'spectrum_native_id' meta value before calling getMetaValue() in extract_meta_data(). This follows the same pattern used in get_assigned_peptide_identifications(). Without this check, calling get_df() on a FeatureMap where some features lack the 'spectrum_native_id' meta value could fail unexpectedly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix test parameter name mismatch in MSExperiment.get_df() test (#8523) * Initial plan * Fix test parameter name: change long= to long_format= in MSExperiment test Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Potential fix for pull request finding 'Unused import' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Make pandas and pyarrow optional dependencies with Sphinx docstrings (#8535) * Initial plan * Remove pandas from required dependencies and fix docstrings - Removed pandas from install_requires in setup.py (now optional) - Added ImportError with helpful message when pandas is not installed - Fixed all docstrings to use Sphinx reStructuredText format (:param, :type, :return, :rtype, :raises) - Updated docstrings in 8 addon files (ConsensusMap, FeatureMap, MRMTransitionGroupCP, MSChromatogram, MSExperiment, MSSpectrum, Mobilogram, PeptideIdentificationList) - Also added ImportError handling for pyarrow imports (optional dependency) Co-authored-by: timosachsenberg <[email protected]> * Fix remaining to_arrow() docstrings to use Sphinx format - Updated all to_arrow() method docstrings to use Sphinx reStructuredText format - Fixed docstrings in ConsensusMap, FeatureMap, MRMTransitionGroupCP, MSChromatogram, MSExperiment, MSSpectrum, Mobilogram, PeptideIdentificationList - All DataFrame and Arrow export methods now have consistent Sphinx-style documentation Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Install pandas and pyarrow for CI test job (#8539) * Initial plan * Install pandas and pyarrow in test job for optional dependency tests Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * some review comments (#8540) --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add security patterns to .gitignore to prevent credential leaks (#8545) * Add security patterns to .gitignore to prevent credential leaks Add comprehensive gitignore rules for common credential and secret files: - Environment files (.env, .env.*) - Private keys and certificates (.pem, .key, .p12, .pfx, .crt) - Credential files (credentials.json, secrets.yaml, etc.) - Cloud provider credentials (AWS, SSH keys) - API tokens and keys (.npmrc, .pypirc, .netrc, *.token) - Docker and Kubernetes secrets - Database files that may contain credentials - OAuth tokens and client secrets - GPG keys - Terraform and Ansible vault files - IDE credential storage - Shell history files - Local config files that may contain secrets - Jupyter notebook checkpoints - GitHub and AI service tokens * Remove database extensions from gitignore OpenMS uses SQLite databases (via SQLiteCpp library, MzMLSqliteHandler, SqliteConnector, etc.) so *.sqlite, *.sqlite3, and *.db should not be ignored. --------- Co-authored-by: Claude <[email protected]> * MetaboliteSpectralMatcher fixes from playing with Nucleosides (#8163) * Update src/openms/source/ANALYSIS/ID/MetaboliteSpectralMatching.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/openms/source/ANALYSIS/ID/MetaboliteSpectralMatching.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update MetaboliteSpectralMatching.cpp * fix * add test with GNPS MGF --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Timo Sachsenberg <[email protected]> * propagate extern libs settings to package (#8556) * fix macos pkg logo (#8554) * Inital steps for moving to LightTransition (WIP) (#8544) * inital commit * Fix pyOpenMS build for C++20 and modern dependencies IDFilter.h: - Add IsNotIdentificationVector concept to disambiguate template overloads - Add removeEmptyIdentifications(PeptideIdentificationList&) overload - Fixes autowrap-generated binding compilation with C++20 concepts setup.py: - Use numpy.get_include() for numpy 2.x compatibility - Update C++ standard from C++17 to C++20 (required for OpenMS concepts) - Change Qt5 to Qt6 on Linux (matches OpenMS build) - Change libomp to gomp (GNU OpenMP runtime for GCC builds) - Fix libraries.extend() bug: was iterating string characters instead of append 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix issues from CodeRabbit PR review - MRMDecoy.cpp: Fix shuffle check to use decoy_temp_peptide instead of temp_peptide - LightTargetedExperiment.pxd: Add missing isPrecursorImSet() and getPrecursorIM() methods - OpenSwathAssayGenerator.cpp: Fix if/else-if chain for output file type handling - OpenSwathDecoyGenerator.cpp: Add division by zero protection and fix if/else-if chain 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add tests for light and heavy decoy generation paths Add test 6 (light path) and test 7 (heavy path) for OpenSwathDecoyGenerator to verify both code paths produce correct output: - Test 6: TSV -> TSV using LightTargetedExperiment (memory-efficient path) - Test 7: TSV -> TraML using TargetedExperiment (full feature path) Both tests use the same input (OpenSwathDecoyGenerator_input_4.tsv) and parameters to verify that the light and heavy paths generate equivalent decoy sequences. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add debug logging for transition sequence parsing failures Add OPENMS_LOG_DEBUG statement when transitions are skipped due to unparseable sequences, improving debuggability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Implement pure light-path decoy generation methods Address PR review feedback from singjc regarding memory efficiency: - Add reversePeptideLight() for light peptide sequence reversal - Add shufflePeptideLight() for light peptide shuffling with mods - Add pseudoreversePeptideLight_() for pseudo-reverse (keep C-term) - Add switchKRLight() for terminal K/R switching - Add hasCNterminalModsLight_() for terminal mod detection - Update generateDecoysLight() to use pure light methods These methods operate directly on std::string and LightModification vectors, avoiding temporary TargetedExperiment::Peptide allocations for improved memory efficiency with large spectral libraries. Also includes: - Documentation for detecting/quantifying transition defaults - PQP output tests for light path - TODO comment for future IPF light path support - Comprehensive unit tests comparing light vs heavy methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Refactor MRMDecoy heavy methods to delegate to light implementations Reduces code duplication by having heavy methods call their light counterparts with conversion helpers: - Add detail::toLightMods() to convert heavy Peptide::Modification to LightModification format - Add detail::applyLocationUpdates() to apply location changes back - shufflePeptide() now delegates to shufflePeptideLight() - reversePeptide() now delegates to reversePeptideLight() - switchKR() now delegates to switchKRLight() - hasCNterminalMods_() now delegates to hasCNterminalModsLight_() Also fixes identity comparison in shufflePeptideLight to compare against the working copy (peptide_seq) rather than original sequence, matching the original heavy method behavior where the peptide object gets updated during mutation phases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add FuzzyDiff -sort flag for order-independent file comparison - Add -sort flag to FuzzyDiff that sorts data lines before comparison (preserves header as first line) - Update PQP roundtrip test to use -sort flag since PQP reader returns transitions ordered by ID, not by original insertion order - Update light-path roundtrip test to use -sort flag - Add expected output files for roundtrip tests with correct TSV format (UniprotId is empty in PQP roundtrip since PQP format doesn't store it) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Implement light-path IPF support for uisTransitionsLight() Add memory-efficient light version of uisTransitions() to enable IPF (Identification Peptide Fragment) workflows for large-scale spectral libraries without loading full TargetedExperiment objects. Key implementations: - generateTargetInSilicoMapLight_(): Generate theoretical peptidoforms - generateDecoyInSilicoMapLight_(): Generate decoy peptidoforms - generateTargetAssaysLight_(): Create UIS transitions with peptidoforms - generateDecoyAssaysLight_(): Create decoy UIS transitions (filtered) - uisTransitionsLight(): Main orchestrator following 4-step pipeline Critical bug fixes applied during review: - Use target peptide's SWATH index for decoy generation (not decoy's) - Use target compound id as DecoyPeptideMap key (matching heavy version) - Remove incorrect DECOY_ prefix stripping in decoy assay generation Update OpenSwathAssayGenerator to use light path with -enable_ipf when input/output formats support it (PQP, TSV, MRM). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add IPF light path tests and fix sequence reconstruction bug - Fix getAASequenceFromLightCompound() to handle both PQP input (full modified sequence) and TraML input (unmodified + modifications vector) - Fix generateDecoyAssaysLight_() to use target_precursor_swath for DecoyIonMap lookup (matching heavy path behavior) - Add UIS SWATH window generation and post-IPF restriction to light path - Add command-line parameters for IPF decoy seed and disable flag - Add class tests for uisTransitionsLight() with light/heavy equivalence - Add TOPP test for PQP input with IPF enabled (test_4) - Remove duplicate include in MRMDecoy_test.cpp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix light-path TSV output to match heavy-path format - Default empty GeneName and PeptideGroupLabel fields to "NA" - Change CollisionEnergy format from "-1" to "-1.0" for consistency - Update expected test output files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix test mode to disable decoy transitions for reproducibility The refactoring that added command-line flags for IPF decoy parameters accidentally removed the automatic disabling of decoy transitions in test mode. This caused TOPP_OpenSwathAssayGenerator tests to fail by generating extra UISDECOY transitions not present in expected outputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix light-path IPF UIS window generation to respect enable_swath_specifity The light-path IPF code only checked swathes.empty(), causing divergence from the heavy path which respects the enable_swath_specifity flag. Changed the condition to (!enable_swath_specifity || swathes.empty()) to match the heavy path behavior. Also fixed the loop calculation to use Math::round() instead of truncation for consistent window count computation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Optimize LightTransition memory layout with compact types Memory optimizations for LightTransition struct: - Add FragmentIonType enum (1 byte vs 32+ bytes for std::string) - Add TransitionFlags bitfield for packed bools (1 byte vs 4+ bytes) - Change fragment_charge from int to int8_t (4 bytes → 1 byte) - Change fragment_nr from int to int16_t (4 bytes → 2 bytes) Estimated savings: ~39+ bytes per transition (~19 MB for 500K transitions) Updated all consumers to use new getter/setter API: - TransitionPQPFile.cpp, TransitionTSVFile.cpp (I/O) - MRMAssay.cpp, MRMDecoy.cpp (assay/decoy generation) - DataAccessHelper.cpp, OpenSwathHelper.cpp (utilities) - MRMFeatureFinderScoring.cpp (feature finding) - pyOpenMS bindings (LightTargetedExperiment.pxd) All 2383 relevant tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Eliminate annotation string field from LightTransition Replace stored annotation string with getAnnotation() method that reconstructs annotations from existing fields (fragment_type, fragment_nr, fragment_charge). This saves ~32 bytes per transition. Key changes: - Add getAnnotation() method to LightTransition that builds annotation strings like "b4^1", "y10^2", "prec" from fragment metadata - Update MRMAssay.cpp to extract charge from annotation strings when parsing (format: type + ordinal + "^" + charge) - Update MRMDecoy.cpp similarly for decoy transition generation - Update TransitionTSVFile.cpp and TransitionPQPFile.cpp to use getAnnotation() instead of direct field access - Update pyOpenMS bindings to expose getAnnotation() method The annotation format matches MRMIonSeries.cpp which generates annotations as: type + ordinal + "^" + charge (e.g., "b4^1") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix decoy compound ID bug in light-path IPF generation The light-path decoy generation was incorrectly setting decoy_compound.id to "DECOY_" + compound.id, causing decoy transitions to reference non-existent compound IDs. This differed from the heavy-path behavior where decoy peptide IDs are kept identical to target peptide IDs. Fixed by removing the "DECOY_" prefix, matching the heavy-path approach where decoy transitions reference target compounds (which exist) and are distinguished by their decoy flag instead of a different compound ID. Also updated test reference file to reflect correct annotation reconstruction from structured fields (FragmentType + FragmentSeriesNumber + FragmentCharge). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix heavy-path UIS swath window generation when swathes is empty The heavy-path IPF code only checked !enable_swath_specifity to decide whether to generate default UIS swath windows, while the light-path correctly checks (!enable_swath_specifity || swathes.empty()). This caused the heavy-path to use empty swathes when enable_swath_specifity was true but no swathes were provided, resulting in no swath windows being generated for UIS transitions. Fixed by adding || swathes.empty() to match the light-path logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix duplicate conditions in stringToFragmentIonType Remove redundant duplicate OR operands in z-prime and z-dot ion checks. The conditions (s == "z'" || s == "z'") and (s == "z." || s == "z.") were copy-paste mistakes with identical strings on both sides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix ambiguous operator+ between String and std::string Explicitly wrap tr.getFragmentType() in String() to avoid ambiguous overload resolution between String::operator+ and std::string::operator+ on some compilers/platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV output: use NA for empty fields and fix pyOpenMS bindings - Add NA handling for empty fields in light-path TSV output: label_type, compound_name, sum_formula, smiles, adducts, peptide_sequence, full_peptide_name, protein_names, uniprot_ids - Fix pyOpenMS LightTargetedExperiment.pxd: use int instead of signed char/short for fragment_charge and fragment_nr to avoid Cython treating int8_t as bytes type - Update test reference files to reflect new NA values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add light/heavy path equivalence tests for TransitionTSVFile Add comprehensive unit tests verifying equivalence between light and heavy paths for transition library I/O: - Light path TSV roundtrip test - Light vs Heavy path equivalence via PQP roundtrip - Light path preserves transition flags (detecting/quantifying/identifying) - Light path preserves fragment annotation Tests use field normalization to handle expected empty/"NA" differences between paths while catching real bugs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add streaming TSV parser for ~5x memory reduction Implement streamTSVToLightTargetedExperiment_() which reads TSV files directly into LightTargetedExperiment without creating an intermediate vector<TSVTransition>. This eliminates the memory duplication where data was stored twice during parsing. Memory improvement for 1M transitions: - Old: ~630MB peak (500MB TSVTransition vector + 130MB LightExperiment) - New: ~130MB peak (only LightTargetedExperiment + small tracking maps) Key implementation details: - Single TSVTransition buffer reused for each line - Inline mixed sequence group detection during streaming - Immediate conversion to LightTransition/LightCompound/LightProtein - Progress tracking with line count pre-scan 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add streaming PQP reader for ~5x memory reduction Implement streamPQPToLightTargetedExperiment_() which reads PQP files directly into LightTargetedExperiment without creating an intermediate vector<TSVTransition>. This eliminates memory duplication during parsing. Memory improvement for 1M transitions: - Old: ~630MB peak (500MB TSVTransition vector + 130MB LightExperiment) - New: ~130MB peak (only LightTargetedExperiment + small tracking maps) Key implementation details: - Direct SQL row to LightTransition conversion - Compound/protein deduplication inline during streaming - Same SQL queries as original for compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV: use empty fields for LabelType, CompoundName, SumFormula, SMILES Remove NA handling for these 4 fields to match heavy-path output format. Only Adducts remains as NA when not set. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Cleanup: remove dead code and refactor PQP SQL query building - Remove unused TSVToTargetedExperiment_ overload for LightTargetedExperiment (now handled by streaming parser) - Extract duplicated SQL query building into buildPQPSelectQuery_() helper - Add PQPSqlQueryInfo struct to hold query and column availability flags - Net reduction of ~240 lines of code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Use std::map for MRMIonSeries::IonSeries for ARM64 portability Change IonSeries typedef from std::unordered_map to std::map to ensure deterministic iteration order across all platforms. This fixes potential ARM64 portability issues where hash table iteration order differs from x86_64, causing different ion annotation results when tie-breaking in annotateIon(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix switchKRLight() to use portable deterministic hash Replace static RNG with FNV-1a hash of peptide sequence for selecting replacement amino acids. This ensures: - Same peptide always gets the same replacement AA (reproducible) - Results are independent of processing order (portable across platforms) - Fixes ARM64 portability issue where hash table iteration order differs Updated test expected outputs to reflect the new deterministic behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove dead srand() calls in MRMDecoy The srand(time(nullptr)) calls seeded C's rand() function, but portable_random_shuffle() uses boost::mt19937_64 which is independent. These calls had no effect on program behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV: use empty fields for Adducts and UniprotId For consistency with heavy-path output, leave Adducts and UniprotId columns empty instead of "NA" when not set. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix OpenSwathAssayGenerator test_4 for cross-platform portability PQP files (SQLite binary format) have platform-dependent internal layout, causing byte-by-byte comparison to fail on macOS ARM64. Changed test to use TSV roundtrip comparison with -sort flag for portable testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> * [DOC] Improve AGENTS.md based on best practices research (#8560) Restructure AGENTS.md following the AGENTS.md standard best practices: - Add Critical Constraints section upfront (what NOT to do) - Add Quick Commands section with copy-paste ready commands - Add code examples for naming conventions and file structure - Add testing pattern examples with actual code - Add verification commands section - Create concise change impact checklist table - Consolidate external links to essential resources only - Improve overall structure for agent consumption Based on research from GitHub's analysis of 2,500+ repositories and the official AGENTS.md specification. Co-authored-by: Claude <[email protected]> * Remove outdated template files and update test creation documentation (#8548) * Initial plan * Remove outdated templates and update documentation references Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * [DOC] Improve AGENTS.md based on best practices research (#8563) * [DOC] Improve AGENTS.md based on best practices research Enhance AGENTS.md following the AGENTS.md standard best practices while preserving all original content: Added: - Critical Constraints section upfront (explicit "NEVER do" list) - Quick Commands section with copy-paste ready bash commands - Visual directory tree for repo layout - Code examples for naming conventions, file structure, and tests - Commit message example - Debugging command examples Preserved: - All original build/install instructions - All testing guidelines and details - All coding conventions - All pyOpenMS wrapping details - All external documentation links - All CI/packaging information Based on research from GitHub's analysis of 2,500+ repositories and the official AGENTS.md specification. * [DOC] Add Doxygen style guide and OS-specific build gotchas to AGENTS.md Expand AGENTS.md with detailed information researched from the codebase: Doxygen Documentation Style: - File header format with $Maintainer$ and $Authors$ markers - Class documentation with @brief, @ingroup, @htmlinclude - Method documentation with @param[in/out], @return, @throws - Constructor/destructor grouping with @name and //@{ - Inline documentation with /// comments - Common Doxygen tags reference table Platform-Specific Build Gotchas: - Windows: MSVC requirements, MinGW not supported, Release/Debug mixing - macOS: AppleClang linker flag, Qt PrintSupport, code signing - Linux: PIC flags, STL debug mode, headless GUI testing - Qt6: version requirements, component dependencies, WebEngine - Boost: Homebrew static linking issues and workarounds - CMake: CMAKE_SIZEOF_VOID_P bug, Eigen3 version detection Also added: - Required and optional dependency lists - CMake minimum version (3.21) and C++20 standard requirement --------- Co-authored-by: Claude <[email protected]> * Cleanup TOPP tests, clean gitignore (#8555) * Fix some race conditions in topp tests * remove files that shouldn''t be tracked * start moving temporary topp files into separate directory * second batch of topp tests fixed. * third batch * fourth pass * ixed the hardcoded CSV output path to use the input file's directory instead of the test execution directory, and corrected all 8 instances of "ambigious" → "ambiguous" spelling * re-add idripper idxmls * re-organize .gitignore * more .gitignore cleanup * create proper temp files for tests * gitignore cleanup * remove dupes from merge * address coderabbit comments * Fix temp file location * use QDir for constructing paths in OpenNuXL * Remove overbroad test file exclusions from gitignore * Address code comments. * Document ProteomicsLFQ automatic median normalization behavior (#8438) * Initial plan * Document ProteomicsLFQ normalization behavior - Add detailed normalization documentation to Doxygen header - Clarify automatic median normalization for feature intensity quantification - Document when normalization is disabled (MSstats/Triqler output) - Explain relationship between consensus feature normalization and ProteinQuantification:consensus:normalize - Add inline code comments for better code clarity - Update PeptideAndProteinQuant parameter description - Provide workaround for using alternative normalization methods Co-authored-by: timosachsenberg <[email protected]> * Fix hyphenation in documentation Use proper compound adjective form "feature-intensity-based" instead of "feature intensity-based" Co-authored-by: timosachsenberg <[email protected]> * Apply suggestions from code review --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Enhance DataValue conversion error messages with type and value context (#8572) * Initial plan * Improve DataValue error messages to include type and value information Co-authored-by: timosachsenberg <[email protected]> * Add tests to verify improved DataValue error messages Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Document wrapping classes with deleted/private constructors in pyOpenMS (#8561) * Initial plan * Document how to wrap classes with deleted/private constructors in pyOpenMS Co-authored-by: timosachsenberg <[email protected]> * Fix spacing in wrap-ignore comment for consistency Co-authored-by: timosachsenberg <[email protected]> * Add namespace context to XMLHandler example for accuracy Co-authored-by: timosachsenberg <[email protected]> * Add clarifying notes about singleton getInstance() overloads Co-authored-by: timosachsenberg <[email protected]> * Improve documentation for wrap-manual-memory and fix Pattern 4 example - Add wrap-manual-memory directive to "Hints to autowrap" section - Document autowrap naming convention for wrap-ignore'd functions - Fix misleading wrap-manual-dealloc reference (not a real directive) - Update Pattern 4 example to match actual ConsensusIDAlgorithm.pxd - Use PeptideIdentificationList instead of outdated libcpp_vector type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * Add precursor m/z range filter option to PeakFileOptions Adds setPrecursorMZRange(), hasPrecursorMZRange(), and getPrecursorMZRange() methods to filter spectra based on their precursor m/z values. Updates hasFilters() to include this new filter type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Samuel Wein <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Add PeakFileOptions support to OnDiscMSExperiment This enables users to set filtering options (m/z range, intensity range, RT range, MS levels, etc.) for OnDiscMSExperiment, similar to how it works for in-memory MSExperiment loading via FileHandler. Changes: - Added PeakFileOptions member and getOptions/setOptions methods - Options are applied when loading metadata (RT range, MS levels filter) - Options are applied when retrieving spectra (m/z, intensity filters) - Options are applied when retrieving chromatograms (RT, intensity filters) - Updated copy constructor to copy options - Added pyOpenMS bindings for new methods - Added comprehensive tests for the new functionality * Optimize OnDiscMSExperiment to skip I/O for filtered spectra When RT range or MS level filters are set, check metadata BEFORE loading peak data. If a spectrum doesn't pass these filters, return it with metadata but skip the expensive I/O operation to load peaks. This allows efficient iteration over large files where only a subset of spectra are needed based on RT or MS level criteria. * Fix metadata loading to maintain index correspondence Changed loadMetaData_() to always load ALL metadata without RT/MS level filters. This ensures index correspondence between indexed_mzml_file_ and meta_ms_experiment_ is maintained. Filtering behavior for OnDiscMSExperiment: - RT range and MS level filters are checked at retrieval time (skips I/O) - Filtered spectra return with metadata but no peaks - All indices are preserved (unlike in-memory loading where filtered spectra are removed from the container) Also added comprehensive documentation explaining this behavior. * feature: Add PeakFileOptions support to OnDiscMSExperiment (#8534) * [FEATURE] Add FAIMS support to ProteomicsLFQ (#8478) - Annotate peptide IDs with FAIMS_CV from spectrum data before feature detection, enabling proper per-CV filtering in FeatureFinderIdentificationAlgorithm - Add documentation describing FAIMS support: automatic detection, per-CV processing, feature merging, and downstream alignment/linking FAIMS data is now automatically handled: 1. FFI splits data by compensation voltage and processes each CV group 2. Features from different CVs representing the same analyte are merged 3. Merged features are aligned and linked based on RT and m/z 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> * Add append() and extend() methods to pyOpenMS map classes with __len__ support (#8510) Implements feature request #8124 by adding Pythonic methods to: - ConsensusMap: __len__, append, extend - FeatureMap: __len__, append, extend - PeptideIdentificationList: append, extend (already had __len__) These methods provide a more Pythonic interface: - __len__() enables use of built-in len() function - append() adds single items (equivalent to push_back()) - extend() adds multiple items from iterables or other map objects Includes comprehensive unit tests for all new methods. Co-authored-by: Claude <[email protected]> * Store PeptideIndexer settings as metavalues in SearchParameters (#8489) * Initial plan * Add PeptideIndexer settings as metavalues in ProteinIdentification Co-authored-by: jpfeuffer <[email protected]> * Extract metavalue keys as constants to improve maintainability Co-authored-by: jpfeuffer <[email protected]> * Remove trailing whitespace from PeptideIndexing.h Co-authored-by: jpfeuffer <[email protected]> * Use !empty() instead of size() > 0 for better readability Co-authored-by: jpfeuffer <[email protected]> * Store PeptideIndexer settings in SearchParameters instead of ProteinIdentification Co-authored-by: jpfeuffer <[email protected]> * Remove unnecessary static constants for metavalue keys Co-authored-by: jpfeuffer <[email protected]> * Fix PeptideIndexing test and update test output files - Fix unit test to provide ProteinIdentification before running (the test was creating an empty prot_ids vector but expecting metavalues to be set - the code only updates existing ProteinIdentifications) - Update all PeptideIndexer TOPP test expected output files to include the new metavalues in SearchParameters 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add PeptideIndexer settings to TOPP test expected output files (#8509) Update expected output files to include PeptideIndexer settings that are now written to SearchParameters. This includes decoy_string, enzyme, enzyme_specificity, and related parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * Add PeptideIndexer params to SageAdapter test output (#8518) Update the SageAdapter_1_out.idXML test file to include the PeptideIndexer metavalues that were missing from the PR #8509 update which added these to other adapter test files. Co-authored-by: Claude <[email protected]> * Check the return value of configure so that we stop on configure errors (#8515) * Check the return value of configure so that we stop on configure errors * make sure nsis is in path. * Simplify notarization step in CI workflow Removed redundant notarization parameters from CI workflow. * fix cat-on-keyboard error Updated the workflow to use a structured THIRDPARTY directory. * Simplify CI workflow by removing deb dependency check Removed conditional dependency installation for deb packages in CI workflow. * Use external libraries from Debian repos to prevent deb package conflicts (#8496) * Initial plan * Use external SQLite3, SQLiteCpp, nlohmann-json, and SIMDe from Debian repos Co-authored-by: jpfeuffer <[email protected]> * Fix debian package dependencies - SQLiteCpp is static library Co-authored-by: jpfeuffer <[email protected]> * Add documentation for USE_EXTERNAL_* CMake options Co-authored-by: jpfeuffer <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Samuel Wein <[email protected]> * Use unsigned channel identifiers in peptide quantification (#8516) * Remove non-schema CMakeLists.txt from OPENSWATH directory (#8513) * Initial plan * Remove non-standard CMakeLists.txt from OPENSWATH directory Co-authored-by: jpfeuffer <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jpfeuffer <[email protected]> * explicitly add timestamping to notarization process (#8527) * Hide Eigen from OpenMS public API (Issue #8456) (#8511) * Hide Eigen from OpenMS public API (Issue #8456) This implements Option D from issue #8456: use Eigen::Map only without PIMPL. Changes: - Move Eigen3::Eigen from PUBLIC to PRIVATE linking in CMakeLists.txt - Rewrite Matrix<T> to use std::vector<T> storage (column-major) - Add internal MatrixEigen.h with eigenView() for zero-copy Eigen access - Refactor TraceFitter/LevMarqFitter1D GenericFunctor to use raw double* instead of Eigen types in public interface - Update all internal code to use eigenView() where Eigen operations needed - Add missing includes (<cmath>, <Eigen/LU>, <Eigen/QR>) where needed - Update tests to link against Eigen when using eigenView() directly The Matrix class now provides: - std::vector storage with data() pointer access - getValue/setValue methods for element access - eigenView() (internal) for full Eigen matrix operations Downstream users no longer need Eigen headers when using OpenMS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add pyOpenMS test for Matrix column-major ordering Add testMatrixDoubleColumnMajorOrdering() to verify that the Matrix class correctly preserves row/column ordering when passing data between numpy and C++. This test catches potential column-major vs row-major issues that could cause data transposition. The test verifies: - Shape preservation (3x4 matrix stays 3x4, not transposed to 4x3) - Element-by-element verification via getValue matches numpy indexing - Round-trip preservation (numpy -> C++ -> numpy) - View indexing matches getValue for all elements - Modifications through numpy view are reflected in C++ object - Highly non-square matrices (2x5) work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen for solveNNLS_ to document in-place matrix modification Update the documentation for the non-const solveNNLS_ overload to correctly indicate that correction_matrix is modified in-place by the NNLS solver. Changed @param[in] to @param[in,out] and added a @note explaining that this overload mutates the matrix for efficiency, with a reference to the const-preserving overload for cases where the original must be preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen for computeStats_ to correctly document parameters - Change @param[out] x_naive to @param[in] (it's const reference input) - Change @param[in] stats to @param[in,out] (it's modified by function) - Clarify that x_naive is LU-decomposition solution, not "uncorrected" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen param annotations for NonNegativeLeastSquaresSolver Add proper @param[in], @param[out], @param[in,out] annotations based on actual implementation behavior: - const Matrix& overload: A and b are [in] (copies made internally) - raw pointer overload: A and b are [in,out] (modified by NNLS solver) - Matrix& overload: A and b are [in,out] (passed to raw pointer version) Also clarify in @brief that const overload preserves originals while non-const overloads modify inputs in-place for efficiency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix misleading comments about Matrix template instantiations Remove contradictory comment that said "No explicit template instantiations needed" when explicit instantiations are present. Clarify that these are explicit instantiations to compile template code into libOpenMS.so, not "default instances for backwards compatibility". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove Eigen dependency from NonNegativeLeastSquaresSolver_test Remove include of internal MatrixEigen.h header and replace Eigen::Index with Size. This aligns with the PR goal of hiding Eigen from the public API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add unit tests for internal MatrixEigen utilities Test coverage for the internal Eigen-based utilities in MatrixEigen.h: - eigenView() for mutable and const Matrix - eigenVectorView() for std::vector and raw pointers - eigenMatrixView() for raw pointers - Zero-copy verification (modifications through view affect original) - Eigen operations work correctly on views - Matrix/view consistency with column-major storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add pointer-safety documentation for NNLS raw-pointer overload Document memory requirements, ownership semantics, and lifetime constraints for the double* A parameter: - Must be non-null, pointing to A_rows * A_cols contiguous doubles - Column-major storage order required - Caller retains ownership and must ensure validity during call - Contents modified in-place and undefined after call - nullptr or undersized buffer is undefined behavior Also add note recommending Matrix& overload for safety and mention std::span as potential future improvement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Link MRMScoring_test to Eigen3::Eigen MRMScoring_test.cpp includes MatrixEigen.h which requires Eigen headers. Since Eigen is a PRIVATE dependency of OpenMS, tests that directly include internal Eigen-dependent headers must explicitly link to Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove Eigen dependency from ImageCreator - Add maxValue() and minValue() methods to Matrix class using std::max_element/std::min_element - Update ImageCreator.cpp to use Matrix::maxValue() instead of eigenView().maxCoeff() - Remove MatrixEigen.h include from ImageCreator.cpp This fixes the build error where ImageCreator failed to compile because it included MatrixEigen.h but TOPP tools don't link against Eigen3::Eigen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Replace Eigen::Index with Size in test files Part of hiding Eigen from the public API. Tests should not use Eigen types directly since Eigen is an internal implementation detail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add missing <atomic> include to MzMLHandler.cpp Fix build failure caused by missing std::atomic include. This was previously provided transitively through Eigen headers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix Doxygen documentation warnings in Matrix.h (#8529) * Initial plan * Fix Doxygen warnings in Matrix.h getValue/setValue documentation Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Copilot <[email protected]> * Wrap Math::getPPM template functions for Python bindings (#8525) * Initial plan * Add Math.pxd wrapper and unit tests for Math::getPPM functions Co-authored-by: timosachsenberg <[email protected]> * Update Math.pxd to properly handle template functions with concrete double type Co-authored-by: timosachsenberg <[email protected]> * Remove unnecessary wrap-as directives from Math.pxd Co-authored-by: timosachsenberg <[email protected]> * Improve documentation for Math class wrapper with usage examples Co-authored-by: timosachsenberg <[email protected]> * Add wrap-doc documentation at function level for all Math functions Co-authored-by: timosachsenberg <[email protected]> * Update Math class documentation to be more general and extensible Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Add precursor m/z range filter to PeakFileOptions (#8526) * Initial plan * Add precursor m/z range filter support to PeakFileOptions Co-authored-by: timosachsenberg <[email protected]> * Implement precursor m/z range filtering in MzML, MzXML, and MzData handlers Co-authored-by: timosachsenberg <[email protected]> * Fix MzXMLHandler to properly skip filtered spectra by removing from spectrum_data_ Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Initial plan * Changes before error encountered Co-authored-by: timosachsenberg <[email protected]> * Remove MS level check from precursor m/z range filter Co-authored-by: timosachsenberg <[email protected]> * [DOC] Add AGENTS.md guidance (#8537) * [DOC] Add AGENTS.md guidance * [DOC] Update TOPP tool documentation paths * Implement to_df directly in Cython files (#8520) * Move get_df() methods directly into Cython .pyx addon files Instead of using Python wrapper classes in _dataframes.py to add DataFrame export functionality, implement get_df() directly in the Cython addon files alongside get_data_dict(). This simplifies the architecture by: - Removing the "duck typing hack" of wrapper classes that override Cython classes - Putting all DataFrame logic in one place (the Cython addon files) - Making the code flow more straightforward Changes: - MSSpectrum.pyx: Added get_df() - MSChromatogram.pyx: Added get_df() - Mobilogram.pyx: Added get_df() - MSExperiment.pyx: Added get_df_columns(), get_df(), get_ion_df(), get_massql_df() - ConsensusMap.pyx: Added get_df_columns(), get_intensity_df(), get_metadata_df(), get_df() - FeatureMap.pyx: Added get_df_columns(), get_df(), get_assigned_peptide_identifications() - MRMTransitionGroupCP.pyx: New addon with get_chromatogram_df(), get_feature_df() methods - _dataframes.py: Simplified to only export standalone functions - README.md: Updated documentation to reflect new pattern * Add get_df() to PeptideIdentificationList and comprehensive tests - Add get_df() and update_scores_from_df() methods to PeptideIdentificationList.pyx following the same pattern as other data structures - Update _dataframes.py to use backwards-compatible wrapper functions that call the new methods (peptide_identifications_to_df → peps.get_df(), update_scores_from_df → peps.update_scores_from_df()) - Simplify _dataframes.py by removing duplicate implementation code - Add comprehensive tests for: - PeptideIdentificationList.get_df() with various parameters - PeptideIdentificationList.update_scores_from_df() - Mobilogram.get_df() column selection - Backwards-compatible wrapper functions * Fix Cython compilation errors in get_df() addon methods - Use lazy pandas imports inside methods to avoid module-level import issues - Replace bool() calls with len() > 0 to avoid Cython type conflicts - Replace {bool: ...} dict keys with {type(True): ...} for same reason - Rename 'long' parameter to 'long_format' to avoid Cython keyword conflict 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add to_arrow() methods for Apache Arrow Table export Add to_arrow() methods to pyOpenMS classes following the Polars naming convention: - MSSpectrum.to_arrow() - reuses get_data_dict() for efficient numpy-to-Arrow conversion - MSChromatogram.to_arrow() - reuses get_data_dict() - Mobilogram.to_arrow() - reuses get_data_dict() - MSExperiment.to_arrow() - supports long_format parameter like get_df() - ConsensusMap.to_arrow() - wraps get_df() with pa.Table.from_pandas() - FeatureMap.to_arrow() - wraps get_df() with pa.Table.from_pandas() - MRMTransitionGroupCP.chromatograms_to_arrow(), features_to_arrow() - PeptideIdentificationList.to_arrow() All methods use lazy imports for pyarrow to keep it as an optional dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix UnboundLocalError in PeptideIdentificationList.get_df() When a PeptideHit doesn't have a particular metavalue, the code would reference an undefined 'val' variable. Fix by using the precomputed dmv[idx] array which already contains the correct default missing value for each metavalue's type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix bugs and add tests for DataFrame/Arrow export Bug fixes: - ConsensusMap.get_intensity_df(): Fix np.fromiter count truncation by computing actual row count (one row per file per feature) - MSExperiment.get_massql_df(): Fix division by zero in intensity normalization for empty spectra or all-zero intensities - _dataframes.py: Fix 'any' to 'Any' type hint import Tests added: - TestToArrowMethods: 7 tests for to_arrow() across all classes - TestBugFixes: 3 tests for the bug fixes above 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix FeatureMap.get_df() missing spectrum_native_id check Add existence check for 'spectrum_native_id' meta value before calling getMetaValue() in extract_meta_data(). This follows the same pattern used in get_assigned_peptide_identifications(). Without this check, calling get_df() on a FeatureMap where some features lack the 'spectrum_native_id' meta value could fail unexpectedly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix test parameter name mismatch in MSExperiment.get_df() test (#8523) * Initial plan * Fix test parameter name: change long= to long_format= in MSExperiment test Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Potential fix for pull request finding 'Unused import' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Make pandas and pyarrow optional dependencies with Sphinx docstrings (#8535) * Initial plan * Remove pandas from required dependencies and fix docstrings - Removed pandas from install_requires in setup.py (now optional) - Added ImportError with helpful message when pandas is not installed - Fixed all docstrings to use Sphinx reStructuredText format (:param, :type, :return, :rtype, :raises) - Updated docstrings in 8 addon files (ConsensusMap, FeatureMap, MRMTransitionGroupCP, MSChromatogram, MSExperiment, MSSpectrum, Mobilogram, PeptideIdentificationList) - Also added ImportError handling for pyarrow imports (optional dependency) Co-authored-by: timosachsenberg <[email protected]> * Fix remaining to_arrow() docstrings to use Sphinx format - Updated all to_arrow() method docstrings to use Sphinx reStructuredText format - Fixed docstrings in ConsensusMap, FeatureMap, MRMTransitionGroupCP, MSChromatogram, MSExperiment, MSSpectrum, Mobilogram, PeptideIdentificationList - All DataFrame and Arrow export methods now have consistent Sphinx-style documentation Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Install pandas and pyarrow for CI test job (#8539) * Initial plan * Install pandas and pyarrow in test job for optional dependency tests Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * some review comments (#8540) --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add security patterns to .gitignore to prevent credential leaks (#8545) * Add security patterns to .gitignore to prevent credential leaks Add comprehensive gitignore rules for common credential and secret files: - Environment files (.env, .env.*) - Private keys and certificates (.pem, .key, .p12, .pfx, .crt) - Credential files (credentials.json, secrets.yaml, etc.) - Cloud provider credentials (AWS, SSH keys) - API tokens and keys (.npmrc, .pypirc, .netrc, *.token) - Docker and Kubernetes secrets - Database files that may contain credentials - OAuth tokens and client secrets - GPG keys - Terraform and Ansible vault files - IDE credential storage - Shell history files - Local config files that may contain secrets - Jupyter notebook checkpoints - GitHub and AI service tokens * Remove database extensions from gitignore OpenMS uses SQLite databases (via SQLiteCpp library, MzMLSqliteHandler, SqliteConnector, etc.) so *.sqlite, *.sqlite3, and *.db should not be ignored. --------- Co-authored-by: Claude <[email protected]> * MetaboliteSpectralMatcher fixes from playing with Nucleosides (#8163) * Update src/openms/source/ANALYSIS/ID/MetaboliteSpectralMatching.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/openms/source/ANALYSIS/ID/MetaboliteSpectralMatching.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update MetaboliteSpectralMatching.cpp * fix * add test with GNPS MGF --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Timo Sachsenberg <[email protected]> * propagate extern libs settings to package (#8556) * fix macos pkg logo (#8554) * Inital steps for moving to LightTransition (WIP) (#8544) * inital commit * Fix pyOpenMS build for C++20 and modern dependencies IDFilter.h: - Add IsNotIdentificationVector concept to disambiguate template overloads - Add removeEmptyIdentifications(PeptideIdentificationList&) overload - Fixes autowrap-generated binding compilation with C++20 concepts setup.py: - Use numpy.get_include() for numpy 2.x compatibility - Update C++ standard from C++17 to C++20 (required for OpenMS concepts) - Change Qt5 to Qt6 on Linux (matches OpenMS build) - Change libomp to gomp (GNU OpenMP runtime for GCC builds) - Fix libraries.extend() bug: was iterating string characters instead of append 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix issues from CodeRabbit PR review - MRMDecoy.cpp: Fix shuffle check to use decoy_temp_peptide instead of temp_peptide - LightTargetedExperiment.pxd: Add missing isPrecursorImSet() and getPrecursorIM() methods - OpenSwathAssayGenerator.cpp: Fix if/else-if chain for output file type handling - OpenSwathDecoyGenerator.cpp: Add division by zero protection and fix if/else-if chain 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add tests for light and heavy decoy generation paths Add test 6 (light path) and test 7 (heavy path) for OpenSwathDecoyGenerator to verify both code paths produce correct output: - Test 6: TSV -> TSV using LightTargetedExperiment (memory-efficient path) - Test 7: TSV -> TraML using TargetedExperiment (full feature path) Both tests use the same input (OpenSwathDecoyGenerator_input_4.tsv) and parameters to verify that the light and heavy paths generate equivalent decoy sequences. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add debug logging for transition sequence parsing failures Add OPENMS_LOG_DEBUG statement when transitions are skipped due to unparseable sequences, improving debuggability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Implement pure light-path decoy generation methods Address PR review feedback from singjc regarding memory efficiency: - Add reversePeptideLight() for light peptide sequence reversal - Add shufflePeptideLight() for light peptide shuffling with mods - Add pseudoreversePeptideLight_() for pseudo-reverse (keep C-term) - Add switchKRLight() for terminal K/R switching - Add hasCNterminalModsLight_() for terminal mod detection - Update generateDecoysLight() to use pure light methods These methods operate directly on std::string and LightModification vectors, avoiding temporary TargetedExperiment::Peptide allocations for improved memory efficiency with large spectral libraries. Also includes: - Documentation for detecting/quantifying transition defaults - PQP output tests for light path - TODO comment for future IPF light path support - Comprehensive unit tests comparing light vs heavy methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Refactor MRMDecoy heavy methods to delegate to light implementations Reduces code duplication by having heavy methods call their light counterparts with conversion helpers: - Add detail::toLightMods() to convert heavy Peptide::Modification to LightModification format - Add detail::applyLocationUpdates() to apply location changes back - shufflePeptide() now delegates to shufflePeptideLight() - reversePeptide() now delegates to reversePeptideLight() - switchKR() now delegates to switchKRLight() - hasCNterminalMods_() now delegates to hasCNterminalModsLight_() Also fixes identity comparison in shufflePeptideLight to compare against the working copy (peptide_seq) rather than original sequence, matching the original heavy method behavior where the peptide object gets updated during mutation phases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add FuzzyDiff -sort flag for order-independent file comparison - Add -sort flag to FuzzyDiff that sorts data lines before comparison (preserves header as first line) - Update PQP roundtrip test to use -sort flag since PQP reader returns transitions ordered by ID, not by original insertion order - Update light-path roundtrip test to use -sort flag - Add expected output files for roundtrip tests with correct TSV format (UniprotId is empty in PQP roundtrip since PQP format doesn't store it) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Implement light-path IPF support for uisTransitionsLight() Add memory-efficient light version of uisTransitions() to enable IPF (Identification Peptide Fragment) workflows for large-scale spectral libraries without loading full TargetedExperiment objects. Key implementations: - generateTargetInSilicoMapLight_(): Generate theoretical peptidoforms - generateDecoyInSilicoMapLight_(): Generate decoy peptidoforms - generateTargetAssaysLight_(): Create UIS transitions with peptidoforms - generateDecoyAssaysLight_(): Create decoy UIS transitions (filtered) - uisTransitionsLight(): Main orchestrator following 4-step pipeline Critical bug fixes applied during review: - Use target peptide's SWATH index for decoy generation (not decoy's) - Use target compound id as DecoyPeptideMap key (matching heavy version) - Remove incorrect DECOY_ prefix stripping in decoy assay generation Update OpenSwathAssayGenerator to use light path with -enable_ipf when input/output formats support it (PQP, TSV, MRM). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add IPF light path tests and fix sequence reconstruction bug - Fix getAASequenceFromLightCompound() to handle both PQP input (full modified sequence) and TraML input (unmodified + modifications vector) - Fix generateDecoyAssaysLight_() to use target_precursor_swath for DecoyIonMap lookup (matching heavy path behavior) - Add UIS SWATH window generation and post-IPF restriction to light path - Add command-line parameters for IPF decoy seed and disable flag - Add class tests for uisTransitionsLight() with light/heavy equivalence - Add TOPP test for PQP input with IPF enabled (test_4) - Remove duplicate include in MRMDecoy_test.cpp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix light-path TSV output to match heavy-path format - Default empty GeneName and PeptideGroupLabel fields to "NA" - Change CollisionEnergy format from "-1" to "-1.0" for consistency - Update expected test output files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix test mode to disable decoy transitions for reproducibility The refactoring that added command-line flags for IPF decoy parameters accidentally removed the automatic disabling of decoy transitions in test mode. This caused TOPP_OpenSwathAssayGenerator tests to fail by generating extra UISDECOY transitions not present in expected outputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix light-path IPF UIS window generation to respect enable_swath_specifity The light-path IPF code only checked swathes.empty(), causing divergence from the heavy path which respects the enable_swath_specifity flag. Changed the condition to (!enable_swath_specifity || swathes.empty()) to match the heavy path behavior. Also fixed the loop calculation to use Math::round() instead of truncation for consistent window count computation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Optimize LightTransition memory layout with compact types Memory optimizations for LightTransition struct: - Add FragmentIonType enum (1 byte vs 32+ bytes for std::string) - Add TransitionFlags bitfield for packed bools (1 byte vs 4+ bytes) - Change fragment_charge from int to int8_t (4 bytes → 1 byte) - Change fragment_nr from int to int16_t (4 bytes → 2 bytes) Estimated savings: ~39+ bytes per transition (~19 MB for 500K transitions) Updated all consumers to use new getter/setter API: - TransitionPQPFile.cpp, TransitionTSVFile.cpp (I/O) - MRMAssay.cpp, MRMDecoy.cpp (assay/decoy generation) - DataAccessHelper.cpp, OpenSwathHelper.cpp (utilities) - MRMFeatureFinderScoring.cpp (feature finding) - pyOpenMS bindings (LightTargetedExperiment.pxd) All 2383 relevant tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Eliminate annotation string field from LightTransition Replace stored annotation string with getAnnotation() method that reconstructs annotations from existing fields (fragment_type, fragment_nr, fragment_charge). This saves ~32 bytes per transition. Key changes: - Add getAnnotation() method to LightTransition that builds annotation strings like "b4^1", "y10^2", "prec" from fragment metadata - Update MRMAssay.cpp to extract charge from annotation strings when parsing (format: type + ordinal + "^" + charge) - Update MRMDecoy.cpp similarly for decoy transition generation - Update TransitionTSVFile.cpp and TransitionPQPFile.cpp to use getAnnotation() instead of direct field access - Update pyOpenMS bindings to expose getAnnotation() method The annotation format matches MRMIonSeries.cpp which generates annotations as: type + ordinal + "^" + charge (e.g., "b4^1") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix decoy compound ID bug in light-path IPF generation The light-path decoy generation was incorrectly setting decoy_compound.id to "DECOY_" + compound.id, causing decoy transitions to reference non-existent compound IDs. This differed from the heavy-path behavior where decoy peptide IDs are kept identical to target peptide IDs. Fixed by removing the "DECOY_" prefix, matching the heavy-path approach where decoy transitions reference target compounds (which exist) and are distinguished by their decoy flag instead of a different compound ID. Also updated test reference file to reflect correct annotation reconstruction from structured fields (FragmentType + FragmentSeriesNumber + FragmentCharge). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix heavy-path UIS swath window generation when swathes is empty The heavy-path IPF code only checked !enable_swath_specifity to decide whether to generate default UIS swath windows, while the light-path correctly checks (!enable_swath_specifity || swathes.empty()). This caused the heavy-path to use empty swathes when enable_swath_specifity was true but no swathes were provided, resulting in no swath windows being generated for UIS transitions. Fixed by adding || swathes.empty() to match the light-path logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix duplicate conditions in stringToFragmentIonType Remove redundant duplicate OR operands in z-prime and z-dot ion checks. The conditions (s == "z'" || s == "z'") and (s == "z." || s == "z.") were copy-paste mistakes with identical strings on both sides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix ambiguous operator+ between String and std::string Explicitly wrap tr.getFragmentType() in String() to avoid ambiguous overload resolution between String::operator+ and std::string::operator+ on some compilers/platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV output: use NA for empty fields and fix pyOpenMS bindings - Add NA handling for empty fields in light-path TSV output: label_type, compound_name, sum_formula, smiles, adducts, peptide_sequence, full_peptide_name, protein_names, uniprot_ids - Fix pyOpenMS LightTargetedExperiment.pxd: use int instead of signed char/short for fragment_charge and fragment_nr to avoid Cython treating int8_t as bytes type - Update test reference files to reflect new NA values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add light/heavy path equivalence tests for TransitionTSVFile Add comprehensive unit tests verifying equivalence between light and heavy paths for transition library I/O: - Light path TSV roundtrip test - Light vs Heavy path equivalence via PQP roundtrip - Light path preserves transition flags (detecting/quantifying/identifying) - Light path preserves fragment annotation Tests use field normalization to handle expected empty/"NA" differences between paths while catching real bugs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add streaming TSV parser for ~5x memory reduction Implement streamTSVToLightTargetedExperiment_() which reads TSV files directly into LightTargetedExperiment without creating an intermediate vector<TSVTransition>. This eliminates the memory duplication where data was stored twice during parsing. Memory improvement for 1M transitions: - Old: ~630MB peak (500MB TSVTransition vector + 130MB LightExperiment) - New: ~130MB peak (only LightTargetedExperiment + small tracking maps) Key implementation details: - Single TSVTransition buffer reused for each line - Inline mixed sequence group detection during streaming - Immediate conversion to LightTransition/LightCompound/LightProtein - Progress tracking with line count pre-scan 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add streaming PQP reader for ~5x memory reduction Implement streamPQPToLightTargetedExperiment_() which reads PQP files directly into LightTargetedExperiment without creating an intermediate vector<TSVTransition>. This eliminates memory duplication during parsing. Memory improvement for 1M transitions: - Old: ~630MB peak (500MB TSVTransition vector + 130MB LightExperiment) - New: ~130MB peak (only LightTargetedExperiment + small tracking maps) Key implementation details: - Direct SQL row to LightTransition conversion - Compound/protein deduplication inline during streaming - Same SQL queries as original for compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV: use empty fields for LabelType, CompoundName, SumFormula, SMILES Remove NA handling for these 4 fields to match heavy-path output format. Only Adducts remains as NA when not set. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Cleanup: remove dead code and refactor PQP SQL query building - Remove unused TSVToTargetedExperiment_ overload for LightTargetedExperiment (now handled by streaming parser) - Extract duplicated SQL query building into buildPQPSelectQuery_() helper - Add PQPSqlQueryInfo struct to hold query and column availability flags - Net reduction of ~240 lines of code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Use std::map for MRMIonSeries::IonSeries for ARM64 portability Change IonSeries typedef from std::unordered_map to std::map to ensure deterministic iteration order across all platforms. This fixes potential ARM64 portability issues where hash table iteration order differs from x86_64, causing different ion annotation results when tie-breaking in annotateIon(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix switchKRLight() to use portable deterministic hash Replace static RNG with FNV-1a hash of peptide sequence for selecting replacement amino acids. This ensures: - Same peptide always gets the same replacement AA (reproducible) - Results are independent of processing order (portable across platforms) - Fixes ARM64 portability issue where hash table iteration order differs Updated test expected outputs to reflect the new deterministic behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Remove dead srand() calls in MRMDecoy The srand(time(nullptr)) calls seeded C's rand() function, but portable_random_shuffle() uses boost::mt19937_64 which is independent. These calls had no effect on program behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Light-path TSV: use empty fields for Adducts and UniprotId For consistency with heavy-path output, leave Adducts and UniprotId columns empty instead of "NA" when not set. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix OpenSwathAssayGenerator test_4 for cross-platform portability PQP files (SQLite binary format) have platform-dependent internal layout, causing byte-by-byte comparison to fail on macOS ARM64. Changed test to use TSV roundtrip comparison with -sort flag for portable testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> * [DOC] Improve AGENTS.md based on best practices research (#8560) Restructure AGENTS.md following the AGENTS.md standard best practices: - Add Critical Constraints section upfront (what NOT to do) - Add Quick Commands section with copy-paste ready commands - Add code examples for naming conventions and file structure - Add testing pattern examples with actual code - Add verification commands section - Create concise change impact checklist table - Consolidate external links to essential resources only - Improve overall structure for agent consumption Based on research from GitHub's analysis of 2,500+ repositories and the official AGENTS.md specification. Co-authored-by: Claude <[email protected]> * Remove outdated template files and update test creation documentation (#8548) * Initial plan * Remove outdated templates and update documentation references Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * [DOC] Improve AGENTS.md based on best practices research (#8563) * [DOC] Improve AGENTS.md based on best practices research Enhance AGENTS.md following the AGENTS.md standard best practices while preserving all original content: Added: - Critical Constraints section upfront (explicit "NEVER do" list) - Quick Commands section with copy-paste ready bash commands - Visual directory tree for repo layout - Code examples for naming conventions, file structure, and tests - Commit message example - Debugging command examples Preserved: - All original build/install instructions - All testing guidelines and details - All coding conventions - All pyOpenMS wrapping details - All external documentation links - All CI/packaging information Based on research from GitHub's analysis of 2,500+ repositories and the official AGENTS.md specification. * [DOC] Add Doxygen style guide and OS-specific build gotchas to AGENTS.md Expand AGENTS.md with detailed information researched from the codebase: Doxygen Documentation Style: - File header format with $Maintainer$ and $Authors$ markers - Class documentation with @brief, @ingroup, @htmlinclude - Method documentation with @param[in/out], @return, @throws - Constructor/destructor grouping with @name and //@{ - Inline documentation with /// comments - Common Doxygen tags reference table Platform-Specific Build Gotchas: - Windows: MSVC requirements, MinGW not supported, Release/Debug mixing - macOS: AppleClang linker flag, Qt PrintSupport, code signing - Linux: PIC flags, STL debug mode, headless GUI testing - Qt6: version requirements, component dependencies, WebEngine - Boost: Homebrew static linking issues and workarounds - CMake: CMAKE_SIZEOF_VOID_P bug, Eigen3 version detection Also added: - Required and optional dependency lists - CMake minimum version (3.21) and C++20 standard requirement --------- Co-authored-by: Claude <[email protected]> * Cleanup TOPP tests, clean gitignore (#8555) * Fix some race conditions in topp tests * remove files that shouldn''t be tracked * start moving temporary topp files into separate directory * second batch of topp tests fixed. * third batch * fourth pass * ixed the hardcoded CSV output path to use the input file's directory instead of the test execution directory, and corrected all 8 instances of "ambigious" → "ambiguous" spelling * re-add idripper idxmls * re-organize .gitignore * more .gitignore cleanup * create proper temp files for tests * gitignore cleanup * remove dupes from merge * address coderabbit comments * Fix temp file location * use QDir for constructing paths in OpenNuXL * Remove overbroad test file exclusions from gitignore * Address code comments. * Document ProteomicsLFQ automatic median normalization behavior (#8438) * Initial plan * Document ProteomicsLFQ normalization behavior - Add detailed normalization documentation to Doxygen header - Clarify automatic median normalization for feature intensity quantification - Document when normalization is disabled (MSstats/Triqler output) - Explain relationship between consensus feature normalization and ProteinQuantification:consensus:normalize - Add inline code comments for better code clarity - Update PeptideAndProteinQuant parameter description - Provide workaround for using alternative normalization methods Co-authored-by: timosachsenberg <[email protected]> * Fix hyphenation in documentation Use proper compound adjective form "feature-intensity-based" instead of "feature intensity-based" Co-authored-by: timosachsenberg <[email protected]> * Apply suggestions from code review --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> * Enhance DataValue conversion error messages with type and value context (#8572) * Initial plan * Improve DataValue error messages to include type and value information Co-authored-by: timosachsenberg <[email protected]> * Add tests to verify improved DataValue error messages Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Document wrapping classes with deleted/private constructors in pyOpenMS (#8561) * Initial plan * Document how to wrap classes with deleted/private constructors in pyOpenMS Co-authored-by: timosachsenberg <[email protected]> * Fix spacing in wrap-ignore comment for consistency Co-authored-by: timosachsenberg <[email protected]> * Add namespace context to XMLHandler example for accuracy Co-authored-by: timosachsenberg <[email protected]> * Add clarifying notes about singleton getInstance() overloads Co-authored-by: timosachsenberg <[email protected]> * Improve documentation for wrap-manual-memory and fix Pattern 4 example - Add wrap-manual-memory directive to "Hints to autowrap" section - Document autowrap naming convention for wrap-ignore'd functions - Fix misleading wrap-manual-dealloc reference (not a real directive) - Update Pattern 4 example to match actual ConsensusIDAlgorithm.pxd - Use PeptideIdentificationList instead of outdated libcpp_vector type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * Add precursor m/z range filter option to PeakFileOptions Adds setPrecursorMZRange(), hasPrecursorMZRange(), and getPrecursorMZRange() methods to filter spectra based on their precursor m/z values. Updates hasFilters() to include this new filter type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Timo Sachsenberg <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Samuel Wein <[email protected]> Co-authored-by: timosachsenberg <[email protected]> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Fix corrupted byte offsets in MzMLFile_4_indexed.mzML test file The indexed mzML test file had incorrect byte offsets in the index section, causing parse failures on ARM Linux and Mac platforms. Regenerated the file with FileConverter to fix the spectrum offsets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: jpfeuffer <[email protected]> Co-authored-by: Samuel Wein <[email protected]> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Justin Sing <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
This implements Option D from issue #8456: use
Eigen::Maponly without PIMPL to hide Eigen from the OpenMS public API.Key Changes
Eigen3::Eigenfrom PUBLIC to PRIVATE linkingstd::vector<T>storage (column-major) instead of inheriting from EigeneigenView()for zero-copy Eigen accessGenericFunctorinterface to use rawdouble*instead of Eigen typeseigenView()directly to link against EigenBenefits
eigenView()Files Changed (30 files)
New:
src/openms/include/OpenMS/DATASTRUCTURES/MatrixEigen.h- Internal Eigen utilitiesModified Headers:
Matrix.h- Rewritten with std::vector storageTraceFitter.h,LevMarqFitter1D.h- Remove Eigen from public interfaceEGHTraceFitter.h,GaussTraceFitter.h,EmgFitter1D.h- Update functor signaturesIsobaricIsotopeCorrector.h,NonNegativeLeastSquaresSolver.h,BilinearInterpolation.hModified Sources:
.cppfiles updated to useeigenView()pattern<cmath>,<Eigen/LU>,<Eigen/QR>)Test plan
Closes #8456
🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.