Skip to content

Commit

Permalink
Re-factor name retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Oct 10, 2023
1 parent 1bc5b35 commit 51ffa01
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyteomics/proforma.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __init__(self, **kwargs):

def load_database(self):
if _has_psims:
return load_unimod()
return obo_cache.load("http://www.unimod.org/obo/unimod.obo")
return Unimod()

def resolve(self, name=None, id=None, **kwargs):
Expand Down Expand Up @@ -397,9 +397,12 @@ def resolve(self, name=None, id=None, **kwargs):
'provider': self.name
}
else:
name = defn.ex_code_name
if not name:
name = defn.code_name
return {
"composition": defn.composition,
"name": defn.ex_code_name,
"name": name,
"id": defn.id,
"mass": defn.monoisotopic_mass,
"provider": self.name
Expand Down

0 comments on commit 51ffa01

Please sign in to comment.