Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report view #18

Merged
merged 6 commits into from Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,26 +1,3 @@
{% extends 'layout/layout.html' %}



{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-content">
<div class="tab-pane active" id='NCV_XY'>
<div class="panel panel-default">
<div class="panel-body">
<div id="FFY" style="min-width:400px; height:800px; ">
</div>
<div id="FFX" style="min-width:400px; height:800px; ">
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
<script>
var XY_plot = document.getElementById('FFY')
Expand Down
@@ -1,23 +1,3 @@
{% extends 'layout/layout.html' %}



{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-content">
<div class="tab-pane active" id='NCV_XY'>
<div class="panel panel-default">
<div class="panel-body">
<div id="FFXY" style="min-width:400px; height:800px; ">
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
var XY_plot = document.getElementById('FFXY')
Expand Down Expand Up @@ -89,7 +69,4 @@

Plotly.newPlot('FFXY', data, layout);
</script>
{% endblock %}



{% endblock %}
@@ -1,20 +1,6 @@
{% extends 'layout/layout.html' %}
{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-pane active" id='NCV_{{chrom}}'>
<div class="panel panel-default">
<div class="panel-body">
<div id="NCV_plot" style="min-width:400px; height:800px; "></div><br><br>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
<script>
{% for chrom, cases in ncv_chrom_data.items() %}
$(function chrom_plot() {
var data = []
var layout = {
Expand Down Expand Up @@ -73,8 +59,9 @@
{% endfor %}


Plotly.newPlot('NCV_plot', data, layout);
Plotly.newPlot('NCV{{chrom}}_plot', data, layout);
});
{% endfor %}
</script>


Expand Down
@@ -1,19 +1,3 @@
{% extends 'layout/layout.html' %}

{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-pane active" id='norm_cov'>
<div class="panel panel-default">
<div class="panel-body">
<div id="cov_plot" style="min-width:400px; height:800px; "></div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
<script>
var XY_plot = document.getElementById('cov_plot')
Expand Down
85 changes: 83 additions & 2 deletions NIPTool/server/templates/batch/report.html
@@ -1,7 +1,88 @@
{% extends 'layout/layout.html' %}



{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
<div class="tab-pane active" id='NCV_{{chrom}}'>
<div class="panel panel-default">
<div class="panel-body">
<h2 class="page-header"><strong>NIPT Results </strong><br><small>Batch:
{{batch._id}}</small><small>
<p align="right" id="demo"></p>
</small></h2>
<footer>
<table id="batch_table" class="table table-bordered">
<thead>
<tr>
<th>Sample Name</th>
<th>NCV13</th>
<th>NCV18</th>
<th>NCV21</th>
<th>NCVX</th>
<th>FF(%)</th>
<th>FFX(%)</th>
<th>FFY(%)</th>
<th>CNVSegment</th>
<th>Warning</th>
<th>Status</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
{% for sample in sample_info %}
<input type=text name="samples" value="{{ sample.sample_id }}" hidden>
<tr>
<td width="20%">{{ sample.sample_id }}</td>
<td width="4%" class="{{ sample.Zscore_13.warn}}">{{ sample.Zscore_13.value }}</td>
<td width="4%" class="{{ sample.Zscore_18.warn}}">{{ sample.Zscore_18.value }}</td>
<td width="4%" class="{{ sample.Zscore_21.warn}}">{{ sample.Zscore_21.value }}</td>
<td width="4%" class="{{ sample.Zscore_X.warn}}">{{ sample.Zscore_X.value }}</td>
<td width="4%" class="{{sample.FF.warn}}">{{sample.FF.value}}</td>
<td width="4%" class="{{sample.FFX.warn}}">{{sample.FFX.value}}</td>
<td width="4%" class="{{sample.FFY.warn}}">{{sample.FFY.value}}</td>
<td width="4%" class="{{sample.CNVSegment.warn}}">{{sample.CNVSegment.value}}</td>
<th>
<p> <small></small></p>
</th>
<th>
<p> <small>{{ sample.Status }}</small></p>
</th>
<td width="18%">{{sample.Comment}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</footer>
<footer>
<div id="cov_plot" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="NCV13_plot" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="NCV18_plot" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="NCV21_plot" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="FFXY" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="FFY" style="min-width:400px; height:800px; "></div>
</footer>
<footer>
<div id="FFX" style="min-width:400px; height:800px; "></div>
</footer>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{% include 'batch/plots/NCV.html' %}
{% include 'batch/plots/FF_XY.html' %}
{% include 'batch/plots/FF.html' %}
{% include 'batch/plots/coverage.html' %}

{% endblock %}
25 changes: 25 additions & 0 deletions NIPTool/server/templates/batch/tabs/FF.html
@@ -0,0 +1,25 @@
{% extends 'layout/layout.html' %}



{% block body %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-content">
<div class="tab-pane active" id='NCV_XY'>
<div class="panel panel-default">
<div class="panel-body">
<div id="FFY" style="min-width:400px; height:800px; ">
</div>
<div id="FFX" style="min-width:400px; height:800px; ">
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
{% include 'batch/plots/FF.html' %}
{% endblock %}
22 changes: 22 additions & 0 deletions NIPTool/server/templates/batch/tabs/FF_XY.html
@@ -0,0 +1,22 @@
{% extends 'layout/layout.html' %}
{% block body %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-content">
<div class="tab-pane active" id='NCV_XY'>
<div class="panel panel-default">
<div class="panel-body">
<div id="FFXY" style="min-width:400px; height:800px; ">
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{% include 'batch/plots/FF_XY.html' %}
{% endblock %}



17 changes: 17 additions & 0 deletions NIPTool/server/templates/batch/tabs/NCV.html
@@ -0,0 +1,17 @@
{% extends 'layout/layout.html' %}
{% block body %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-pane active" id='NCV_{{chr}}'>
<div class="panel panel-default">
<div class="panel-body">
<div id="NCV{{chr}}_plot" style="min-width:400px; height:800px; "></div><br><br>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
{% include 'batch/plots/NCV.html' %}
{% endblock %}
18 changes: 18 additions & 0 deletions NIPTool/server/templates/batch/tabs/coverage.html
@@ -0,0 +1,18 @@
{% extends 'layout/layout.html' %}

{% block body %}
<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-pane active" id='norm_cov'>
<div class="panel panel-default">
<div class="panel-body">
<div id="cov_plot" style="min-width:400px; height:800px; "></div>
</div>
</div>
</div>
</div>
{% endblock %}

{% block scripts %}
{% include 'batch/plots/coverage.html' %}
{% endblock %}
Expand Up @@ -3,7 +3,7 @@


{% block body %}
{% include 'layout/navigation.html' %}

<div class="container-fluid">
{% include 'batch/header.html' %}
<div class="tab-content">
Expand All @@ -28,7 +28,6 @@
</tr>
</tbody>
</table>
<div class="table-responsive">

<table id="batch_table" class="table table-bordered table-hover table-wrapper-scroll-y" >
<thead>
Expand Down
1 change: 0 additions & 1 deletion NIPTool/server/templates/batches.html
@@ -1,6 +1,5 @@
{% extends 'layout/layout.html' %}
{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
<div class="jumbotron vertical-center">
<div class="row">
Expand Down
4 changes: 3 additions & 1 deletion NIPTool/server/templates/layout/layout.html
Expand Up @@ -50,7 +50,9 @@

<body>
<div id="wrapper">
{% block body %}{% endblock %}
{% include 'layout/navigation.html' %}
{% block body %}
{% endblock %}
</div> <!--wrapper-->


Expand Down
1 change: 0 additions & 1 deletion NIPTool/server/templates/sample/sample.html
@@ -1,6 +1,5 @@
{% extends 'layout/layout.html' %}
{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'sample/header.html' %}
<ul class="nav nav-tabs" id="myTab">
Expand Down
1 change: 0 additions & 1 deletion NIPTool/server/templates/sample/sample_tris.html
@@ -1,7 +1,6 @@
{% extends 'layout/layout.html' %}

{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
{% include 'sample/header.html' %}
<ul class="nav nav-tabs" id="myTab">
Expand Down
1 change: 0 additions & 1 deletion NIPTool/server/templates/statistics.html
@@ -1,6 +1,5 @@
{% extends 'layout/layout.html' %}
{% block body %}
{% include 'layout/navigation.html' %}
<div class="container-fluid">
<div class="jumbotron vertical-center">
<div class="row">
Expand Down
2 changes: 2 additions & 0 deletions NIPTool/server/utils.py
Expand Up @@ -350,6 +350,8 @@ def get_last_batches(adapter, nr: int) -> list:
return(sorted_batches)


# Statistics

def get_statistics_for_scatter_plot(batches: list, fields: list)-> dict:
"""Formating data for scatter plot"""

Expand Down