Exemple #1
0
def dump_html(output, body):
    title = output.info['title'] + " for " + output.info['tag']

    doc = XHTML()

    doc.head.title(title)
    doc.body.h1(title)
    doc.body.p(body.to_html())

    output.write(str(doc))
Exemple #2
0
def dump_html(output, body, columns=None):
    title = output.info['title'] + " for " + output.info['tag']

    doc = XHTML()

    doc.head.title(title)
    doc.body.h1(title)
    doc.body.p.text(body.to_html(escape=False, columns=columns), escape=False)

    output.write(str(doc))
Exemple #3
0
def file_index(output, input_disease_symbol, input_disease_mondo, rtx_ui_url):
    title = 'Results for ' + input_disease_symbol + '[' + input_disease_mondo + ']'

    doc = XHTML()

    doc.head.title(title)
    doc.body.h1(title)
    ul = doc.body.ul
    ul.li.a("Input Disease Details", href="Definition.json")
    ul.li.a("Disease Associated Genes", href="Disease_Associated_Genes.html")
    ul.li.a("Functionally Similar Genes",
            href="Functionally_Similar_Genes.html")
    ul.li.a("Phenotypically Similar Genes",
            href="Phenotypically_Similar_Genes.html")
    ul.li.a("Gene Interactions", href="Gene_Interactions.html")
    doc.body.p.a("RTX UI Display of Details",
                 href="https://rtx.ncats.io/?r=%s" %
                 rtx_ui_url.json()['response_id'])
    doc.body.p.a("Reasoner API formatted JSON results",
                 href="https://rtx.ncats.io/api/rtx/v1/response/%s" %
                 rtx_ui_url.json()['response_id'])

    output.write(str(doc))