Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
ng6
Commits
ffaa9b76
Commit
ffaa9b76
authored
Apr 10, 2019
by
Maxime Manno
🍜
Browse files
Update ONT Runstats visualisation
parent
14d919ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/nG6/pi1/analyzes/Run_stats.tpl
View file @
ffaa9b76
...
...
@@ -18,32 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
extends
file
=
'AnalysisTemplate.tpl'
}
{
block
name
=
params
}
{
assign
var
=
"params"
value
=
" "
|
explode
:
$analyse.params
}
{
foreach
from
=
$analyse_results
key
=
sample
item
=
sample_results
}
{
assign
var
=
"sample"
value
=
$sample
}
{/
foreach
}
<ul>
{
if
in_array
(
"minSubReadLength"
,
$params
)
}
{
assign
var
=
"minSubReadLength"
value
=
$params
|@
array_keys
:
"minSubReadLength"
}
<li
class=
"parameter"
>
Subreads shorter than
{
$params
[
$minSubReadLength
[
0
]+
1
]
}
(in base pairs) are filtered out and excluded from analysis.
</li>
{/
if
}
{
if
in_array
(
"readScore"
,
$params
)
}
{
assign
var
=
"polymerase_read_qual"
value
=
$params
|@
array_keys
:
"readScore"
}
<li
class=
"parameter"
>
Polymerase reads with lower quality than
{
$params
[
$polymerase_read_qual
[
0
]+
1
]
}
are filtered out and excluded from analysis.
</li>
{/
if
}
{
if
in_array
(
"minLength"
,
$params
)
}
{
assign
var
=
"polymerase_read_length"
value
=
$params
|@
array_keys
:
"minLength"
}
<li
class=
"parameter"
>
Polymerase reads shorter than
{
$params
[
$polymerase_read_length
[
0
]+
1
]
}
(in base pairs) are filtered out and excluded from analysis.
</li>
{/
if
}
{
if
in_array
(
"barcode_file"
,
$params
)
}
{
assign
var
=
"barcode_file"
value
=
$params
|@
array_keys
:
"barcode_file"
}
<li
class=
"parameter"
>
Input barcode file :
{
$params
[
$barcode_file
[
0
]+
1
]
}
.
</li>
{/
if
}
{
if
in_array
(
"barcode_score"
,
$params
)
}
{
assign
var
=
"barcode_score"
value
=
$params
|@
array_keys
:
"barcode_score"
}
<li
class=
"parameter"
>
Min identical base for barcode :
{
$params
[
$barcode_score
[
0
]+
1
]
}
.
</li>
{/
if
}
</ul>
{/
block
}
...
...
@@ -58,6 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
if
}
{
assign
var
=
"template_status"
value
=
$analyse_results
[
"metrics"
].
analyse_info
.
template_status
}
{
assign
var
=
"metrics"
value
=
$analyse_results
[
"metrics"
]
}
{* If it is the version 2.0 of the Runstats analysis *}
{
if
$template_status
==
"2.0"
}
{
assign
var
=
"sample_name"
value
=
$analyse_results
[
"metrics"
].
analyse_info
.
Sample_name
}
{
assign
var
=
"rawdata"
value
=
$analyse_results
[
$sample_name
].
rawdata
}
...
...
@@ -94,9 +70,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
assign
var
=
'barcode_name_sample'
value
=
','
|
explode
:
$metrics
[
'barcode'
].
names
|@
ksort
}
{
assign
var
=
'barcode_name_count'
value
=
$barcode_name_sample
|@
count
}
<legend>
Analyse results report - Sample name :
{
$sample_name
}
</legend>
<legend>
Analyse results report - Sample name :
{
$sample_name
}
</legend>
{
if
$template_status
!=
"2.0"
}
{
if
$template_status
!=
"2.0"
}
{
assign
var
=
'data_col'
value
=
2
}
<div
class=
"row"
>
{
if
$metrics
[
'basic'
]
}
...
...
@@ -158,7 +134,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td><label>
{
$head
|
replace
:
'_'
:
' '
|
replace
:
'utils'
:
'useful data'
}
</label></td>
<td><a
class=
"imglink"
href=
"
{
$plots
.
$head
}
"
><i
class=
"glyphicon glyphicon-picture"
></i></a></td>
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
{
if
$barcode_name_count
>
1
}
{
foreach
from
=
$plots_barcode_headers
key
=
k
item
=
head
}
...
...
@@ -166,7 +141,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td><label>
{
$head
|
replace
:
'_'
:
' '
|
replace
:
'utils'
:
'useful data'
}
</label></td>
<td><a
class=
"imglink"
href=
"
{
$plots_barcode
.
$head
}
"
><i
class=
"glyphicon glyphicon-picture"
></i></a></td>
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
{/
if
}
</tbody>
...
...
@@ -174,89 +148,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/
if
}
</div>
{* If it is the version 2.0 of the Runstats analysis *}
{
else
}
{
else
}
{
assign
var
=
'data_col'
value
=
2
}
<div
class=
"row"
>
{
if
$metrics
[
'rawdata'
]
}
<div
class=
"col-md-4 col-lg-4"
>
<table
id=
"ont_table_rawdata"
class=
"table table-striped table-bordered dataTable"
>
<thead><tr><th
colspan=
"2"
><h4>
Rawdata metrics report
</h4></thead></tr></th>
<tbody>
<div
class=
"col-md-6 col-lg-6"
>
{
if
$metrics
[
'rawdata'
]
and
$metrics
[
'Q7'
]
and
$metrics
[
'Q7'
]
}
<table
id=
"ont_table_rawdata"
class=
"table table-striped table-bordered dataTable"
style=
"white-space:nowrap;"
>
<thead>
<tr><th
colspan=
"4"
><h4><center>
ONT Metrics report
</center
</h4
></th></tr>
<tr>
<th
colspan=
"1"
><h4>
Metrics
</h4></th>
<th
colspan=
"1"
><h4>
Rawdata
</h4></th>
<th
colspan=
"1"
><h4>
Q7
</h4></th>
<th
colspan=
"1"
><h4>
Q9
</h4></th>
</tr>
</thead>
<tbody>
{
foreach
from
=
$rawdata_headers
key
=
k
item
=
head
}
{
assign
var
=
"headQ7"
value
=
$head
|
cat
:
"_Q7"
}
{
assign
var
=
"headQ9"
value
=
$head
|
cat
:
"_Q9"
}
<tr>
{
if
(
$head
==
'mean_read_quality'
)
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($rawdata.$head)|number_format:2:',':' '}
</td>
{
else
}
<td>
{($Q7.$headQ7)|number_format:2:',':' '}
</td>
<td>
{($Q9.$headQ9)|number_format:2:',':' '}
</td>
{
elseif
(
$head
==
'nb_reads'
)
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($rawdata.$head)|number_format:0:',':' '}
</td>
{/
if
}
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
</body>
</table>
</div>
{/
if
}
{
if
$metrics
[
'Q7'
]
and
$metrics
[
'Q7'
]
}
<div
class=
"col-md-4 col-lg-4"
>
<table
id=
"ont_table_filtered"
class=
"table table-striped table-bordered dataTable"
>
<thead><tr><th
colspan=
"2"
><h4>
Filtered Q7 metrics report
</h4></thead></tr></th>
<tbody>
{
foreach
from
=
$Q7_headers
key
=
k
item
=
head
}
<tr>
{
if
(
$head
==
'mean_read_quality_Q7'
)
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q7.$head)|number_format:2:',':' '}
</td>
{
elseif
(
$head
==
'N50_read_length_Q7'
)
}
<td><label>
N50 read length Q7
</label></td>
<td>
{($Q7.$head)|number_format:0:',':' '}
{
elseif
$head
|
strstr
:
"nb_reads_Q7"
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q7.$head)|number_format:0:',':' '} ({($Q7.$head / $rawdata.nb_reads*100)|number_format:2:',':' '}%)
</td>
{
elseif
$head
|
strstr
:
"total_bases_Q7"
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q7.$head)|number_format:0:',':' '} ({($Q7.$head / $rawdata.total_bases*100)|number_format:2:',':' '}%)
</td>
{
else
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q7.$head)|number_format:0:',':' '}
{/
if
}
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
</tbody>
<thead><tr><th
colspan=
"2"
><h4>
Filtered Q9 metrics report
</h4></thead></tr></th>
<tbody>
{
foreach
from
=
$Q9_headers
key
=
k
item
=
head
}
<tr>
{
if
(
$head
==
'mean_read_quality_Q9'
)
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q9.$head)|number_format:2:',':' '}
</td>
{
elseif
(
$head
==
'N50_read_length_Q9'
)
}
<td><label>
N50 read length Q9
</label></td>
<td>
{($Q9.$head)|number_format:0:',':' '}
{
elseif
$head
|
strstr
:
"nb_reads_Q9"
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q9.$head)|number_format:0:',':' '} ({($Q9.$head / $rawdata.nb_reads*100)|number_format:2:',':' '}%)
</td>
{
elseif
$head
|
strstr
:
"total_bases_Q9"
}
<td>
{($Q7.$headQ7)|number_format:0:',':' '} ({($Q7.$headQ7 / $rawdata.nb_reads*100)|number_format:2:',':' '}%)
</td>
<td>
{($Q9.$headQ9)|number_format:0:',':' '} ({($Q9.$headQ9 / $rawdata.nb_reads*100)|number_format:2:',':' '}%)
</td>
{
elseif
(
$head
==
'total_bases'
)
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q9.$head)|number_format:0:',':' '} ({($Q9.$head / $rawdata.total_bases*100)|number_format:2:',':' '}%)
</td>
<td>
{($rawdata.$head)|number_format:0:',':' '}
</td>
<td>
{($Q7.$headQ7)|number_format:0:',':' '} ({($Q7.$headQ7 / $rawdata.total_bases*100)|number_format:2:',':' '}%)
</td>
<td>
{($Q9.$headQ9)|number_format:0:',':' '} ({($Q9.$headQ9 / $rawdata.total_bases*100)|number_format:2:',':' '}%)
</td>
{
else
}
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td>
{($Q9.$head)|number_format:0:',':' '}
<td>
{($rawdata.$head)|number_format:0:',':' '}
</td>
<td>
{($Q7.$headQ7)|number_format:0:',':' '}
</td>
<td>
{($Q7.$headQ7)|number_format:0:',':' '}
</td>
{/
if
}
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
</tbody>
</table>
</div>
</table>
{/
if
}
</div>
<div
class=
"col-md-3 col-lg-3"
>
{
if
$metrics
[
'plots'
]
}
<div
class=
"col-md-3 col-lg-3"
>
<table
id=
"ont_table_plot"
class=
"table table-striped table-bordered dataTable"
>
<thead><tr><th
colspan=
"2"
><h4>
Plots report
</h4></h4></thead></tr></th>
<table
id=
"ont_table_plot"
class=
"table table-striped table-bordered dataTable"
>
<thead><tr><th
colspan=
"2"
><h4><center>
Plots report
</center></h4></h4></thead></tr></th>
<tbody>
{
foreach
from
=
$plots_headers
key
=
k
item
=
head
}
<tr>
...
...
@@ -286,7 +230,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
if
}
{/
if
}
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
{
if
$barcode_name_count
>
1
}
{
foreach
from
=
$plots_barcode_headers
key
=
k
item
=
head
}
...
...
@@ -294,16 +237,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td><label>
{
$head
|
replace
:
'_'
:
' '
}
</label></td>
<td><a
class=
"imglink"
href=
"
{
$plots_barcode
.
$head
}
"
><i
class=
"glyphicon glyphicon-picture"
></i></a></td>
</tr>
{
$data_col
=
$data_col
+
1
}
{/
foreach
}
{/
if
}
</tbody>
</table>
</div>
</table>
{/
if
}
</div>
{/
if
}
</div>
{/
if
}
<br><br>
{*If there are barcodes file in the run*}
...
...
@@ -411,47 +352,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
foreach
}
</tbody>
{*
<tfoot>
<tr>
<th>Total : </th>
<th> </th>
{foreach from=$barcode_headers key=k item=head}
{if $head == 'Reads'}
<th>{$totalReads|number_format:0:',':' '}</th>
{elseif $head == 'Bases'}
<th>{$totalBases|number_format:0:',':' '}</th>
{/if}
{/foreach}
</tr>
<tr>
<th>Mean : </th>
<th> </th>
{foreach from=$barcode_headers key=k item=head}
{if $head == 'Reads'}
<th>{($totalReads/$nb_samples)|number_format:0:' ':' '}</th>
{elseif $head == 'Bases'}
<th>{($totalBases/$nb_samples)|number_format:0:' ':' '}</th>
{/if}
{/foreach}
</tr>
<tr>
<th>All metrics : <input type="checkbox" id="check_all_metrics"></th>
<th> </th>
{$th_id = 2}
{foreach from=$barcode_headers key=k item=head}
<th><center><input type="checkbox" id="chk_col_{$th_id}"></center></th>
{$th_id = $th_id +1}
{/foreach}
</tr>
<tr>
<th align="left" colspan="{$th_id}">
With selection :
<button type="button" class="btn btn-default multiple-selection-btn" id="create_graph"><i class="glyphicon glyphicon-signal"></i> Compare</button>
</th>
</tr>
</tfoot>
*}
</table>
<br><br>
{/
if
}
...
...
@@ -495,6 +395,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Filtered data composed by reads with length > 3000 and quality > 7.
</li>
{/
if
}
{
if
$template_status
==
"2.0"
}
<li><strong>
Q7
</strong>
:
Filtered data composed by reads with quality > 7.
</li>
<li><strong>
Q9
</strong>
:
Filtered data composed by reads with quality > 9.
</li>
{/
if
}
</ul>
</span>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment