corems.molecular_id.factory.lipid_molecular_metadata
1__author__ = "Katherine R. Heal" 2__date__ = "2024-01-24" 3 4from dataclasses import dataclass 5 6from .EI_SQL import MetaboliteMetadata 7 8_no_default = object() 9@dataclass 10class LipidMetadata(MetaboliteMetadata): 11 """Dataclass for the Lipid Metadata 12 13 Parameters 14 ---------- 15 name : str 16 The name of the lipid, using the LIPID MAPS nomenclature 17 casno : str 18 The CAS number of the lipid 19 formula : str 20 The molecular formula of the lipid 21 pubchem_id : str 22 The PubChem ID of the lipid 23 structure_level : str 24 The structure level of the lipid, following the LIPID MAPS classification 25 lipid_summed_name : str 26 The summed name of the lipid, aka lipid species, 27 following the LIPID MAPS classification 28 lipid_subclass : str 29 The subclass of the lipid, following the LIPID MAPS classification 30 lipid_class : str 31 The class of the lipid, following the LIPID MAPS classification 32 lipid_category : str 33 The category of the lipid, following the LIPID MAPS classification 34 """ 35 36 casno: str = _no_default 37 pubchem_id: str = _no_default 38 structure_level: str = _no_default 39 40 lipid_summed_name: str = _no_default 41 lipid_subclass: str = _no_default 42 lipid_class: str = _no_default 43 lipid_category: str = _no_default 44 45 def __post_init__(self): 46 for field in self.__dataclass_fields__: 47 if getattr(self, field) is _no_default: 48 raise TypeError( 49 f"__init__ missing 1 required argument: '{field}'" 50 )
10@dataclass 11class LipidMetadata(MetaboliteMetadata): 12 """Dataclass for the Lipid Metadata 13 14 Parameters 15 ---------- 16 name : str 17 The name of the lipid, using the LIPID MAPS nomenclature 18 casno : str 19 The CAS number of the lipid 20 formula : str 21 The molecular formula of the lipid 22 pubchem_id : str 23 The PubChem ID of the lipid 24 structure_level : str 25 The structure level of the lipid, following the LIPID MAPS classification 26 lipid_summed_name : str 27 The summed name of the lipid, aka lipid species, 28 following the LIPID MAPS classification 29 lipid_subclass : str 30 The subclass of the lipid, following the LIPID MAPS classification 31 lipid_class : str 32 The class of the lipid, following the LIPID MAPS classification 33 lipid_category : str 34 The category of the lipid, following the LIPID MAPS classification 35 """ 36 37 casno: str = _no_default 38 pubchem_id: str = _no_default 39 structure_level: str = _no_default 40 41 lipid_summed_name: str = _no_default 42 lipid_subclass: str = _no_default 43 lipid_class: str = _no_default 44 lipid_category: str = _no_default 45 46 def __post_init__(self): 47 for field in self.__dataclass_fields__: 48 if getattr(self, field) is _no_default: 49 raise TypeError( 50 f"__init__ missing 1 required argument: '{field}'" 51 )
Dataclass for the Lipid Metadata
Parameters
- name (str): The name of the lipid, using the LIPID MAPS nomenclature
- casno (str): The CAS number of the lipid
- formula (str): The molecular formula of the lipid
- pubchem_id (str): The PubChem ID of the lipid
- structure_level (str): The structure level of the lipid, following the LIPID MAPS classification
- lipid_summed_name (str): The summed name of the lipid, aka lipid species, following the LIPID MAPS classification
- lipid_subclass (str): The subclass of the lipid, following the LIPID MAPS classification
- lipid_class (str): The class of the lipid, following the LIPID MAPS classification
- lipid_category (str): The category of the lipid, following the LIPID MAPS classification
LipidMetadata( id: int, cas: str, inchikey: str, inchi: str, chebi: str, smiles: str, kegg: str, data_id: int, iupac_name: str, traditional_name: str, common_name: str, name: Optional[str] = None, formula: Optional[str] = None, pubchem_id: str = <object object>, refmet_id: Optional[str] = None, casno: str = <object object>, structure_level: str = <object object>, lipid_summed_name: str = <object object>, lipid_subclass: str = <object object>, lipid_class: str = <object object>, lipid_category: str = <object object>)