- class modifinder.engines.annotation.MAGMaAnnotationEngine.MAGMaAnnotationEngine(breaks=2, max_water_losses=2, ionisation_mode=0, mz_tolerance=0.1, ppm_tolerance=40, **kwargs)[source]
Bases:
AnnotationEngine
- annotate(network: DiGraph, annotate_all: bool = False, **kwargs)[source]
Annotates the network using the MAGMa model
:param : network (Network): the network to be annotated :param : annotate_all (bool): whether to annotate all compounds or only the ones that have not been annotated yet :param : kwargs: additional arguments
- annotate_single(compound: Compound, modify_compound: bool = True, **kwargs) List[Tuple[int, List[str]]] [source]
provides annotation for the peaks in a single compound
:param : compound (Compound): the compound to be annotated :param : modify_compound (bool): whether to modify the passed compound with the annotations :param : kwargs: additional arguments
- Returns:
Mapping[int, List[str]]: a dictionary with the indices of the peaks as keys and the list of annotations as values
- get_fragment_info(Compound: Compound, fragment)[source]
converts a fragment to a SMILES string
- Parameters:
(Compound) (Compound) –
fragment (the fragment representation) –
- Returns:
tuple(atomlist -> List[int], edge_list -> List[Tuple[int, int]], formula -> str, smiles -> str)
- Return type:
a tuple containing the atom list, the edge list, the formula and the SMILES string
- refine_annotations_by_formula(compound: Compound, peak_fragments_map, modify_compound: bool = True)[source]
Refines the annotations of a compound by using the formula from msbuddy
See also
- Parameters:
(Compound) (compound) –
- refine_annotations_by_helper(main_compound: Compound, helper_compound: Compound, edgeDetail: EdgeDetail, modify_compound: bool = True)[source]
Refines the annotations of a compound by using the helper compound