diff --git a/mzspeclib/backends/encyclopedia.py b/mzspeclib/backends/encyclopedia.py index b6330df..1040b20 100644 --- a/mzspeclib/backends/encyclopedia.py +++ b/mzspeclib/backends/encyclopedia.py @@ -144,7 +144,7 @@ def get_spectrum(self, spectrum_number: int = None, spectrum_name: str = None): spectrum.key = info['rowid'] spectrum.index = info['rowid'] - 1 spectrum.precursor_mz = info['PrecursorMz'] - spectrum.add_attribute(CHARGE_STATE, row["PrecursorCharge"]) + spectrum.add_attribute(CHARGE_STATE, info["PrecursorCharge"]) try: spectrum.add_attribute(c.RETENTION_TIME, info['RTInSeconds'] / 60.0) except KeyError: