Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BiGG Metabolite #124

Merged
merged 19 commits into from
Dec 4, 2024
Merged

Add BiGG Metabolite #124

merged 19 commits into from
Dec 4, 2024

Conversation

samuelbunga
Copy link
Contributor

@samuelbunga samuelbunga commented Nov 10, 2021

This PR adds the BiGG Metabolite database

@cthoyt cthoyt added the Nomenclature Data Nomenclature to convert to OBO label Nov 10, 2021
@samuelbunga
Copy link
Contributor Author

Hi Charlie, I just added new changes. Please review them in your free time. Thanks!

version=version,
)

for v in bigg_df.values:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v is a bad variable name. Better is to use tuple unpacking

Suggested change
for v in bigg_df.values:
for bigg_id, name in bigg_df.values:

skiprows=18,
header=None,
names=HEADER,
usecols=['bigg_id', 'name'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the other columns? database_links has lots of information worth parsing out, for example. old_bigg_ids can be put in the alternative identifier field in the pyobo.Term

)


def get_terms(force: bool = False, version: Optional[str] = None) -> Iterable[Term]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check CI - this needs a docstring

@@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-

"""Converter for bigg."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix stylization of BiGG



def get_obo(force: bool = False) -> Obo:
"""Get bigg as OBO."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stylization

def get_obo(force: bool = False) -> Obo:
"""Get bigg as OBO."""
version = bioversions.get_version("bigg")
# version = '1.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code

# version = '1.2'
return Obo(
ontology=PREFIX,
name="bigg models metabolites database",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title case + stylization

name="bigg models metabolites database",
iter_terms=get_terms,
iter_terms_kwargs=dict(force=force, version=version),
typedefs=[has_role],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this included?

for v in bigg_df.values:
bigg_id = v[0]
name = v[1]
synonyms = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why include this blank list?

@cthoyt cthoyt changed the title New source: BiGG Models Metabolite Database Add BiGG Metabolite Dec 4, 2024
@cthoyt cthoyt merged commit 9d76878 into biopragmatics:main Dec 4, 2024
11 checks passed
@cthoyt
Copy link
Member

cthoyt commented Dec 4, 2024

@samuelbunga thanks for the initial check in here, I finally got around to cleaning it up! Hope all is well.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 32.83582% with 45 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@7d8b1ca). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pyobo/sources/bigg_metabolite.py 31.81% 45 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #124   +/-   ##
=======================================
  Coverage        ?   41.51%           
=======================================
  Files           ?      142           
  Lines           ?     8703           
  Branches        ?     1308           
=======================================
  Hits            ?     3613           
  Misses          ?     4973           
  Partials        ?      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nomenclature Data Nomenclature to convert to OBO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants