mgkit.mappings.eggnog module

Module containing classes and functions to deal with eggNOG data

Todo

  • unify download of data from web

mgkit.mappings.eggnog.EGGNOG_CAT = {'A': 'RNA processing and modification', 'B': 'Chromatin structure and dynamics', 'C': 'Energy production and conversion', 'D': 'Cell cycle control, cell division, chromosome partitioning', 'E': 'Amino acid transport and metabolism', 'F': 'Nucleotide transport and metabolism', 'G': 'Carbohydrate transport and metabolism', 'H': 'Coenzyme transport and metabolism', 'I': 'Lipid transport and metabolism', 'J': 'Translation, ribosomal structure and biogenesis', 'K': 'Transcription', 'L': 'Replication, recombination and repair', 'M': 'Cell wall/membrane/envelope biogenesis', 'N': 'Cell motility', 'O': 'Posttranslational modification, protein turnover, chaperones', 'P': 'Inorganic ion transport and metabolism', 'Q': 'Secondary metabolites biosynthesis, transport and catabolism', 'R': 'General function prediction only', 'S': 'Function unknown', 'T': 'Signal transduction mechanisms', 'U': 'Intracellular trafficking, secretion, and vesicular transport', 'V': 'Defense mechanisms', 'W': 'Extracellular structures', 'Y': 'Nuclear structure', 'Z': 'Cytoskeleton'}

Single letter functional categories

mgkit.mappings.eggnog.EGGNOG_CAT_KEYS = (('J', 'A', 'K', 'L', 'B'), ('D', 'Y', 'V', 'T', 'M', 'N', 'Z', 'W', 'U', 'O'), ('C', 'G', 'E', 'F', 'H', 'I', 'P', 'Q'), ('R', 'S'))

Used to build map of broader categories (EGGNOG_CAT_NAMES) to more specific ones

mgkit.mappings.eggnog.EGGNOG_CAT_MAP = {'CELLULAR PROCESSES AND SIGNALING': ('D', 'Y', 'V', 'T', 'M', 'N', 'Z', 'W', 'U', 'O'), 'INFORMATION STORAGE AND PROCESSING': ('J', 'A', 'K', 'L', 'B'), 'METABOLISM': ('C', 'G', 'E', 'F', 'H', 'I', 'P', 'Q'), 'POORLY CHARACTERIZED': ('R', 'S')}

Functional categories (broader, EGGNOG_CAT_NAMES) mappings to more specific one (EGGNOG_CAT).

mgkit.mappings.eggnog.EGGNOG_CAT_NAMES = ('INFORMATION STORAGE AND PROCESSING', 'CELLULAR PROCESSES AND SIGNALING', 'METABOLISM', 'POORLY CHARACTERIZED')

Functional categories (broader)

class mgkit.mappings.eggnog.NOGInfo(members=None, funccat=None, description=None)[source]

Bases: object

New in version 0.1.14.

Changed in version 0.4.0: made file reading compatible with Python 3

Mappings from Uniprot to eggNOG

..note:

load_description is optional
get_gene_funccat(gene_id)[source]

Returns the functional category (one letter, EGGNOG_CAT keys) for the requested eggNOG gene ID

get_gene_nog(gene_id)[source]

Returns the COG/NOG ID of the requested eggNOG gene ID

get_nog_funccat(nog_id)[source]

Returns the functional category (one letter, EGGNOG_CAT keys) for the requested eggNOG COG/NOG ID

get_nog_gencat(nog_id)[source]

Returns the functional category (EGGNOG_CAT_NAMES keys) for the requested eggNOG COG/NOG IDs

get_nogs_funccat(nog_ids)[source]

Returns the functional categories for a list of COG/NOG IDs. Uses NOGInfo.get_nog_funccat()

load_description(file_handle)[source]

Loads data from NOG.description.txt.gz

file_handle can either an open file or a path

load_funccat(file_handle)[source]

Loads data from NOG.funccat.txt.gz

file_handle can either an open file or a path

load_members(file_handle)[source]

Loads data from NOG.members.txt.gz

file_handle can either an open file or a path

mgkit.mappings.eggnog.get_general_eggnog_cat(category)[source]

New in version 0.1.14.

Returns the functional category (EGGNOG_CAT_NAMES keys) for the requested single letter functional category (EGGNOG_CAT keys)