genevalidator 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.travis.yml +2 -0
- data/README.md +78 -30
- data/Rakefile +11 -8
- data/aux/app_template_footer.erb +1 -6
- data/aux/app_template_header.erb +12 -32
- data/aux/files/css/style.css +2 -8
- data/aux/files/js/plots.js +564 -576
- data/aux/files/js/script.js +10 -0
- data/aux/json_footer.erb +8 -0
- data/aux/json_header.erb +19 -0
- data/aux/json_query.erb +14 -0
- data/aux/template_footer.erb +9 -58
- data/aux/template_header.erb +18 -58
- data/aux/template_query.erb +8 -36
- data/bin/genevalidator +45 -32
- data/genevalidator.gemspec +11 -7
- data/lib/genevalidator.rb +75 -455
- data/lib/genevalidator/arg_validation.rb +78 -107
- data/lib/genevalidator/blast.rb +57 -60
- data/lib/genevalidator/clusterization.rb +15 -15
- data/lib/genevalidator/exceptions.rb +32 -5
- data/lib/genevalidator/get_raw_sequences.rb +70 -33
- data/lib/genevalidator/hsp.rb +1 -4
- data/lib/genevalidator/json_to_gv_results.rb +109 -0
- data/lib/genevalidator/output.rb +177 -185
- data/lib/genevalidator/pool.rb +2 -1
- data/lib/genevalidator/sequences.rb +3 -3
- data/lib/genevalidator/tabular_parser.rb +24 -18
- data/lib/genevalidator/validation.rb +279 -0
- data/lib/genevalidator/validation_alignment.rb +31 -47
- data/lib/genevalidator/validation_blast_reading_frame.rb +19 -18
- data/lib/genevalidator/validation_duplication.rb +23 -19
- data/lib/genevalidator/validation_gene_merge.rb +30 -65
- data/lib/genevalidator/validation_length_cluster.rb +14 -53
- data/lib/genevalidator/validation_length_rank.rb +10 -11
- data/lib/genevalidator/validation_open_reading_frame.rb +18 -19
- data/lib/genevalidator/validation_report.rb +2 -5
- data/lib/genevalidator/validation_test.rb +8 -4
- data/lib/genevalidator/version.rb +1 -1
- data/test/test_all_validations.rb +51 -66
- data/test/test_blast.rb +68 -51
- data/test/test_clusterization.rb +1 -1
- data/test/test_clusterization_2d.rb +19 -13
- data/test/test_extended_array_methods.rb +1 -1
- data/test/test_files/all_validations_mrna/mrna.blast_tab6 +1806 -0
- data/test/test_files/all_validations_mrna/mrna.blast_tab7 +1865 -0
- data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml → mrna.blast_xml} +18642 -1
- data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml.index → mrna.blast_xml.index} +300 -0
- data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta → mrna.fa} +0 -0
- data/test/test_files/all_validations_mrna/mrna.raw_seq +3970 -0
- data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml.raw_seq.idx → mrna.raw_seq.idx} +901 -1
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_tab → prot.blast_tab6} +416 -0
- data/test/test_files/all_validations_prot/prot.blast_tab7 +2400 -0
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml → prot.blast_xml} +18299 -6723
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.index → prot.blast_xml.index} +408 -0
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta → prot.fa} +0 -0
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.raw_seq → prot.raw_seq} +2735 -0
- data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.raw_seq.idx → prot.raw_seq.idx} +3032 -1808
- data/test/test_sequences.rb +46 -41
- data/test/test_validation_open_reading_frame.rb +318 -202
- data/test/test_validations.rb +48 -32
- metadata +76 -102
- data/doc/AliasDuplicationError.html +0 -134
- data/doc/AlignmentValidation.html +0 -1687
- data/doc/AlignmentValidationOutput.html +0 -659
- data/doc/Blast.html +0 -1905
- data/doc/BlastRFValidationOutput.html +0 -545
- data/doc/BlastReadingFrameValidation.html +0 -370
- data/doc/BlastUtils.html +0 -875
- data/doc/ClasspathError.html +0 -134
- data/doc/Cluster.html +0 -1316
- data/doc/DuplciationValidationOutput.html +0 -564
- data/doc/DuplicationValidation.html +0 -920
- data/doc/DuplicationValidationOutput.html +0 -564
- data/doc/FileNotFoundException.html +0 -134
- data/doc/GeneMergeValidation.html +0 -935
- data/doc/GeneMergeValidationOutput.html +0 -652
- data/doc/HierarchicalClusterization.html +0 -994
- data/doc/Hsp.html +0 -1485
- data/doc/InconsistentTabularFormat.html +0 -135
- data/doc/LengthClusterValidation.html +0 -982
- data/doc/LengthClusterValidationOutput.html +0 -515
- data/doc/LengthRankValidation.html +0 -496
- data/doc/LengthRankValidationOutput.html +0 -517
- data/doc/NoInternetError.html +0 -135
- data/doc/NoMafftInstallationError.html +0 -134
- data/doc/NoPIdentError.html +0 -134
- data/doc/NoValidationError.html +0 -134
- data/doc/NotEnoughHitsError.html +0 -135
- data/doc/ORFValidationOutput.html +0 -593
- data/doc/OpenReadingFrameValidation.html +0 -1107
- data/doc/OtherError.html +0 -123
- data/doc/Output.html +0 -1540
- data/doc/Pair.html +0 -309
- data/doc/PairCluster.html +0 -767
- data/doc/Plot.html +0 -837
- data/doc/QueryError.html +0 -134
- data/doc/ReportClassError.html +0 -135
- data/doc/Sequence.html +0 -1299
- data/doc/SequenceTypeError.html +0 -135
- data/doc/TabularEntry.html +0 -837
- data/doc/TabularParser.html +0 -1104
- data/doc/Validation.html +0 -2147
- data/doc/ValidationClassError.html +0 -134
- data/doc/ValidationOutput.html +0 -460
- data/doc/ValidationReport.html +0 -940
- data/doc/ValidationTest.html +0 -939
- data/doc/_index.html +0 -449
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.README.html +0 -151
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -151
- data/doc/js/app.js +0 -214
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1505
- data/doc/top-level-namespace.html +0 -112
- data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab +0 -967
- data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.index +0 -967
- data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.raw_seq +0 -4929
- data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.raw_seq.idx +0 -1006
- data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_xml.raw_seq +0 -2075
- data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.index +0 -1864
- data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.raw_seq +0 -42411
- data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.raw_seq.idx +0 -3751
data/aux/files/js/script.js
CHANGED
@@ -58,4 +58,14 @@ $(document).ready(function() {
|
|
58
58
|
}
|
59
59
|
}
|
60
60
|
});
|
61
|
+
});
|
62
|
+
|
63
|
+
$( document ).on( "click", "td, .plot_btn", function( event ) {
|
64
|
+
if ($(this).hasClass('success') || $(this).hasClass('danger')){
|
65
|
+
var title = $(this).attr('title');
|
66
|
+
var val = title.replace(/[ \/]/g, '');
|
67
|
+
addData(this, val);
|
68
|
+
} else if ($(this).hasClass('plot_btn')){
|
69
|
+
addData(this, 'all');
|
70
|
+
}
|
61
71
|
});
|
data/aux/json_footer.erb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
</tbody></table>
|
2
|
+
</div>
|
3
|
+
<% if output_files.length > 1 %>
|
4
|
+
<nav><ul class="pagination">
|
5
|
+
<% output_files.each_with_index do |results_html, idx| %>
|
6
|
+
<li><a href="<%=results_html%>"><%= idx + 1 %></a></li>
|
7
|
+
<% end %></ul></nav><%end%>
|
8
|
+
<footer><div class="container center-block"><p class="text-muted text-center">Please cite: "Dragan M, Moghul MI, Priyam A & Wurm Y <em>(in prep)</em> GeneValidator: identify problematic gene predictions"<br/> Developed at <a href="http://yannick.poulet.org" target="_blank">Wurm Lab</a>, <a href="http://www.sbcs.qmul.ac.uk" target="_blank">QMUL</a> with funding by <a href="http://www.bbsrc.ac.uk/home/home.aspx" target="_blank">BBSRC</a> and <a href="https://www.google-melange.com/gsoc/homepage/google/gsoc2013" target="_blank">Google Summer of Code 2013</a><br/>This page was created by <a href="https://github.com/wurmlab/GeneValidator" target="_blank" >GeneValidator</a> v<%= GeneValidator::VERSION %></p></div></footer></body></html>
|
data/aux/json_header.erb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html><html><head><title>GeneValidator: identify problems with gene predictions</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><script type="text/javascript" src="files/js/jquery-2.1.1.min.js"></script><script type="text/javascript" src="files/js/bootstrap.min.js"></script><script type="text/javascript" src="files/js/jquery.tablesorter.min.js"></script><script type="text/javascript" src="files/js/d3.v3.min.js"></script><script type="text/javascript" src="files/js/script.js"></script><script type="text/javascript" src="files/js/plots.js"></script><link href="files/css/bootstrap.min.css" rel="stylesheet" type="text/css"><link href="files/css/font-awesome.min.css" rel="stylesheet" type="text/css"><link href="files/css/style.css" rel="stylesheet" type="text/css"></head>
|
2
|
+
<body>
|
3
|
+
<div aria-hidden="true" aria-labelledby="myModalLabel3" class="modal" id="spinner1" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-body text-center"><h2>Loading ...</h2><i class="fa fa-spinner fa-5x fa-spin"></i></div></div></div></div>
|
4
|
+
<div class="modal fade" id="alert" aria-hidden="true" aria-labelledby="myModalLabel5" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><h4 class="modal-title">Oops, Something went wrong!</h4></div><div class="modal-body"><p>This operation is not posible. There seems to be too many queries...</p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div>
|
5
|
+
<div class="modal fade" id="browseralert" aria-hidden="true" aria-labelledby="browser" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content browser-alert"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><h4 class="modal-title">Incompatible Browser - Please use Mozilla Firefox!</h4></div><div class="modal-body" id="browseralertbody"><p id="browseralertText">The plugin that we use to display the validation plots means that your browser is currently unsupported.</p><p>Please use <strong>Mozilla FireFox</strong> to view this file.</p></div></div></div></div>
|
6
|
+
<div class="container"><span class="menu_icon pull-right"><a href="#" id="show_all_plots" onclick="show_all_plots(this);"><i class="fa fa-2x fa-bar-chart-o"></i><br>Show All Charts</a></span><span class="menu_icon pull-right"><a href="https://github.com/wurmlab/GeneValidator" target="_blank"><i class="fa fa-2x fa-github"></i><br>Source Code</a></span><span class="menu_icon pull-right"><a href="http://wurmlab.github.io/tools/genevalidator/"><i class="fa fa-2x fa-info-circle"></i><br>About</a></span><div class="clearfix"></div><img class="logo" src="files/img/gene.png" alt="logo"><div class="page-title"><h1>Gene Validator <small>v<%= GeneValidator::VERSION %></small></h1><h4 class="subheading">Identify Problems with Gene Predictions</h4></div><br/><br/>
|
7
|
+
<div id="report"><div id="report_1"></div></div><br><br>
|
8
|
+
<table id="sortable_table" class="table table-striped table-collapsed table-bordered table-condensed tablesorter"><thead>
|
9
|
+
<tr id="header"><th>#</th><th>Ranking</th><th>Sequence Definition <span data-toggle="tooltip" title="Query definition as it apears in the input fasta file." data-placement="top"><i class="fa fa-question-circle"></i></span></th><th>No. Hits <span data-toggle="tooltip" title="Number of non-identical hits found by BLAST." data-placement="top"><i class="fa fa-question-circle"></i></span></th>
|
10
|
+
<% @json_array[0]['validations'].each do |_short_header, item| %>
|
11
|
+
<th class="sorter-false"><b><%= item['header'] %></b>
|
12
|
+
<% if item['header'] == "LengthCluster" || item['header'] == "GeneMerge" || item['header'] == "MainORF" || item['header'] == "MissingExtraSequences" %>
|
13
|
+
<span data-toggle="tooltip" title="Charts available for this validation" data-placement="top"><i class="fa fa-bar-chart-o chartIcon"></i></span> <span data-toggle="tooltip" title="<%=item['description']%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
14
|
+
<% else %>
|
15
|
+
<span data-toggle="tooltip" title="<%=item['description']%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
16
|
+
<% end %>
|
17
|
+
</th>
|
18
|
+
<% end %>
|
19
|
+
<th class="sorter-false chart-column"></th></tr></thead><tbody>
|
data/aux/json_query.erb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<tr data-target="toggle<%= @row['idx'] %>" data-jsonFile="files/json/<%= @config[:filename] %>_<%= @row['idx'] %>.json">
|
2
|
+
<td title="idx"><%= @row['idx'] %></td>
|
3
|
+
<td data-score="<%= @row['overall_score'] %>"><div class="ratings"><div class="empty-stars"></div><div class="full-stars" style="width:<%= @row['overall_score'] * 0.85 %>%;"></div></div></td>
|
4
|
+
<td title="Definition"><%= @row['definition'] %></td>
|
5
|
+
<td title="No. Hits"><%= @row['no_hits'] %></td>
|
6
|
+
<% @row['validations'].each do |_short_header, item| %>
|
7
|
+
<td title="<%=item['header']%>" class="<%=item['status']%>"><%= item['print']%></td>
|
8
|
+
<% end %>
|
9
|
+
<% if @row['validations'].select{|_short_header, item| item['graphs'] != nil}.map{|_short_header, item| item['graphs'].length}.inject(0){|r, e| r+e } != 0 %>
|
10
|
+
<td><button title="Show plots" class="plot_btn btn btn-default"><i class="fa fa-bar-chart-o"></i></button></td>
|
11
|
+
<% else %>
|
12
|
+
<td></td>
|
13
|
+
<% end %>
|
14
|
+
</tr>
|
data/aux/template_footer.erb
CHANGED
@@ -1,68 +1,19 @@
|
|
1
|
-
</tbody>
|
2
|
-
</table>
|
1
|
+
</tbody></table>
|
3
2
|
<script>
|
4
3
|
var evaluation_div = document.getElementById('report_1');
|
5
4
|
var content_less = "<br><%= less %><div class=\"clearfix\"></div><br><button type=\"button\" onClick='add_content()' class=\"btn btn-primary btn-sm\"> Show More</button>";
|
6
5
|
var content = "<%= evaluation %> <div class=\"clearfix\"></div><br><button type=\"button\" onClick='evaluation_div.innerHTML=content_less' class=\"btn btn-primary btn-sm\"> Show Less</button>";
|
7
6
|
evaluation_div.innerHTML = content_less;
|
8
7
|
function add_content(){
|
9
|
-
evaluation_div = document.getElementById('report_1')
|
8
|
+
evaluation_div = document.getElementById('report_1');
|
10
9
|
evaluation_div.innerHTML=content;
|
11
|
-
|
10
|
+
addOverallPlot('files/json/overview.json');
|
12
11
|
}
|
13
12
|
</script>
|
14
|
-
<div aria-hidden="true" aria-labelledby="myModalLabel3" class="modal" id="spinner1" role="dialog" tabindex="-1">
|
15
|
-
<div class="modal-dialog">
|
16
|
-
<div class="modal-content">
|
17
|
-
<div class="modal-body text-center">
|
18
|
-
<h2>Loading ...</h2>
|
19
|
-
<i class="fa fa-spinner fa-5x fa-spin"></i>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
|
25
|
-
<div class="modal fade" id="alert" aria-hidden="true" aria-labelledby="myModalLabel5" role="dialog" tabindex="-1">
|
26
|
-
<div class="modal-dialog">
|
27
|
-
<div class="modal-content">
|
28
|
-
<div class="modal-header">
|
29
|
-
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
30
|
-
<h4 class="modal-title">Oops, Something went wrong!</h4>
|
31
|
-
</div>
|
32
|
-
<div class="modal-body">
|
33
|
-
<p>This operation is not posible. There seems to be too many queries...</p>
|
34
|
-
</div>
|
35
|
-
<div class="modal-footer">
|
36
|
-
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<div class="modal fade" id="browseralert" aria-hidden="true" aria-labelledby="browser" role="dialog" tabindex="-1">
|
43
|
-
<div class="modal-dialog">
|
44
|
-
<div class="modal-content browser-alert">
|
45
|
-
<div class="modal-header">
|
46
|
-
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
47
|
-
<h4 class="modal-title">Incompatible Browser - Please use Mozilla Firefox!</h4>
|
48
|
-
</div>
|
49
|
-
<div class="modal-body" id="browseralertbody">
|
50
|
-
<p id="browseralertText">The plugin that we use to display the validation plots means that your browser is currently unsupported.</p>
|
51
|
-
<p>Please use <strong>Mozilla FireFox</strong> to view this file.</p>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
|
57
13
|
</div>
|
58
|
-
|
59
|
-
<
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
This page was created by <a href="https://github.com/wurmlab/GeneValidator" target="_blank" >GeneValidator</a> v<%= GeneValidator::VERSION %></p>
|
64
|
-
</div>
|
65
|
-
</footer>
|
66
|
-
|
67
|
-
</body>
|
68
|
-
</html>
|
14
|
+
<% if output_files.length > 1 %>
|
15
|
+
<nav><ul class="pagination">
|
16
|
+
<% output_files.each_with_index do |results_html, idx| %>
|
17
|
+
<li><a href="<%=results_html%>"><%= idx + 1 %></a></li>
|
18
|
+
<% end %></ul></nav><%end%>
|
19
|
+
<footer><div class="container center-block"><p class="text-muted text-center">Please cite: "Dragan M, Moghul MI, Priyam A & Wurm Y <em>(in prep)</em> GeneValidator: identify problematic gene predictions"<br/> Developed at <a href="http://yannick.poulet.org" target="_blank">Wurm Lab</a>, <a href="http://www.sbcs.qmul.ac.uk" target="_blank">QMUL</a> with funding by <a href="http://www.bbsrc.ac.uk/home/home.aspx" target="_blank">BBSRC</a> and <a href="https://www.google-melange.com/gsoc/homepage/google/gsoc2013" target="_blank">Google Summer of Code 2013</a><br/>This page was created by <a href="https://github.com/wurmlab/GeneValidator" target="_blank" >GeneValidator</a> v<%= GeneValidator::VERSION %></p></div></footer></body></html>
|
data/aux/template_header.erb
CHANGED
@@ -1,59 +1,19 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>GeneValidator: identify problems with gene predictions</title>
|
5
|
-
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<script type="text/javascript" src="files/js/jquery-2.1.1.min.js"></script>
|
8
|
-
<script type="text/javascript" src="files/js/bootstrap.min.js"></script>
|
9
|
-
<script type="text/javascript" src="files/js/jquery.tablesorter.min.js"></script>
|
10
|
-
<script type="text/javascript" src="files/js/d3.v3.min.js"></script>
|
11
|
-
<script type="text/javascript" src="files/js/script.js"></script>
|
12
|
-
<script type="text/javascript" src="files/js/plots.js"></script>
|
13
|
-
|
14
|
-
<link href="files/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
15
|
-
<link href="files/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
16
|
-
<link href="files/css/style.css" rel="stylesheet" type="text/css">
|
17
|
-
|
18
|
-
</head>
|
1
|
+
<!DOCTYPE html><html><head><title>GeneValidator: identify problems with gene predictions</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><script type="text/javascript" src="files/js/jquery-2.1.1.min.js"></script><script type="text/javascript" src="files/js/bootstrap.min.js"></script><script type="text/javascript" src="files/js/jquery.tablesorter.min.js"></script><script type="text/javascript" src="files/js/d3.v3.min.js"></script><script type="text/javascript" src="files/js/script.js"></script><script type="text/javascript" src="files/js/plots.js"></script><link href="files/css/bootstrap.min.css" rel="stylesheet" type="text/css"><link href="files/css/font-awesome.min.css" rel="stylesheet" type="text/css"><link href="files/css/style.css" rel="stylesheet" type="text/css"></head>
|
19
2
|
<body>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
<tr id="header">
|
38
|
-
<th>#</th>
|
39
|
-
<th>Ranking</th>
|
40
|
-
<th>Sequence Definition
|
41
|
-
<span data-toggle="tooltip" title="Query definition as it apears in the input fasta file." data-placement="top"><i class="fa fa-question-circle"></i></span>
|
42
|
-
</th>
|
43
|
-
<th>No. Hits
|
44
|
-
<span data-toggle="tooltip" title="Number of non-identical hits found by BLAST." data-placement="top"><i class="fa fa-question-circle"></i></span>
|
45
|
-
</th>
|
46
|
-
<% @validations.each do |item| %>
|
47
|
-
<th class="sorter-false">
|
48
|
-
<b><%= item.header %></b>
|
49
|
-
<% if item.short_header == "LengthCluster" || item.short_header == "Gene_Merge" || item.short_header == "ORF" || item.short_header == "MA" %>
|
50
|
-
<span data-toggle="tooltip" title="Charts available for this validation" data-placement="top"><i class="fa fa-bar-chart-o chartIcon"></i></span> <span data-toggle="tooltip" title="<%=item.description%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
51
|
-
<% else %>
|
52
|
-
<span data-toggle="tooltip" title="<%=item.description%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
53
|
-
<% end %>
|
54
|
-
</th>
|
55
|
-
<% end %>
|
56
|
-
<th class="sorter-false chart-column"></th>
|
57
|
-
</tr>
|
58
|
-
</thead>
|
59
|
-
<tbody>
|
3
|
+
<div aria-hidden="true" aria-labelledby="myModalLabel3" class="modal" id="spinner1" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-body text-center"><h2>Loading ...</h2><i class="fa fa-spinner fa-5x fa-spin"></i></div></div></div></div>
|
4
|
+
<div class="modal fade" id="alert" aria-hidden="true" aria-labelledby="myModalLabel5" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><h4 class="modal-title">Oops, Something went wrong!</h4></div><div class="modal-body"><p>This operation is not posible. There seems to be too many queries...</p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div>
|
5
|
+
<div class="modal fade" id="browseralert" aria-hidden="true" aria-labelledby="browser" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content browser-alert"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><h4 class="modal-title">Incompatible Browser - Please use Mozilla Firefox!</h4></div><div class="modal-body" id="browseralertbody"><p id="browseralertText">The plugin that we use to display the validation plots means that your browser is currently unsupported.</p><p>Please use <strong>Mozilla FireFox</strong> to view this file.</p></div></div></div></div>
|
6
|
+
<div class="container"><span class="menu_icon pull-right"><a href="#" id="show_all_plots" onclick="show_all_plots(this);"><i class="fa fa-2x fa-bar-chart-o"></i><br>Show All Charts</a></span><span class="menu_icon pull-right"><a href="https://github.com/wurmlab/GeneValidator" target="_blank"><i class="fa fa-2x fa-github"></i><br>Source Code</a></span><span class="menu_icon pull-right"><a href="http://wurmlab.github.io/tools/genevalidator/"><i class="fa fa-2x fa-info-circle"></i><br>About</a></span><div class="clearfix"></div><img class="logo" src="files/img/gene.png" alt="logo"><div class="page-title"><h1>Gene Validator <small>v<%= GeneValidator::VERSION %></small></h1><h4 class="subheading">Identify Problems with Gene Predictions</h4></div><br/><br/>
|
7
|
+
<div id="report"><div id="report_1"></div></div><br><br>
|
8
|
+
<table id="sortable_table" class="table table-striped table-collapsed table-bordered table-condensed tablesorter"><thead>
|
9
|
+
<tr id="header"><th>#</th><th>Ranking</th><th>Sequence Definition <span data-toggle="tooltip" title="Query definition as it apears in the input fasta file." data-placement="top"><i class="fa fa-question-circle"></i></span></th><th>No. Hits <span data-toggle="tooltip" title="Number of non-identical hits found by BLAST." data-placement="top"><i class="fa fa-question-circle"></i></span></th>
|
10
|
+
<% @validations.each do |item| %>
|
11
|
+
<th class="sorter-false"><b><%= item.header %></b>
|
12
|
+
<% if item.short_header == "LengthCluster" || item.short_header == "GeneMerge" || item.short_header == "MainORF" || item.short_header == "MissingExtraSequences" %>
|
13
|
+
<span data-toggle="tooltip" title="Charts available for this validation" data-placement="top"><i class="fa fa-bar-chart-o chartIcon"></i></span> <span data-toggle="tooltip" title="<%=item.description%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
14
|
+
<% else %>
|
15
|
+
<span data-toggle="tooltip" title="<%=item.description%>" data-placement="top"><i class="fa fa-question-circle"></i></span>
|
16
|
+
<% end %>
|
17
|
+
</th>
|
18
|
+
<% end %>
|
19
|
+
<th class="sorter-false chart-column"></th></tr></thead><tbody>
|
data/aux/template_query.erb
CHANGED
@@ -1,42 +1,14 @@
|
|
1
|
-
<tr>
|
2
|
-
<td><%= @idx %></td>
|
1
|
+
<tr data-target="toggle<%= @idx %>" data-jsonFile="files/json/<%= @config[:filename] %>_<%= @idx %>.json">
|
2
|
+
<td title="idx"><%= @idx %></td>
|
3
3
|
<td data-score="<%= overall_score %>"><div class="ratings"><div class="empty-stars"></div><div class="full-stars" style="width:<%= overall_score * 0.85 %>%;"></div></div></td>
|
4
|
-
<td title="Definition"
|
4
|
+
<td title="Definition"><%= @prediction_def %></td>
|
5
5
|
<td title="No. Hits"><%= @nr_hits %></td>
|
6
6
|
<% @validations.each do |item| %>
|
7
|
-
|
8
|
-
<td title="<%=item.header%>" class="<%=item.color%>"><%= item.print%></td>
|
9
|
-
<% elsif item.plot_files != nil %>
|
10
|
-
<td title="<%=item.header%>" class="<%=item.color%> my-btn-<%=item.color%>" data-approach="<%= item.approach%>" data-explanation="<%= item.explanation%>" data-conclusion="<%= item.conclusion%>" onclick="showDiv(this, '<%= toggle %>');
|
11
|
-
<% item.plot_files.each do |plot| %>
|
12
|
-
addPlot('<%= toggle %>', 'files/json/<%= plot.filename %>', '<%= plot.type %>', '<%= plot.title %>', '<%= plot.footer %>', '<%= plot.xtitle %>', '<%= plot.ytitle %>', '<%= plot.aux1 %>', '<%= plot.aux2 %>');
|
13
|
-
<% end %>AddExplanation(this, '<%=toggle%>');"><%= item.print%></td>
|
14
|
-
<% elsif item.plot_files == nil %>
|
15
|
-
<td title="<%=item.header%>" class="<%=item.color%>" data-approach="<%= item.approach%>" data-explanation="<%= item.explanation%>" data-conclusion="<%= item.conclusion%>" onclick="showDiv(this, '<%= toggle %>'); AddExplanation(this,'<%=toggle%>');"><%= item.print%></td>
|
16
|
-
<% end %>
|
7
|
+
<td title="<%=item.header%>" class="<%=item.color%>"><%= item.print%></td>
|
17
8
|
<% end %>
|
18
|
-
|
19
9
|
<% if @validations.select{|item| item.plot_files != nil}.map{|item| item.plot_files.length}.inject(0){|r, e| r+e } != 0 %>
|
20
|
-
<td>
|
21
|
-
<button title="Show plots" name="plot_btn" class="plot_btn btn btn-default" onclick="showDiv(this, '<%= toggle %>');
|
22
|
-
<% @validations.each do |item| %>
|
23
|
-
<% if item.plot_files != nil %>
|
24
|
-
<% item.plot_files.each do |plot| %> addPlot('<%= toggle %>', 'files/json/<%= plot.filename %>', '<%= plot.type %>', '<%= plot.title %>', '<%= plot.footer %>', '<%= plot.xtitle %>', '<%= plot.ytitle %>', '<%= plot.aux1 %>', '<%= plot.aux2 %>');<% end %>
|
25
|
-
<% end %>
|
26
|
-
<% end %>"><i class="fa fa-bar-chart-o"></i></button>
|
27
|
-
</td>
|
28
|
-
</tr>
|
29
|
-
<tr class="tablesorter-childRow" name="plot_row" style="display:none;">
|
30
|
-
<td colspan="<%=validations.length + 7%>" id="<%=toggle %>row">
|
31
|
-
<div id="<%=toggle%>" class="expanded-child"></div>
|
32
|
-
</td>
|
33
|
-
</tr>
|
10
|
+
<td><button title="Show plots" class="plot_btn btn btn-default"><i class="fa fa-bar-chart-o"></i></button></td>
|
34
11
|
<% else %>
|
35
|
-
<td></td>
|
36
|
-
|
37
|
-
|
38
|
-
<td colspan="<%=validations.length + 7%>">
|
39
|
-
<div></div>
|
40
|
-
</td>
|
41
|
-
</tr>
|
42
|
-
<% end %>
|
12
|
+
<td></td>
|
13
|
+
<% end %>
|
14
|
+
</tr>
|
data/bin/genevalidator
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'optparse'
|
3
|
+
|
3
4
|
require 'genevalidator'
|
5
|
+
require 'genevalidator/get_raw_sequences'
|
6
|
+
require 'genevalidator/json_to_gv_results'
|
4
7
|
require 'genevalidator/version'
|
5
8
|
|
6
9
|
opt = {}
|
@@ -27,8 +30,8 @@ BANNER
|
|
27
30
|
' dup = Check for duplications,',
|
28
31
|
' frame = Open reading frame (ORF) validation,',
|
29
32
|
' orf = Main ORF validation,',
|
30
|
-
' align = Validating based on multiple alignment') do |
|
31
|
-
opt[:validations] =
|
33
|
+
' align = Validating based on multiple alignment') do |val|
|
34
|
+
opt[:validations] = val
|
32
35
|
end
|
33
36
|
|
34
37
|
opt[:db] = 'swissprot -remote'
|
@@ -39,20 +42,33 @@ BANNER
|
|
39
42
|
opt[:db] = db
|
40
43
|
end
|
41
44
|
|
42
|
-
opts.on('-
|
45
|
+
opts.on('-e', '--extract_raw_seqs',
|
46
|
+
'Produces a fasta file of the raw sequences of all BLAST hits in the',
|
47
|
+
'supplied BLAST output file. This fasta file can then be provided to',
|
48
|
+
'GeneValidator with the "-r", "--raw_sequences" argument') do
|
49
|
+
opt[:extract_raw_seqs] = true
|
50
|
+
end
|
51
|
+
|
52
|
+
opts.on('-j', '--json_file [JSON_FILE]',
|
53
|
+
'Generate GV results from a json file (or a subset of a json file)',
|
54
|
+
'produced from GeneValidator') do |json|
|
55
|
+
opt[:json_file] = json
|
56
|
+
end
|
57
|
+
|
58
|
+
opts.on('-x', '--blast_xml_file [BLAST_XML_FILE]',
|
43
59
|
'Provide GeneValidator with a pre-computed BLAST XML output',
|
44
60
|
'file (BLAST -outfmt option 5).') do |blast_xml_file|
|
45
61
|
opt[:blast_xml_file] = blast_xml_file
|
46
62
|
end
|
47
63
|
|
48
|
-
opts.on('-t', '--blast_tabular_file [
|
64
|
+
opts.on('-t', '--blast_tabular_file [BLAST_TABULAR_FILE]',
|
49
65
|
'Provide GeneValidator with a pre-computed BLAST tabular output',
|
50
66
|
'file. (BLAST -outfmt option 6).') do |blast_tabular_file|
|
51
67
|
opt[:blast_tabular_file] = blast_tabular_file
|
52
68
|
end
|
53
69
|
|
54
70
|
# default blast tabular columns
|
55
|
-
opts.on('-o', '--blast_tabular_options [
|
71
|
+
opts.on('-o', '--blast_tabular_options [BLAST_TABULAR_OPTIONS]',
|
56
72
|
'Custom format used in BLAST -outfmt argument',
|
57
73
|
'See BLAST+ manual pages for more details') do |blast_table_options|
|
58
74
|
opt[:blast_tabular_options] = blast_table_options
|
@@ -64,32 +80,18 @@ BANNER
|
|
64
80
|
'BLAST and Mafft within GeneValidator.') do |num_threads|
|
65
81
|
opt[:num_threads] = num_threads
|
66
82
|
end
|
67
|
-
|
68
|
-
opt[:fast] = false
|
69
|
-
opts.on('-f', '--fast',
|
70
|
-
'Run BLAST on all sequences together (rather than separately)',
|
71
|
-
'to speed up the analysis.',
|
72
|
-
'However, this means that there will be a longer wait before the',
|
73
|
-
'results can be viewed (as GeneValidator will need to run BLAST',
|
74
|
-
'on all sequences before producing any results).',
|
75
|
-
'The speed difference will be more apparent on larger input files') do
|
76
|
-
opt[:fast] = true
|
77
|
-
end
|
78
|
-
|
83
|
+
|
79
84
|
opts.on('-r', '--raw_sequences [raw_seq]',
|
80
85
|
'Supply a fasta file of the raw sequences of all BLAST hits present',
|
81
86
|
'in the supplied BLAST XML or BLAST tabular file.') do |raw_seq|
|
82
87
|
opt[:raw_sequences] = raw_seq
|
83
88
|
end
|
84
89
|
|
85
|
-
opts.on('-
|
86
|
-
'Path to MAFFT bin
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
opts.on('-b', '--blast_bin [BLAST_PATH]',
|
91
|
-
'Path to BLAST+ bin folder (is added to $PATH variable)') do |blast|
|
92
|
-
opt[:blast_bin] = blast
|
90
|
+
opts.on('-b', '--binaries [binaries]', Array,
|
91
|
+
'Path to BLAST and MAFFT bin folders (is added to $PATH variable)',
|
92
|
+
'To be provided as follows:',
|
93
|
+
' $ genevalidator -b /blast/bin/path/ -b /mafft/bin/path/') do |bin|
|
94
|
+
(opt[:bin] ||= []).concat(bin)
|
93
95
|
end
|
94
96
|
|
95
97
|
opts.on('--version', 'The version of GeneValidator that you are running.') do
|
@@ -98,7 +100,7 @@ BANNER
|
|
98
100
|
end
|
99
101
|
|
100
102
|
opts.on('-h', '--help', 'Show this screen.') do
|
101
|
-
puts opt_parser
|
103
|
+
$stderr.puts opt_parser
|
102
104
|
exit
|
103
105
|
end
|
104
106
|
end
|
@@ -109,8 +111,8 @@ begin
|
|
109
111
|
$stderr.puts 'Error: you must specify a single fasta input file instead' \
|
110
112
|
' of ' + ARGV.length.to_s + ".\n"
|
111
113
|
exit 1
|
112
|
-
elsif ARGV.length == 0
|
113
|
-
puts opt_parser
|
114
|
+
elsif ARGV.length == 0 && opt[:extract_raw_seqs].nil? && opt[:json_file].nil?
|
115
|
+
$stderr.puts opt_parser
|
114
116
|
exit 1
|
115
117
|
end
|
116
118
|
rescue OptionParser::ParseError
|
@@ -118,10 +120,21 @@ rescue OptionParser::ParseError
|
|
118
120
|
exit 1
|
119
121
|
end
|
120
122
|
|
121
|
-
start = Time.now
|
122
123
|
opt[:input_fasta_file] = ARGV[0]
|
123
124
|
|
124
|
-
|
125
|
+
start = Time.now
|
126
|
+
|
127
|
+
if opt[:extract_raw_seqs] && opt[:raw_sequences].nil?
|
128
|
+
GeneValidator.opt = opt
|
129
|
+
GeneValidator.config = {}
|
130
|
+
GeneValidator::RawSequences.run
|
131
|
+
elsif opt[:json_file]
|
132
|
+
GeneValidator.opt = opt
|
133
|
+
GeneValidator::JsonToGVResults.run
|
134
|
+
else
|
135
|
+
GeneValidator.init(opt)
|
136
|
+
GeneValidator.run
|
137
|
+
end
|
125
138
|
|
126
|
-
puts "Total running time: #{(Time.now - start).round(3)}s"
|
127
|
-
puts # a blank line
|
139
|
+
$stderr.puts "Total running time: #{(Time.now - start).round(3)}s"
|
140
|
+
$stderr.puts # a blank line
|
data/genevalidator.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'genevalidator/version'
|
@@ -7,22 +7,26 @@ Gem::Specification.new do |s|
|
|
7
7
|
# meta
|
8
8
|
s.name = 'genevalidator'
|
9
9
|
s.version = GeneValidator::VERSION
|
10
|
-
s.authors = ['Monica Dragan', 'Ismail Moghul', 'Anurag Priyam',
|
10
|
+
s.authors = ['Monica Dragan', 'Ismail Moghul', 'Anurag Priyam',
|
11
|
+
'Yannick Wurm']
|
11
12
|
s.email = 'y.wurm@qmul.ac.uk'
|
12
13
|
s.homepage = 'https://github.com/wurmlab/GeneValidator'
|
13
14
|
s.license = 'AGPL'
|
14
15
|
s.summary = 'Identifying problems with gene predictions.'
|
15
|
-
s.description =
|
16
|
-
|
17
|
-
|
16
|
+
s.description = 'The tool validates the input predicted genes and provides' \
|
17
|
+
' useful information (length validation, gene merge'\
|
18
|
+
' validation, sequence duplication checking, ORF finding)' \
|
19
|
+
' based on the similarities to genes in public databases.'
|
18
20
|
|
19
|
-
s.required_ruby_version
|
21
|
+
s.required_ruby_version = '>= 2.0.0'
|
20
22
|
s.add_development_dependency 'bundler', '~> 1.6'
|
21
23
|
s.add_development_dependency 'rake', '~>10.3'
|
24
|
+
s.add_development_dependency 'yard', '~> 0.8'
|
25
|
+
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4', '>= 0.4.7'
|
22
26
|
s.add_dependency('bio', '~> 1.4')
|
23
27
|
s.add_dependency('bio-blastxmlparser', '~>2.0')
|
24
28
|
s.add_dependency('minitest', '~> 5.4')
|
25
|
-
s.add_dependency('statsample', '
|
29
|
+
s.add_dependency('statsample', '1.4') # Updating to 1.5 breaks GV
|
26
30
|
|
27
31
|
s.files = `git ls-files -z`.split("\x0")
|
28
32
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|