Closed levitsky closed 4 years ago
Thanks Lev. I'm much indebted to Pyteomics, I always use it together with spectrum_utils.
The problem was that if max_ion_charge
isn't set, by default all fragments with a charge up to the precursor minus one are annotated (as detailed in the docstring). However, when the charge is 1, the minus one would result in 0, leading to the error. I've updated it now so that the minimum charge considered is 1.
The bugfix is available in spectrum_utils version 0.3.4 from pip, and will be available from Bioconda shortly as well.
Hi and thank you for the great package!
First time using it and it seems to have a problem annotating one of my spectra where the precursor charge is
1
.Code causing the problem:
s.annotate_peptide_fragments(0.5, 'Da', ion_types='aby')
(copied from docs) Error:The error goes away if I specify
max_ion_charge=1
. Perhaps it makes sense to make the default value be 1 if the precursor charge is 1.The spectrum is:
Best regards, Lev