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

Bug in very special case/special spectrum #83

Open
LucasSchmidt97 opened this issue Dec 11, 2017 · 2 comments
Open

Bug in very special case/special spectrum #83

LucasSchmidt97 opened this issue Dec 11, 2017 · 2 comments
Assignees

Comments

@LucasSchmidt97
Copy link
Collaborator

LucasSchmidt97 commented Dec 11, 2017

I found a bug in a very complex spectrum (TP_HeLa, many isotopic clusters).

This is a part of the spectrum, where the error occurs.

x <-
  list(
    mZ = c(1198.099243,1198.600952,1202.089355,1202.591553,1203.088745,1207.557739,1211.093872,1211.593628,1212.094971,1212.597778,1213.094849,1216.608032,1217.601318),
    intensity = c(8578.3525390625,1543.8883056641,3737.509765625,3506.3515625,1044.8107910156,1125.4560546875,25235.189453125,32663.890625,19117.005859375,10095.1240234375,1420.8492431641,1800.1805419922,1100.8802490234),
    title = "Best Cluster Test",
    rtinseconds = 3519.594,
    charge = 4,
    scan = 1,
    id = 1,
    pepmass = 917.9609
  )

dtoper <- deisotoper:::deisotoper()

xd <- deisotoper:::deisotope(dtoper, x)

This is the happening error message:

Error in .jcall(deisotoper$javaRef, "[D", "getMz") : 
  java.lang.IllegalStateException: Wrong intensities (Intensity before: 110969.4890136719 and after: 109548.6397705078!

To be exact it happens at the aggregation of peaks 1211.093872, 1211.593628, 1212.094971, 1212.597778 and 1213.094849.

The intensity of peak 1213.094849 (intensity: 1420.8492431641) disappears, but only when the distance is configurated as standard (1.00048).
Every other test with other spectra and distance run through.

Issue: Fix this bug.

@LucasSchmidt97
Copy link
Collaborator Author

LucasSchmidt97 commented Dec 11, 2017

This error might occur because the shown cluster might be a cluster with 5 isotopes, but our algorithm only works for clusters with 3 isotopes.

When you change the distance to 1.003 this plot is the result:
specialplot

@LucasSchmidt97 LucasSchmidt97 changed the title Bug in very special case Bug in very special case/special spectrum Dec 11, 2017
@wolski
Copy link
Member

wolski commented Dec 18, 2017

Please make a unitest.

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

No branches or pull requests

2 participants