shuzhao-li-lab / metDataModel

Data models for metabolomics, made to reuse
Other
3 stars 1 forks source link

Intiate a discuss on better defining reaction in detail. #1

Closed gmhhope closed 3 years ago

gmhhope commented 3 years ago

Reaction

class Reaction:
    '''
    Key info is reactants and products - each a list of compounds.
    Reactions are species specific, 
    because genes are species specific.
    '''
    def __init__(self):
        self.azimuth_id = ''
        self.source = []
        self.version = ''
        # status, one of ['active', 'under review', 'obsolete']
        self.status = ''

        self.reactants = [] #key term and can be solved easily
        self.products = [] #key term and can be solved easily
        self.enzymes = [] # I guess it can be defined as ec-code or any others. In SBML there is no a unified term for enzymes.
        self.genes = [].  # This can be found in gene association, however, it may contain AND/OR class in SBML version 3.

        self.pathways = [] #at this stage, it probably can accept SUBSYSTEM 
        self.ontologies = [] # I don't understand this term in the metabolite world.

        self.species = '' 
        self.compartments = [] # a list of this
        self.cell_types = [] # at this stage, probably not useful
        self.tissues = [] # at this stage, probably not useful

gmhhope commented 3 years ago

A redefined compound class object?

class Compound:
    def __init__(self):
        '''
        All metabolites are compounds, but the reverse is not true.
        Thus, compound is a basic class.
        Azimuth ID starts with `az`, 
        and incorporates HMDB ID (less ambiguous than KEGG) whereas possible.

        '''
        #Az_number + 0000001
        self.internal_id = ''
        self.curator = 'MG'
        self.date = ''

        #Common names and others
        self.name = ''          # common name
        self.other_names = {
            'iupac_name':'',
            'traditional_iupac':'',
            'others':[]
        }

        #database IDs
        self.db_ids = {
            'KEGG': '',
            'HMDB': '',
            'Azimuth': '',
            'PubChem': '',
            'MetaNetX': '',
            'chemspider': '',
            'chebi':'',
            'cas_registry_number': '',
            'bigg_fHMDB': '' #Here because bigg_id from HMDB is different that bigg_id in bigg database
            #etc. e.g., for HMDB, can find "_id" and remove it and store here.
            }

        #Formulas and masses
        self.formulas_masses = {
            "formula_charged_state":
                {'formula': '',
                'mono_mass': 0.0000,
                'sources': '',
                'charge': '' #neutral, charged, unknown.
                } 
        }

        #Chemistry properties
        self.SMILES = ''
        self.inchi = ''
        self.inchikey = ''

        #normal concentration and other biological properties.
        self.norm_concentrations = []
        '''
        {'biospecimen': '',         #Blood, Sera or serum
          'concentration_value': '', #0.04 +/- 0.03
          'concentration_units': '', #uM
          'subject_age': '',         #Adult (>18 years old)
          'subject_sex': '',         #Female
          'subject_condition': '',   #Normal
          'reference_pubmed_id':[]   #{'reference_text': '...Biomed Chromatogr. 2008 Jan;22(1):73-80.',
                                     #'pubmed_id': '17668437'}
         }
         '''