<|start_filename|>vaxrank/templates/stylesheet.css<|end_filename|>
/* this is to fix HTML->PDF rendering on Debian: wkhtmltopdf screws up the 
line heights otherwise */
table, table.th, table.td {
    line-height: 1.1em;
}

#main {
	padding: 4em;
}

/* Various headers */
#report-header {
	padding-bottom: 1em;
	margin-top: -2em;
}

#patient-info {
	padding-bottom: 1em;
}

#variants {
	padding-top: 1em;
	padding-bottom: 1em;
}

#effects {
	margin-bottom: 1.5em;
}

#peptides {
	margin-bottom: 1.5em;
}

#args {
	padding-top: 2em;
	padding-bottom: 1em;
}

/* Patient info */
table.patient-info {
	width: 90%;
}

col.patient-info-column-one {
	width: 40%;
}

/* Command-line args */
table.args {
	width: 90%;
}

col.args-column-one {
	width: 40%;
}

/* Variants */
ol.main {
	padding-left: 1.2em;
	margin-left: 0.1em;
	font-size: 2em;
	color: #b3b3b3;
}

li.variant-list-item {
	border-left: 0.3em solid;
	padding: 0 2em 0 2em;
	margin-bottom: 2em;
	page-break-before: always;
	page-break-after: always;
}

li.variant-list-item:nth-child(odd) {
	border-left: 0.3em dotted;
	padding: 0 2em 0 2em;
	margin-bottom: 2em;
	page-break-before: always;
	page-break-after: always;
}

div.variant-span {
	font-size: 16px;
	color: black;
}

table.variant {
	margin-top: -2em;
	width: 90%;
}

col.variant-column-one {
	width: 40%;
}

col.variant-column-two {
	width: 60%;
}

thead.variant-head {
	font-size: 135%;
	margin-left: -2px;
}

td.variant-head {
	padding-left: 0.7em;
}

/* Peptides */
h4.peptides {
	page-break-before: always;
}

div.wt-epitopes {
	page-break-after: always;
	page-break-inside: avoid;
	margin: 2em 0 2em 2em;
}

table.wt-epitopes {
	font-size: 80%;
}

ol.peptides {
	padding-left: 0;
	list-style-position: inside;
}

li.peptide {
	page-break-inside: avoid;
	page-break-before: always;
}

table.peptide {
	margin: -1em 0 2em 2em;
	width: 80%;
}

span.mutant {
	background-color: yellow;
	border: 1px;
	border-style: solid;
	border-color: red;
	padding: 2px;
	margin-left: 2px;
	margin-right: 2px;
}

table.peptide-inner {
	width: 100%;
	border: none;
}

td.peptide-inner {
	padding: 0;
}

td.peptide-inner-header {
	font-weight: bold;
	text-align: center;
	font-size: 125%;
	padding: 0.75em;
}

col.peptide-data-column-one {
	width: 70%;
}

col.peptide-data-column-two {
	width: 30%;
}

col.epitope-data-column-one {
	width: 16%;
}

col.epitope-data-column-two {
	width: 16%;
}

col.epitope-data-column-three {
	width: 16%;
}

col.epitope-data-column-four {
	width: 16%;
}

col.epitope-data-column-five {
	width: 16%;
}

col.epitope-data-column-six {
	width: 16%;
}

table.epitope-inner {
	font-size: 80%;
	width: 100%;
	border: none;
}

/* Signatures */
table.signature {
	width: 70%;
}

table.signature-inner {
	width: 100%;
	border: none;
}

td.signature-inner {
	padding: 0;
}

col.signature-column-one {
	width: 30%;
}

col.signature-column-two {
	width: 70%;
}


<|start_filename|>vaxrank/templates/template.html<|end_filename|>
<!DOCTYPE html>
<html>
    <head>
        <title>Vaxrank Report</title>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
        <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/base-min.css">
        <style type="text/css">
            {% include "templates/stylesheet.css" %}
        </style>
    </head>
    <body>
        <div id="main">
        	<h1 id="report-header">Vaccine Peptides Report</h1>

        	<h3 id="patient-info">PATIENT INFO</h3>
            <table class="pure-table pure-table-bordered patient-info">
                <colgroup>
                    <col class="patient-info-column-one">
                    <col class="patient-info-column-two">
                </colgroup>
                {% for key, val in patient_info.items() %}
                <tr><td>{{ key }}</td><td>{{ val }}</td></tr>
                {% endfor %}
            </table>
        	<br>

            <h3 id="args">COMMAND LINE ARGUMENTS</h3>
            <table class="pure-table pure-table-bordered args">
                <colgroup>
                    <col class="args-column-one">
                    <col class="args-column-two">
                </colgroup>
                {% for key, val in args %}
                <tr><td class="arg">{{ key }}</td><td class="arg">{{ val }}</td></tr>
                {% endfor %}
            </table>
            {% if input_json_file %}
            <br><br><h4>Report generated from saved location: {{ input_json_file }}</h4>
            {% endif %}
        	<ol class="main">

            {% if variants %}
        	{% for v in variants %}
        	<li class="variant-list-item">
                <div class="variant-span">
            		<table class="pure-table pure-table-bordered variant">
            			<colgroup>
                        	<col class="variant-column-one">
                            <col class="variant-column-two">
                        </colgroup>
                        <thead class="variant-head">
                            <tr>
                                <td class="variant-head">Variant</td>
                                <td class="variant-head">{{ v.short_description }}</td>
                            </tr>
                        </thead>
                        {% for key, val in v.variant_data.items() %}
                        <tr><td>{{ key }}</td><td>{{ val }}</td></tr>
                        {% endfor %}
                    </table>
                    <br>

                    <h4 id="effects">Predicted Effect</h4>
                    <table class="pure-table pure-table-bordered">
                        {% for key, val in v.effect_data.items() %}
                        <tr><td>{{ key }}</td><td>{{ val }}</td></tr>
                        {% endfor %}
                	</table>
                	<br>

                    {% if v.databases %}
                    <h4 id="effects">Databases</h4>
                    <table class="pure-table pure-table-bordered">
                        {% for key, val in v.databases.items() %}
                        <tr><td>{{ key }}</td><td><a href="{{ val }}">{{ val }}</a></td></tr>
                        {% endfor %}
                    </table>
                    <br>
                    {% endif %}

            		<ol class="peptides" type="i">
            			{% for p in v.peptides %}
            			<li class="peptide">
            				<table class="pure-table pure-table-bordered peptide">
                                <thead>
                                    <tr><td class="peptide-inner-header">{{ p.header_display_data.aa_before_mutation }}<span class="mutant">{{ p.header_display_data.aa_mutant }}</span>{{ p.header_display_data.aa_after_mutation }}</td></tr>
                                </thead>
                                <tr><td class="peptide-inner">
                                    <table class="pure-table pure-table-bordered peptide-inner">
                                        <colgroup>
                                            <col class="peptide-data-column-one">
                                            <col class="peptide-data-column-two">
                                        </colgroup>
                                        {% for key, val in p.peptide_data.items() %}
                                        <tr><td>{{ key }}</td><td>{{ val }}</td></tr>
                                        {% endfor %}
                                    </table>
                                </td></tr>
                                {% if include_manufacturability %}
                                <tr><td class="peptide-inner-header">Manufacturability</td></tr>
                                <tr><td class="peptide-inner">
                                    <table class="pure-table pure-table-bordered peptide-inner">
                                        <colgroup>
                                            <col class="peptide-data-column-one">
                                            <col class="peptide-data-column-two">
                                        </colgroup>
                                        {% for key, val in p.manufacturability_data.items() %}
                                        <tr><td>{{ key }}</td><td>{{ val }}</td></tr>
                                        {% endfor %}
                                    </table>
                                </td></tr>
                                {% endif %}

                                <tr><td class="peptide-inner-header">Predicted mutant epitopes</td></tr>
                                <tr><td class="peptide-inner">
                                    <table class="pure-table epitope-inner">
                                    <colgroup>
                                        <col class="epitope-data-column-one">
                                        <col class="epitope-data-column-two">
                                        <col class="epitope-data-column-three">
                                        <col class="epitope-data-column-four">
                                        <col class="epitope-data-column-five">
                                        <col class="epitope-data-column-six">
                                    </colgroup>
                                        <thead>
                                            <tr>
                                                {% for key in p.epitopes[0] %}
                                                <td>{{ key }}</td>
                                                {% endfor %}
                                            </tr>
                                        </thead>
                                        {% for e in p.epitopes %}
                                        <tr>
                                            {% for _, val in e.items() %}
                                            <td>{{ val }}</td>
                                            {% endfor %}
                                        </tr>
                                        {% endfor %}
                                    </table>
                                </td></tr>
                            </table>
                            {% if include_wt_epitopes %}
                            <div class="wt-epitopes">
                            {% if p.wt_epitopes %}
                            <h4 class="wt-epitopes">Predicted strong binders that do not overlap the mutation</h4>
                            <table class="pure-table pure-table-bordered wt-epitopes">
                                <thead>
                                    <tr>
                                        <td>Sequence</td>
                                        <td>IC50</td>
                                        <td>Allele</td>
                                    </tr>
                                </thead>
                                {% for e in p.wt_epitopes %}
                                <tr>
                                    <td>{{ e["Sequence"] }}</td>
                                    <td>{{ e["IC50"] }}</td>
                                    <td>{{ e["Allele"] }}</td>
                                </tr>
                                {% endfor %}
                            </table>
                            {% else %}
                            <h4 class="wt-epitopes">No predicted strong binders that do not overlap the mutation.</h4>
                            {% endif %}
                            </div>
                            {% endif %}
            			</li>
            			{% endfor %}
            		</ol>
                </div>
        	</li>
        	{% endfor %}
            </ol>

            {% if reviewers %}
            <table class="pure-table pure-table-bordered reviewed-by">
                <thead>
                    <tr><td>Reviewed By</td></tr>
                </thead>
                {% for r in reviewers %}
                <tr><td>{{ r }}</td></tr>
                {% endfor %}
            </table>
            <br><br>
            {% endif %}

            <table class="pure-table pure-table-bordered signature">
                <thead>
                    <tr><td>Final Review</td></tr>
                </thead>
                <tr>
                    <td class="signature-inner">
                        <table class="pure-table signature-inner">
                            <colgroup>
                                <col class="signature-column-one">
                                <col class="signature-column-two">
                            </colgroup>
                            <tr><td>Name</td><td>{{ final_review }}</td></tr>
                            <tr><td>Signature</td><td></td></tr>
                            <tr><td>Date</td><td></td></tr>
                        </table>
                    </td>
                </tr>
            </table>
            {% else %}
            <h4>No variants with sufficient vaccine peptides were found.</h4>
            {% endif %}
        </div>
    </body>
</html>
