Esempio n. 1
0
    def create_message1(self):
        txt = 'ELK1 transcribes FOS.'
        model = stmts_kstring_from_text(txt)
        entity = ekb_kstring_from_text('FOS')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'eventual_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'high')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)

        condition_entity = ekb_kstring_from_text('MAPK1')
        conditions = KQMLList()
        condition = KQMLList()
        condition.sets('type', 'multiple')
        condition.set('value', '100.0')
        quantity = KQMLList()
        quantity.sets('type', 'total')
        entity = KQMLList()
        entity.set('description', condition_entity)
        quantity.set('entity', entity)
        condition.set('quantity', quantity)
        conditions.append(condition)
        content.set('conditions', conditions)

        msg = get_request(content)
        return (msg, content)
Esempio n. 2
0
 def create_message(self):
     target = ekb_kstring_from_text(self.target)
     drug = ekb_kstring_from_text(self.drug)
     content = KQMLList('IS-DRUG-TARGET')
     content.set('target', target)
     content.set('drug', drug)
     return get_request(content), content
Esempio n. 3
0
    def create_message(self):
        txt = 'MEK not bound to Selumetinib phosphorylates ERK. DUSP dephosphorylates ERK. ' + \
            'Selumetinib binds MEK.'
        model = stmts_kstring_from_text(txt)
        entity = ekb_kstring_from_text('ERK that is phosphorylated')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'always_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'low')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)

        condition_entity = ekb_kstring_from_text('Selumetinib')
        conditions = KQMLList()
        condition = KQMLList()
        condition.sets('type', 'multiple')
        condition.set('value', '100.0')
        quantity = KQMLList()
        quantity.sets('type', 'total')
        entity = KQMLList()
        entity.set('description', condition_entity)
        quantity.set('entity', entity)
        condition.set('quantity', quantity)
        conditions.append(condition)
        content.set('conditions', conditions)
        msg = get_request(content)
        return (msg, content)
Esempio n. 4
0
    def create_message(self):
        model = stmts_kstring_from_text('MAP2K1 binds MAPK1')
        entity = ekb_kstring_from_text('MAPK1-MAP2K1 complex')
        condition_entity = ekb_kstring_from_text('MAP2K1')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'always_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'high')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)

        conditions = KQMLList()
        condition = KQMLList()
        condition.sets('type', 'multiple')
        condition.set('value', '10.0')
        quantity = KQMLList()
        quantity.sets('type', 'total')
        entity = KQMLList()
        entity.set('description', condition_entity)
        quantity.set('entity', entity)
        condition.set('quantity', quantity)
        conditions.append(condition)
        content.set('conditions', conditions)
        msg = get_request(content)
        return (msg, content)
Esempio n. 5
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     gene = ekb_kstring_from_text(self.gene)
     pathway = ekb_kstring_from_text(self.pathway)
     content = KQMLList('IS-PATHWAY-GENE')
     content.set('gene', gene)
     content.set('pathway', pathway)
     return get_request(content), content
Esempio n. 6
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     target = ekb_kstring_from_text(self.target)
     mirna = ekb_kstring_from_text(self.mirna)
     content = KQMLList('IS-MIRNA-TARGET')
     content.set('target', target)
     content.set('miRNA', mirna)
     return get_request(content), content
Esempio n. 7
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     tf = ekb_kstring_from_text(self.tf)
     target = ekb_kstring_from_text(self.target)
     content = KQMLList('IS-TF-TARGET')
     content.set('tf', tf)
     content.set('target', target)
     return get_request(content), content
Esempio n. 8
0
 def create_message2(self):
     condition_entity = ekb_kstring_from_text('Vemurafenib')
     target_entity = ekb_kstring_from_text('Inactive ERK')
     content = KQMLList('MODEL-COMPARE-CONDITIONS')
     content.set('model', self.model)
     content.set('agent', condition_entity)
     content.set('affected', target_entity)
     msg = get_request(content)
     return msg, content
Esempio n. 9
0
 def create_message_failure_3(self):
     source = ekb_kstring_from_text('RAS')
     target = ekb_kstring_from_text('MAPK1')
     content = KQMLList('FIND-CAUSAL-PATH')
     content.set('source', source)
     content.set('target', target)
     content.sets('direction', 'strict')
     msg = get_request(content)
     return msg, content
Esempio n. 10
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     tf = ekb_kstring_from_text(self.tf)
     print('tf=' + str(tf))
     target = ekb_kstring_from_text(self.target)
     print('target=' + str(target))
     tissue = self.tissue
     content = KQMLList('IS-TF-TARGET-TISSUE')
     content.set('tf', tf)
     content.set('target', target)
     content.set('tissue', tissue)
     print('content=' + str(content))
     print('get_request(content)=' + str(get_request(content)))
     return get_request(content), content
Esempio n. 11
0
 def create_message_failure(self):
     time.sleep(2)
     source = ekb_kstring_from_text('ABC')
     content = KQMLList('DATASET-CORRELATED-ENTITY')
     content.set('source', source)
     msg = get_request(content)
     return msg, content
Esempio n. 12
0
 def create_message_failure_2(self):
     target = ekb_kstring_from_text('ABC')
     content = KQMLList('FIND-CAUSALITY-SOURCE')
     content.set('target', target)
     content.sets('type', 'phosphorylates')
     msg = get_request(content)
     return msg, content
Esempio n. 13
0
 def create_message_failure(self):
     source = ekb_kstring_from_text('MAPK1')
     content = KQMLList('FIND-CAUSALITY-TARGET')
     content.set('source', source)
     content.sets('type', 'activation')
     msg = get_request(content)
     return msg, content
Esempio n. 14
0
 def create_message_05_explainable_again(self):
     time.sleep(2)
     source = ekb_kstring_from_text('AKT1')
     content = KQMLList('DATASET-CORRELATED-ENTITY')
     content.set('source', source)
     msg = get_request(content)
     return msg, content
Esempio n. 15
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     gene = ekb_kstring_from_text(self.gene)
     keyword = self.keyword
     content = KQMLList('FIND-COMMON-PATHWAY-GENES-KEYWORD')
     content.set('gene', gene)
     content.set('keyword', keyword)
     return get_request(content), content
Esempio n. 16
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     target = ekb_kstring_from_text(self.target)
     tissue = self.tissue
     content = KQMLList('FIND-TARGET-TF-TISSUE')
     content.set('target', target)
     content.set('tissue', tissue)
     return get_request(content), content
Esempio n. 17
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     gene = ekb_kstring_from_text(self.gene)
     db = self.database
     content = KQMLList('FIND-PATHWAY-DB-GENE')
     content.set('gene', gene)
     content.set('database', db)
     return get_request(content), content
Esempio n. 18
0
 def create_message_PAAD(self):
     content = KQMLList('FIND-MUTATION-SIGNIFICANCE')
     gene = ekb_kstring_from_text('ACTN4')
     disease = ekb_from_text('pancreatic adenocarcinoma')
     content.set('gene', gene)
     content.set('disease', disease)
     msg = get_request(content)
     return msg, content
Esempio n. 19
0
 def create_message_failure_2(self):
     content = KQMLList('FIND-MUTATION-SIGNIFICANCE')
     gene = ekb_kstring_from_text('ABC')
     disease = ekb_from_text('breast cancer')
     content.set('gene', gene)
     content.set('disease', disease)
     msg = get_request(content)
     return msg, content
Esempio n. 20
0
def _get_qca_content(task, source, target):
    """Get the KQMLList content to be sent to the QCA for given task.

    Paramters
    ---------
    source, target : str
        The strings representing the proteins for source and target,
        respectively, for example 'BRAF'.

    Returns
    -------
    content : KQMLList
        The KQML content to be sent to the QCA module as part of the request.
    """
    content = KQMLList(task)
    content.set('source', ekb_kstring_from_text(source))
    content.set('target', ekb_kstring_from_text(target))
    return content
Esempio n. 21
0
    def create_message_OV(self):
        content = KQMLList('FIND-MUTATION-FREQUENCY')
        gene = ekb_kstring_from_text('TP53')
        disease = ekb_from_text('Ovarian serous cystadenocarcinoma')
        content.set('gene', gene)
        content.set('disease', disease)

        msg = get_request(content)
        return msg, content
Esempio n. 22
0
def _get_qca_content(task, source, target):
    """Get the KQMLList content to be sent to the QCA for given task.

    Paramters
    ---------
    source, target : str
        The strings representing the proteins for source and target,
        respectively, for example 'BRAF'.

    Returns
    -------
    content : KQMLList
        The KQML content to be sent to the QCA module as part of the request.
    """
    content = KQMLList(task)
    content.set('source', ekb_kstring_from_text(source))
    content.set('target', ekb_kstring_from_text(target))
    return content
Esempio n. 23
0
def _get_build_model_request(text, format=None):
    content = KQMLList('BUILD-MODEL')
    if format == 'ekb':
        descr = ekb_kstring_from_text(text)
        content.sets('description', descr)
        content.sets('format', 'ekb')
    else:
        descr = stmts_clj_from_text(text)
        content.set('description', descr)
    return get_request(content), content
Esempio n. 24
0
    def create_message(self):
        model = stmts_kstring_from_text('MEK binds ERK')
        entity = ekb_kstring_from_text('the MEK-ERK complex')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'always_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'low')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)
        msg = get_request(content)
        return (msg, content)
Esempio n. 25
0
    def create_message(self):
        model = stmts_kstring_from_text('MEK phosphorylates ERK')
        entity = ekb_kstring_from_text('ERK that is phosphorylated')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'eventual_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'high')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)
        msg = get_request(content)
        return (msg, content)
Esempio n. 26
0
    def create_message(self):
        txt = 'ELK1 transcribes FOS.'
        model = stmts_kstring_from_text(txt)
        entity = ekb_kstring_from_text('FOS')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'eventual_value')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'high')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)
        msg = get_request(content)
        return (msg, content)
Esempio n. 27
0
    def create_message1(self):
        txt = 'MAP2K1 phosphorylates MAPK1.'
        model = stmts_kstring_from_text(txt)
        entity = ekb_kstring_from_text('MAPK1-bound MAP2K1')

        entities = KQMLList([KQMLList([':description', entity])])
        pattern = KQMLList()
        pattern.set('entities', entities)
        pattern.sets('type', 'sustained')
        value = KQMLList()
        value.sets('type', 'qualitative')
        value.sets('value', 'high')
        pattern.set('value', value)

        content = KQMLList('SATISFIES-PATTERN')
        content.set('pattern', pattern)
        content.set('model', model)

        msg = get_request(content)
        return (msg, content)
Esempio n. 28
0
 def create_message(self):
     disease = ekb_kstring_from_text('lung cancer')
     content = KQMLList('FIND-DISEASE-TARGETS')
     content.set('disease', disease)
     return get_request(content), content
Esempio n. 29
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     mirna = ekb_kstring_from_text(self.mirna)
     content = KQMLList('FIND-GENE-COUNT-MIRNA')
     content.set('miRNA', mirna)
     return get_request(content), content
Esempio n. 30
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     target = ekb_kstring_from_text(self.target)
     content = KQMLList('FIND-MIRNA-COUNT-GENE')
     content.set('target', target)
     return get_request(content), content
Esempio n. 31
0
 def create_message(self):
     drug = ekb_kstring_from_text('SB525334')
     content = KQMLList('FIND-DRUG-TARGETS')
     content.set('drug', drug)
     return get_request(content), content
Esempio n. 32
0
 def create_message(self):
     disease = ekb_kstring_from_text('common cold')
     content = KQMLList('FIND-TREATMENT')
     content.set('disease', disease)
     return get_request(content), content
Esempio n. 33
0
 def create_message(self):
     # Here we create a KQML request that the TFTA needs to respond to
     pathway = ekb_kstring_from_text(self.pathway)
     content = KQMLList('FIND-TF-PATHWAY')
     content.set('pathway', pathway)
     return get_request(content), content
Esempio n. 34
0
 def create_message(self):
     target = ekb_kstring_from_text(self.target)
     content = KQMLList('FIND-TARGET-DRUG')
     content.set('target', target)
     return get_request(content), content
Esempio n. 35
0
def _get_expand_model_request(text, model_id):
    content = KQMLList('EXPAND-MODEL')
    descr = ekb_kstring_from_text(text)
    content.set('description', descr)
    content.set('model-id', model_id)
    return get_request(content), content
Esempio n. 36
0
def _get_build_model_request(text):
    content = KQMLList('BUILD-MODEL')
    descr = ekb_kstring_from_text(text)
    content.set('description', descr)
    return get_request(content), content