Skip to content

Bug in very special case/special spectrum #83

Description

@LucasSchmidt97

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions