Feature/osw auto addup spec#7742
Conversation
…/var for automatrically determining add_up_spectra based on RT peak width
|
nice addition. I left some comments and added other reviewers. |
Co-authored-by: Timo Sachsenberg <timo.sachsenberg@uni-tuebingen.de>
Co-authored-by: Timo Sachsenberg <timo.sachsenberg@uni-tuebingen.de>
…of spectra to merge
jcharkow
left a comment
There was a problem hiding this comment.
Overall looks good to me.
One thought though is does it make sense to have both the "fixed" and the "percentile" based addition approaches? Would it make more sense to replace the fixed with the percentile approach or are there cases where the fixed approach is better?
I do not think the fixed approach is used in practice, at least for me.
I agree that this would also be my preferred way forward if possible. E.g., only support percentage |
I do agree as well, though I've left the fixed as an option because that's the current approach that is used. But we could make the dynamic merging of spectra the default? Or like Timo suggested, we could have a default where we just clamp between a reasonable range. This would probably be important for cases where we have a really large peak. |
|
|
||
| double getRT() const override; | ||
|
|
||
| double getMetaValue(std::string name) const; |
There was a problem hiding this comment.
consider using RangeRT
There was a problem hiding this comment.
I was looking into applying this, but I think it would require more changes to other parts of OpenSwath. Currently OpenSwath (and some of the other FeatureFinders) stores the leftWidth and rightWidth in the metaValue, which is then used for retrieval at some point. I think the RangeRT would be a good replacement, but I think those changes would maybe be for another PR?
|
|
||
| // find spectrum that is closest to the apex of the peak using binary search | ||
| std::vector<OpenSwath::SpectrumPtr> spectrum = fetchSpectrumSwath(used_swath_maps, imrmfeature->getRT(), add_up_spectra_, im_range); | ||
| std::vector<OpenSwath::SpectrumPtr> spectrum = fetchSpectrumSwath(swath_maps, imrmfeature->getRT(), n_merge_spectra, im_range); |
There was a problem hiding this comment.
could probably be one
Yeah, less options = better test coverage, less combinatorics => less things that can get wrong |
|
I think the mock mrmfeature also needs the new method implemented |
|
Sorry, been busy with another project. Just wanted to follow up on this, I think I mostly addressed all the comments/suggestions? You mentioned the mock MRMFeature needed the new method implementation? Can you point me to where that is? |
|
This is the error: ../src/tests/class_tests/openms/source/MRMScoring_test.cpp:590:46: error: allocating an object of abstract class type 'OpenSwath::MockMRMFeature' Probably an added method is not implemented there. |
…S into feature/osw_auto_addup_spec
Ahh kk, I updated the MockObjects. Should work now, passed locally. |
There was a problem hiding this comment.
I think these interfaces would profit a lot from some documentation in the future.
e.g. such that things like the difference between:
virtual void getIntensity(std::vector& intens) const = 0;
virtual float getIntensity() const = 0;
for what virtual double getMetaValue(std::string name) const = 0; is used (and ideally which ones are currently queried)
|
All tests pass, can we merge? |
Description
This is 1 of 3 (probably) PRs related to improvements for ion mobility IPF scoring. I'm breaking up my main implementation into smaller PRs to hopefully make the revision easier.
This PR implements the ability to automatically add up spectra across the peak width in retention time. The original implementation extracted spectra at the peak apex, with the option of extracting more spectra across the peak by setting the
add_up_spectra_param to an odd value greater than 1. Now the user can setadd_up_spectra_to -1, which will turn on the automatic computation ofadd_up_spectra_based on the percent of the peak width. The general idea behind adding up more spectra, is that it could lead to cleaner / higher signal in the ion mobility extraction.Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI builds