Closed jspaezp closed 2 years ago
Thanks for reporting the issue, that's indeed something I overlooked. I'll have it fixed in a new release soon.
Fixed in 84af89a.
Static modifications should no longer be set explicitly. Instead, the ProForma mechanism is to be used for specifying any type of modification.
Hello there!
I was using the package and noted an unexpected behavior, where setting the static modifications twice in the code (inadvertedly) made the mass offsets of an aminoacid to double instead of keeping the provided mass
Dummy example with plots: https://colab.research.google.com/drive/1x913OBS6ieRPLY3H91cT_wopxGvCKdQy?usp=sharing
"Error" source in the code https://github.com/bittremieux/spectrum_utils/blob/c45c30930de2326d5a39e453fe8e7fc58e388892/spectrum_utils/spectrum.py#L26-L40
Expected behavior:
Setting twice the same static modifications for an amino acid would keep the first one, instead of doubling the offset of the mass
Possible solutions:
static_modification
to decide how to handle those cases, whether the mass diff should over-write the current one or append to it.Potential code change:
let me know what you think Kindest wishes Sebastian