Code Monkey home page Code Monkey logo

Comments (5)

stefanks avatar stefanks commented on June 20, 2024

Hm, looks like a bug. Good catch! Do you have a fix in mind?

from mzlib.

acesnik avatar acesnik commented on June 20, 2024

I'm a little uncertain about the history here. If I remember correctly, we decided not to hash on the ID for some reason, maybe basing the uniqueness on other properties. As for the monoisotopic mass, it seems like you want a little tolerance (1e-9), so I'm not sure how to handle that in a hash code. Rounding seems like an option, but that's not the same as a tolerance.

from mzlib.

stefanks avatar stefanks commented on June 20, 2024

I looked into this, and now I'm not sure this is a concern, since hash codes do not need to be unique. Unless this poses an actual problem, I vote to close this issue.

from mzlib.

acesnik avatar acesnik commented on June 20, 2024

The problem I'm encountering is in merging databases. Consider 2 databases both derived from the UniProt database but with additional sets of PTMs. They will have many of the same mods at positions along proteins in the databases. In merging, it would be nice to make a hash set of modifications at each position and call it a day. Instead, the hash set behaves weirdly, getting rid of ModificationWithMass
objects that have very different masses and different IDs.

We already use HashSets of Modification objects (here and here), so we should be careful here.

from mzlib.

acesnik avatar acesnik commented on June 20, 2024

The test I wrote yesterday works now... I think the tests weren't building properly at the end of the day yesterday. Thanks!

from mzlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.