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 10 11@dataclass 12class LipidMetadata(MetaboliteMetadata): 13 """Dataclass for the Lipid Metadata 14 15 Parameters 16 ---------- 17 name : str 18 The name of the lipid, using the LIPID MAPS nomenclature 19 casno : str 20 The CAS number of the lipid 21 formula : str 22 The molecular formula of the lipid 23 pubchem_id : str 24 The PubChem ID of the lipid 25 structure_level : str 26 The structure level of the lipid, following the LIPID MAPS classification 27 lipid_summed_name : str 28 The summed name of the lipid, aka lipid species, 29 following the LIPID MAPS classification 30 lipid_subclass : str 31 The subclass of the lipid, following the LIPID MAPS classification 32 lipid_class : str 33 The class of the lipid, following the LIPID MAPS classification 34 lipid_category : str 35 The category of the lipid, following the LIPID MAPS classification 36 """ 37 38 casno: str = _no_default 39 pubchem_id: str = _no_default 40 structure_level: str = _no_default 41 42 lipid_summed_name: str = _no_default 43 lipid_subclass: str = _no_default 44 lipid_class: str = _no_default 45 lipid_category: str = _no_default 46 47 def __post_init__(self): 48 for field in self.__dataclass_fields__: 49 if getattr(self, field) is _no_default: 50 raise TypeError(f"__init__ missing 1 required argument: '{field}'")
12@dataclass 13class LipidMetadata(MetaboliteMetadata): 14 """Dataclass for the Lipid Metadata 15 16 Parameters 17 ---------- 18 name : str 19 The name of the lipid, using the LIPID MAPS nomenclature 20 casno : str 21 The CAS number of the lipid 22 formula : str 23 The molecular formula of the lipid 24 pubchem_id : str 25 The PubChem ID of the lipid 26 structure_level : str 27 The structure level of the lipid, following the LIPID MAPS classification 28 lipid_summed_name : str 29 The summed name of the lipid, aka lipid species, 30 following the LIPID MAPS classification 31 lipid_subclass : str 32 The subclass of the lipid, following the LIPID MAPS classification 33 lipid_class : str 34 The class of the lipid, following the LIPID MAPS classification 35 lipid_category : str 36 The category of the lipid, following the LIPID MAPS classification 37 """ 38 39 casno: str = _no_default 40 pubchem_id: str = _no_default 41 structure_level: str = _no_default 42 43 lipid_summed_name: str = _no_default 44 lipid_subclass: str = _no_default 45 lipid_class: str = _no_default 46 lipid_category: str = _no_default 47 48 def __post_init__(self): 49 for field in self.__dataclass_fields__: 50 if getattr(self, field) is _no_default: 51 raise TypeError(f"__init__ missing 1 required argument: '{field}'")
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>)