Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Deconvolution using UniDec #625

Open
wants to merge 46 commits into
base: UniDecPort
Choose a base branch
from

Conversation

avcarr2
Copy link
Contributor

@avcarr2 avcarr2 commented Mar 31, 2022

Low-resolution, top-down mass spectra are difficult to deconvolute due to their lack of isotopically resolved peaks. UniDec is the current standard for the deconvolution of low-resolution protein mass spectra.

UniDec's primary algorithm is written in C, while mzLib is written in C#, requiring me to pass data back and forth between managed C# code and unmanaged C code. I created a dynamic library in C from which mzLib can call UniDec functions. I had to heavily rely on unsafe C# code (pointers and such) in order to efficiently pass data to the unmanaged C code functions.

There are significant issues with the initial commit which I will be working on in the coming weeks. The primary issues are 1) further optimizations of the UniDec algorithm and 2) memory management in both C and C#. There are several points in this code that risk int overflow issues, which the unmanaged C code will not tell you are occurring. I would also like to get rid of most of the unsafe C# code, but I'm not sure yet how viable that is.

Unit test coverage for the functions called from the C unmanaged code are forthcoming. Unit tests will also cover passing data structures back and forth between the managed and unmanaged code.

@acesnik
Copy link
Collaborator

acesnik commented Mar 31, 2022

Cool PR!

The base directory was simplified to have as many files as possible in the mzLib/ subdirectory. Could you relocate the new files into the mzLib subfolder, e.g. mzLib.sln is now at mzLib/mzLib.sln, when you have the chance?

mzLib.sln Outdated
{D2B8F696-1172-405B-B788-3251B27CC71A}.Release|x64.ActiveCfg = Release|x64
{D2B8F696-1172-405B-B788-3251B27CC71A}.Release|x64.Build.0 = Release|x64
{D2B8F696-1172-405B-B788-3251B27CC71A}.Release|x86.ActiveCfg = Release|x64
Copy link
Collaborator

@acesnik acesnik Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need these x86 and AnyCPU configurations? I think x64 is the only one that's used currently to allow > 2 GB RAM usage, so consider removing these x86 and AnyCPU ones.

avcarr2 and others added 3 commits April 1, 2022 11:49
…wisc#624)

* fix median polish bug when proteins cannot be quantified

* comment out protein quant intensity checks in some tests. add explainer comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants