Skip to content

Refactoring: convex hulls #4289

Closed as not planned
Closed as not planned

Description

@timosachsenberg

As we are currently looking into storing feature maps in SQL we found some old quirks.
Currently, we support a vector of arbitrary hull points + a vector of bounding boxes.
The only use case for arbitrary hull points in OpenMS is storing mass traces (mainly for debugging purposes) and in the MRM code.
I propose to:

  • only store a set of bounding boxes
  • store arbitrary mass traces (if required for debugging or debug visualization) in a meta value

Using a set, we don't need to store the order of bounding boxes (which should be determined by e.g. increasing m/z values) in a table.

@cbielow what is your take on that? I think you were the last one who touched that code (IIRC on a developer retreat)

Activity

  1. hroest commented on Oct 8, 2019

    @hroest
    Contributor
  2. timosachsenberg commented on Oct 10, 2019

    @timosachsenberg
    ContributorAuthor

    The other places I found using multiple hull points are in the MRM feature code.
    I guess these just correspond to mass traces of chromatograms so I am currently thinking about whether we should add both an (in most cases empty) vector of chromatograms & a vector of masstraces to each feature.
    Would add about 2 * 24 Byte per Feature.

  3. hroest commented on Oct 10, 2019

    @hroest
    Contributor

    I guess these just correspond to mass traces of chromatograms so I am currently thinking about whether we should add both an (in most cases empty) vector of chromatograms & a vector of masstraces to each feature.

    both sounds like a waste - what about adding a ptr and only when the feature is used it consumes memory? (except the 8 bytes for the ptr)

  4. timosachsenberg commented on Oct 10, 2019

    @timosachsenberg
    ContributorAuthor

    Yes thats possible

  5. hroest commented on Oct 10, 2019

    @hroest
    Contributor

    I guess these just correspond to mass traces of chromatograms

    yes they do

  6. cbielow commented on Oct 11, 2019

    @cbielow
    Contributor

    only store a set of bounding boxes

    why a set? the number of items will be small. Use vector (performance)

    I'm not sure about the best design for mass traces. The most efficient way to store this optional information would be inside the FeatureMap, as a vector m_ which has the same length as the feature vector or empty (if features do not have mass traces). However, then there is no way to directly request the MTs given a feature. You'd always need the map.
    If the current code would allow this without much hassle, I'd go for that. Otherwise, unique_ptr as Hannes suggested.

  7. hendrikweisser commented on Oct 28, 2019

    @hendrikweisser
    Contributor

    why a set? the number of items will be small. Use vector (performance)

    I agree with this. If you don't need ordering or uniqueness, there's no good reason for a set.

    I'm not sure about the best design for mass traces.

    I would question whether they need to be stored in a feature map at all. For debugging/visualisation, couldn't they go in an optional mzML output (as chromatograms)?

  8. timosachsenberg commented on Oct 28, 2019

    @timosachsenberg
    ContributorAuthor

    Yeah probably better to just reference the mass traces.
    The problem is that it is already used at quite some places for e.g., fitting a model to the points in the convex hull (= as mass trace).
    Don't know if I will find time to refactor that now.

  9. hroest commented on Oct 28, 2019

    @hroest
    Contributor

    For debugging/visualisation, couldn't they go in an optional mzML output (as chromatograms)?

    thats what we currently do in OpenSWATH

  10. github-actions commented on Feb 2, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions