ID Mapping¶
Interface to mapping between species IDs.
We constructed two classes for mappings ids. 1. GeneMapper 2. ChemicalMapper
Currently supported options¶
- Genes
KEGG, HGNC, Uniprot, Entrez, ensembl_gene_id
- Metabolites/compounds
kegg_id, name, accession, chebi_id, chemspider_id, biocyc_id, synonyms, pubchem_compound_id, protein_associations, inchikey, iupac_name, ontology, drugbank_id, chemical_formula, smiles, metlin_id, average_molecular_weight
- class magine.mappings.ChemicalMapper(fresh_download=False)[source]¶
Bases:
objectConvert chemical species across various ids.
Database was creating using HMDB
- check_synonym_dict(term, format_name)[source]¶
checks hmdb database for synonyms and returns formatted name
- Parameters
- termstr
- format_namestr
- Returns
- dict
Examples
>>> cm = ChemicalMapper() >>> cm.check_synonym_dict(term='dodecene', format_name='main_accession') ['HMDB0000933', 'HMDB0059874']
- property chem_name_to_hmdb¶
- convert_kegg_nodes(network)[source]¶
Maps network from kegg to gene names
- Parameters
- networknx.DiGraph
- Returns
- dict
- property drugbank_to_hmdb¶
- property hmdb_accession_to_main¶
- property hmdb_main_to_protein¶
- property hmdb_to_kegg¶
- property hmdb_to_protein¶
- valid_columns = ['kegg_id', 'name', 'accession', 'chebi_id', 'inchikey', 'chemspider_id', 'biocyc_id', 'synonyms', 'iupac_name', 'pubchem_compound_id', 'protein_associations', 'ontology', 'drugbank_id', 'chemical_formula', 'smiles', 'metlin_id', 'average_molecular_weight', 'secondary_accessions']¶
- class magine.mappings.GeneMapper(species='hsa')[source]¶
Bases:
objectMapping class between common gene ids
Database was creating by pulling down from NCBI, UNIPROT, HGNC
- check_synonym_dict(term, format_name)[source]¶
checks hmdb database for synonyms and returns formatted name
- Parameters
- termstr
- format_namestr
- Returns
- dict
- convert_kegg_nodes(network, species='hsa')[source]¶
Convert kegg ids to HGNC gene symbol.
- Parameters
- networknx.DiGraph
- speciesstr {‘hsa’}
Main support for humans only.
- Returns
- kegg_to_gene_name, kegg_shortdict, dict
- property gene_name_to_alias_name¶
- property gene_name_to_ensembl¶
- property gene_name_to_kegg¶
- property gene_name_to_uniprot¶
- property kegg_to_gene_name¶
- kegg_to_hugo(genes, species='hsa')[source]¶
Converts all KEGG names to HGNC
- Parameters
- geneslist
- speciesstr
- Returns
- dict
- property kegg_to_uniprot¶
- property ncbi_to_symbol¶
- property uniprot_to_gene_name¶
- property uniprot_to_kegg¶
Database Mapping¶
Interface to downloading ID mapping databases.
Databases supported