Skip to content

PedroMTQ/db_mappers

Repository files navigation

DB_mappers

This repo contains some database mapping used in some of my different projects:

  • CHEBI_SQLITE_Connector is a SQLite database where you can input a ChEBI ID and get all its alternative IDs (e.g., other ChEBI IDs and/or other database IDs)
  • Rhea_SQLITE_Connector is a SQLite database where you can input a Rhea ID and get all associated information
  • Taxonomy_SQLITE_Connector is a SQLite database where you can either input a NCBI taxonomy ID or GTDB lineage and get the corresponding ID/lineage. Ambiguous taxa are determined through the lowest common ancestor

How to use this?

Just import the class, create a class instance and run the corresponding methods:

CHEBI_SQLITE_Connector

from CHEBI_SQLITE_Connector import CHEBI_SQLITE_Connector

chebi_connector=CHEBI_SQLITE_Connector()
alternative_ids=chebi_connector.fetch_chebi_id_info('5900')
print(alternative_ids)

This uses the following files:

Rhea_SQLITE_Connector

from Rhea_SQLITE_Connector import Rhea_SQLITE_Connector

rhea_connector=Rhea_SQLITE_Connector()
r=rhea_connector.find_reactions_chebi('16459')
print(r)

This uses the following files:

Taxonomy_SQLITE_Connector

from Taxonomy_SQLITE_Connector import Taxonomy_SQLITE_Connector

gtdb_connector=Taxonomy_SQLITE_Connector()
gtdb_connector.launch_taxonomy_connector()
test=gtdb_connector.fetch_ncbi_id('d__Archaea;p__Halobacteriota;c__Methanosarcinia;o__Methanosarcinales;f__Methanosarcinaceae;g__Methanolobus;s__Methanolobus psychrophilus')
print(test)
test=gtdb_connector.fetch_ncbi_id('s__Methanolobus psychrophilus')
print(test)
test=gtdb_connector.fetch_gtdb_id('1094980')
print(test)

This uses the following files:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages