예제 #1
0
파일: trips_api.py 프로젝트: gberriz/indra
def process_xml(xml_string):
    tp = TripsProcessor(xml_string)
    tp.get_complexes()
    tp.get_phosphorylation()
    tp.get_activating_mods()
    tp.get_activations()
    return tp
예제 #2
0
def process_xml(xml_string):
    """Return a TripsProcessor by processing a TRIPS EKB XML string.

    Parameters
    ----------
    xml_string : str
        A TRIPS extraction knowledge base (EKB) string to be processed.
        http://trips.ihmc.us/parser/api.html

    Returns
    -------
    tp : TripsProcessor
        A TripsProcessor containing the extracted INDRA Statements
        in tp.statements.
    """
    tp = TripsProcessor(xml_string)
    if tp.tree is None:
        return None
    tp.get_complexes()
    tp.get_phosphorylation()
    tp.get_activating_mods()
    tp.get_activations()
    tp.get_activations_causal()
    return tp