Villen-Lab / pyAscore

A python package for fast post translational modification localization, powered by Cython.
https://pyascore.readthedocs.io/
MIT License
18 stars 5 forks source link

Allow to calculate Peptide Score for unambiguous psms #40

Closed FloBay closed 1 year ago

FloBay commented 1 year ago

Hey,

Great package that you put there together.

We would love to implement this into our pipelines. For this, though, it would be great to have a Peptide Score for unambiguous peptide sequences as well. Of course, the Ascore is infinite, but the Peptide score is still available for the single (=best) possibility, as far as I understand the process.

In particular: https://github.com/AnthonyOfSeattle/pyAscore/blob/25263db3d95fa1b7bfe8c80dd051c78a6ab012e4/pyascore/ptm_scoring/cpp/Ascore.cpp#L267-L271

I was wondering if one could add a flag to support this if performance is really that critical. But frankly, a 90 min raw file on a desktop computer was done in 5 seconds. And for us, it's roughly 20-25 % unambiguous, so that extra would then increase to 7 seconds. IMO still super fast :). So just making it possible as default would be amazing!

Off-topic:

FloBay commented 1 year ago

Okay. local compilation now works and code runs after i substituded all the boolean operators in the cpp-files: and -> && or -> || not -> !

AnthonyOfSeattle commented 1 year ago

Hey! Glad you are liking it and thanks for the PR! The changes sound like good ideas in principle. Got a newborn right now so I will try to review them soon.

AnthonyOfSeattle commented 1 year ago

Just to check in on the compilation problem, are you working in windows? We were handling this particular compilation problem with an environmental variable that set the correct flag. That was a quick but convoluted work around, so it would be nice to know that this solves the problem for that system.

This is how we compile the package currently: https://github.com/Villen-Lab/pyAscore/blob/25263db3d95fa1b7bfe8c80dd051c78a6ab012e4/.github/workflows/windows-build.yml#L37

FloBay commented 1 year ago

Yes I was compiling it on windows in an conda environment.

FloBay commented 1 year ago

But you need at least visual c++ 14.0 c++ build tools... was a issue on one of our windows servers.

AnthonyOfSeattle commented 1 year ago

No problem, glad to have someone who can do this. I don't have windows so the fix was excruciating. Please see my comments in the PR and we can continue.