コード例 #1
0
def _linksToDownloads(sample, assembler):
    div_id = "collapseDownload" + sample.name()
    with h.div(class_="accordion-group"):
        with h.div(class_="accordion-heading"):
            h.a("Downloads", href="#"+div_id, class_="accordion-toggle",
                data_toggle="collapse")
        with h.div(class_="accordion-body collapse in", id=div_id):
            with h.div(class_="accordion-inner"):
                with h.div(class_="row-fluid", id="downloadPane"):
                    with h.div(class_="row-fluid"):
                        with h.div(class_="span12"):
                            h.p("Download all your assembly result files.")
                            with h.div(style="padding-top:5px"):
                                with h.p():
                                    index = 0
                                    downloads = sample.downloads(assembler)
                                    for descr, url in downloads.items():
                                        rurl = os.path.relpath(url, DIRNAME)
                                        index += 1
                                        if index % 5 != 1:
                                            h.UNESCAPED(("  |"
                                                         "  "))
                                        h.UNESCAPED("<a target='_blank' "
                                                    "href='%s'>"
                                                    "<i class='icon-download'>"
                                                    "</i>%s</a>" % (rurl, descr))
                                        if index % 5 == 0:
                                            h.br()
コード例 #2
0
def _linksToDownloads(sample, assembler):
    div_id = "collapseDownload" + sample.name()
    with h.div(class_="accordion-group"):
        with h.div(class_="accordion-heading"):
            h.a("Downloads",
                href="#" + div_id,
                class_="accordion-toggle",
                data_toggle="collapse")
        with h.div(class_="accordion-body collapse in", id=div_id):
            with h.div(class_="accordion-inner"):
                with h.div(class_="row-fluid", id="downloadPane"):
                    with h.div(class_="row-fluid"):
                        with h.div(class_="span12"):
                            h.p("Download all your assembly result files.")
                            with h.div(style="padding-top:5px"):
                                with h.p():
                                    index = 0
                                    downloads = sample.downloads(assembler)
                                    for descr, url in downloads.items():
                                        rurl = os.path.relpath(url, DIRNAME)
                                        index += 1
                                        if index % 5 != 1:
                                            h.UNESCAPED(("&nbsp;&nbsp;|"
                                                         "&nbsp;&nbsp;"))
                                        h.UNESCAPED("<a target='_blank' "
                                                    "href='%s'>"
                                                    "<i class='icon-download'>"
                                                    "</i>%s</a>" %
                                                    (rurl, descr))
                                        if index % 5 == 0:
                                            h.br()
コード例 #3
0
def _assemblyStats(sample, assembler):
    def _assemblySettingsTable():
        with h.table(class_="table table-condensed"):
            h.tr(h.th("Parameter"), h.th("Value"))
            for param, value in sample.assemblySettings(assembler).items():
                h.tr(h.td(param), h.td(value))

    def _assemblyMetricsTable(kind):
        with h.table(class_="table table-condensed"):
            with h.tr():
                h.th("Metric")
                with h.th():
                    h.UNESCAPED("Large " + kind + "s (&ge; 500bp)")
                h.th("All " + kind + 's')
            for metric, value in sample.metrics(assembler, kind).items():
                if len(value) == 1:
                    h.tr(h.td(metric), h.td(value[0], colspan='2'))
                else:
                    h.tr(h.td(metric), h.td(value[0]), h.td(value[1]))

    div_id = "collapseStats" + sample.name()
    with h.div(class_="accordion-group"):
        with h.div(class_="accordion-heading"):
            h.a("Assembly Statistics",
                href="#" + div_id,
                class_="accordion-toggle",
                data_toggle="collapse")
        with h.div(id=div_id, class_="accordion-body collapse in"):
            with h.div(class_="accordion-inner"):
                with h.div(class_="row-fluid", id="statPane"):
                    with h.div(class_="row-fluid"):
                        with h.div(class_="span12"):
                            if sample.name() != '.':
                                h.p("Assembly summary statistics for ",
                                    sample.name() + ".")
                            with h.div(style="padding-top:5px"):
                                _assemblySettingsTable()
                            with h.div(style="padding-top:10px"):
                                _assemblyMetricsTable("Contig")
                            if sample.hasScaffolds(assembler):
                                with h.div(style="padding-top:10px"):
                                    _assemblyMetricsTable("Scaffold")
コード例 #4
0
def _assemblyStats(sample, assembler):
    def _assemblySettingsTable():
        with h.table(class_="table table-condensed"):
            h.tr(h.th("Parameter"), h.th("Value"))
            for param, value in sample.assemblySettings(assembler).items():
                h.tr(h.td(param), h.td(value))

    def _assemblyMetricsTable(kind):
        with h.table(class_="table table-condensed"):
            with h.tr():
                h.th("Metric")
                with h.th():
                    h.UNESCAPED("Large " + kind + "s (&ge; 500bp)")
                h.th("All " + kind + 's')
            for metric, value in sample.metrics(assembler, kind).items():
                if len(value) == 1:
                    h.tr(h.td(metric), h.td(value[0], colspan='2'))
                else:
                    h.tr(h.td(metric), h.td(value[0]), h.td(value[1]))

    div_id = "collapseStats" + sample.name()
    with h.div(class_="accordion-group"):
        with h.div(class_="accordion-heading"):
            h.a("Assembly Statistics", href="#"+div_id,
                class_="accordion-toggle", data_toggle="collapse")
        with h.div(id=div_id, class_="accordion-body collapse in"):
            with h.div(class_="accordion-inner"):
                with h.div(class_="row-fluid", id="statPane"):
                    with h.div(class_="row-fluid"):
                        with h.div(class_="span12"):
                            if sample.name() != '.':
                                h.p("Assembly summary statistics for ",
                                    sample.name() + ".")
                            with h.div(style="padding-top:5px"):
                                _assemblySettingsTable()
                            with h.div(style="padding-top:10px"):
                                _assemblyMetricsTable("Contig")
                            if sample.hasScaffolds(assembler):
                                with h.div(style="padding-top:10px"):
                                    _assemblyMetricsTable("Scaffold")