sequenceserver 1.1.0.beta → 1.1.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sequenceserver might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +7 -7
- data/README.md +9 -11
- data/Rakefile +2 -15
- data/lib/sequenceserver/database.rb +7 -1
- data/lib/sequenceserver/routes.rb +5 -2
- data/lib/sequenceserver/version.rb +1 -1
- data/lib/sequenceserver.rb +3 -1
- data/package.json +2 -3
- data/public/config.js +0 -7
- data/public/css/sequenceserver.css +8 -17
- data/public/css/sequenceserver.min.css +2 -2
- data/public/js/report.js +62 -45
- data/public/js/search.js +24 -17
- data/public/js/sequenceserver.js +23 -60
- data/public/sequenceserver-report.min.js +17 -0
- data/public/sequenceserver-search.min.js +11 -0
- data/sequenceserver.gemspec +5 -5
- data/spec/capybara_spec.rb +3 -3
- data/spec/sequence_spec.rb +2 -2
- data/views/layout.erb +1 -13
- data/views/report.erb +13 -0
- data/views/search.erb +45 -0
- metadata +26 -92
- data/public/css/sequenceserver.min.css.gz +0 -0
- data/public/sequenceserver.min.js +0 -26
- data/public/sequenceserver.min.js.gz +0 -0
- data/public/vendor/npm/object-assign@2.1.1/.jspm-hash +0 -1
- data/public/vendor/npm/object-assign@2.1.1/.jspm.json +0 -72
- data/public/vendor/npm/object-assign@2.1.1/index.js +0 -27
- data/public/vendor/npm/object-assign@2.1.1/package.json +0 -38
- data/public/vendor/npm/object-assign@2.1.1.js +0 -1
- data/public/vendor/npm/qs@2.4.1/.jshintignore +0 -1
- data/public/vendor/npm/qs@2.4.1/.jshintrc +0 -10
- data/public/vendor/npm/qs@2.4.1/.jspm-hash +0 -1
- data/public/vendor/npm/qs@2.4.1/.jspm.json +0 -61
- data/public/vendor/npm/qs@2.4.1/.npmignore +0 -18
- data/public/vendor/npm/qs@2.4.1/.travis.yml +0 -6
- data/public/vendor/npm/qs@2.4.1/CHANGELOG.md +0 -68
- data/public/vendor/npm/qs@2.4.1/CONTRIBUTING.md +0 -1
- data/public/vendor/npm/qs@2.4.1/LICENSE +0 -28
- data/public/vendor/npm/qs@2.4.1/Makefile +0 -8
- data/public/vendor/npm/qs@2.4.1/README.md +0 -233
- data/public/vendor/npm/qs@2.4.1/index.js +0 -2
- data/public/vendor/npm/qs@2.4.1/lib/index.js +0 -8
- data/public/vendor/npm/qs@2.4.1/lib/parse.js +0 -100
- data/public/vendor/npm/qs@2.4.1/lib/stringify.js +0 -67
- data/public/vendor/npm/qs@2.4.1/lib/utils.js +0 -132
- data/public/vendor/npm/qs@2.4.1/lib.js +0 -2
- data/public/vendor/npm/qs@2.4.1/package.json +0 -29
- data/public/vendor/npm/qs@2.4.1/test/parse.js +0 -359
- data/public/vendor/npm/qs@2.4.1.js +0 -1
- data/public/vendor/npm/react-router@0.13.3/.jspm-hash +0 -1
- data/public/vendor/npm/react-router@0.13.3/.jspm.json +0 -70
- data/public/vendor/npm/react-router@0.13.3/README.md +0 -140
- data/public/vendor/npm/react-router@0.13.3/lib/Cancellation.js +0 -9
- data/public/vendor/npm/react-router@0.13.3/lib/History.js +0 -31
- data/public/vendor/npm/react-router@0.13.3/lib/Match.js +0 -80
- data/public/vendor/npm/react-router@0.13.3/lib/Navigation.js +0 -22
- data/public/vendor/npm/react-router@0.13.3/lib/PathUtils.js +0 -154
- data/public/vendor/npm/react-router@0.13.3/lib/PropTypes.js +0 -15
- data/public/vendor/npm/react-router@0.13.3/lib/Redirect.js +0 -12
- data/public/vendor/npm/react-router@0.13.3/lib/Route.js +0 -133
- data/public/vendor/npm/react-router@0.13.3/lib/ScrollHistory.js +0 -53
- data/public/vendor/npm/react-router@0.13.3/lib/State.js +0 -25
- data/public/vendor/npm/react-router@0.13.3/lib/TestUtils.js +0 -102
- data/public/vendor/npm/react-router@0.13.3/lib/Transition.js +0 -58
- data/public/vendor/npm/react-router@0.13.3/lib/actions/LocationActions.js +0 -25
- data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ImitateBrowserBehavior.js +0 -19
- data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ScrollToTopBehavior.js +0 -15
- data/public/vendor/npm/react-router@0.13.3/lib/components/ActiveHandler.js +0 -111
- data/public/vendor/npm/react-router@0.13.3/lib/components/ContextWrapper.js +0 -39
- data/public/vendor/npm/react-router@0.13.3/lib/components/DefaultRoute.js +0 -41
- data/public/vendor/npm/react-router@0.13.3/lib/components/Link.js +0 -119
- data/public/vendor/npm/react-router@0.13.3/lib/components/NotFoundRoute.js +0 -41
- data/public/vendor/npm/react-router@0.13.3/lib/components/Redirect.js +0 -40
- data/public/vendor/npm/react-router@0.13.3/lib/components/Route.js +0 -67
- data/public/vendor/npm/react-router@0.13.3/lib/components/RouteHandler.js +0 -111
- data/public/vendor/npm/react-router@0.13.3/lib/createRouter.js +0 -329
- data/public/vendor/npm/react-router@0.13.3/lib/createRoutesFromReactChildren.js +0 -59
- data/public/vendor/npm/react-router@0.13.3/lib/getWindowScrollPosition.js +0 -19
- data/public/vendor/npm/react-router@0.13.3/lib/index.js +0 -26
- data/public/vendor/npm/react-router@0.13.3/lib/isReactChildren.js +0 -14
- data/public/vendor/npm/react-router@0.13.3/lib/locations/HashLocation.js +0 -79
- data/public/vendor/npm/react-router@0.13.3/lib/locations/HistoryLocation.js +0 -64
- data/public/vendor/npm/react-router@0.13.3/lib/locations/RefreshLocation.js +0 -18
- data/public/vendor/npm/react-router@0.13.3/lib/locations/StaticLocation.js +0 -50
- data/public/vendor/npm/react-router@0.13.3/lib/locations/TestLocation.js +0 -104
- data/public/vendor/npm/react-router@0.13.3/lib/runRouter.js +0 -16
- data/public/vendor/npm/react-router@0.13.3/lib/supportsHistory.js +0 -17
- data/public/vendor/npm/react-router@0.13.3/lib.js +0 -2
- data/public/vendor/npm/react-router@0.13.3/package.json +0 -36
- data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.js +0 -3388
- data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.min.js +0 -8
data/public/js/report.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import SequenceServer from './sequenceserver';
|
1
2
|
import _ from 'underscore';
|
2
3
|
import React from 'react';
|
3
4
|
import d3 from 'd3';
|
@@ -771,23 +772,24 @@ var SideBar = React.createClass({
|
|
771
772
|
aln_exporter.export_alignments(hsps_arr, "alignment-"+sequence_ids.length+"_hits");
|
772
773
|
},
|
773
774
|
|
774
|
-
summary: function () {
|
775
|
-
var program = this.props.data.program;
|
776
|
-
var numqueries = this.props.data.queries.length;
|
777
|
-
var numquerydb = this.props.data.querydb.length;
|
778
775
|
|
776
|
+
// JSX //
|
777
|
+
render: function () {
|
779
778
|
return (
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
779
|
+
<div className="sidebar">
|
780
|
+
{ this.showIndex() && this.index() }
|
781
|
+
{ this.downloads() }
|
782
|
+
</div>
|
783
|
+
)
|
784
784
|
},
|
785
785
|
|
786
|
-
|
787
|
-
|
786
|
+
showIndex: function () {
|
787
|
+
return this.props.data.queries.length <= 8;
|
788
|
+
},
|
789
|
+
|
790
|
+
index: function () {
|
788
791
|
return (
|
789
|
-
<div
|
790
|
-
className="sidebar">
|
792
|
+
<div className="index">
|
791
793
|
<div
|
792
794
|
className="section-header">
|
793
795
|
<h4>
|
@@ -795,7 +797,7 @@ var SideBar = React.createClass({
|
|
795
797
|
</h4>
|
796
798
|
</div>
|
797
799
|
<ul
|
798
|
-
className="nav hover-reset active-bold
|
800
|
+
className="nav hover-reset active-bold">
|
799
801
|
{
|
800
802
|
_.map(this.props.data.queries, _.bind(function (query) {
|
801
803
|
return (
|
@@ -811,80 +813,95 @@ var SideBar = React.createClass({
|
|
811
813
|
}, this))
|
812
814
|
}
|
813
815
|
</ul>
|
816
|
+
</div>
|
817
|
+
);
|
818
|
+
},
|
814
819
|
|
815
|
-
|
816
|
-
|
820
|
+
summary: function () {
|
821
|
+
var program = this.props.data.program;
|
822
|
+
var numqueries = this.props.data.queries.length;
|
823
|
+
var numquerydb = this.props.data.querydb.length;
|
824
|
+
|
825
|
+
return (
|
826
|
+
program.toUpperCase() + ': ' +
|
827
|
+
numqueries + ' ' + (numqueries > 1 ? 'queries' : 'query') + ", " +
|
828
|
+
numquerydb + ' ' + (numquerydb > 1 ? 'databases' : 'database')
|
829
|
+
);
|
830
|
+
},
|
817
831
|
|
832
|
+
downloads: function () {
|
833
|
+
return (
|
834
|
+
<div className="downloads">
|
818
835
|
<div
|
819
|
-
|
836
|
+
className="section-header">
|
820
837
|
<h4>
|
821
838
|
Download FASTA, XML, TSV
|
822
839
|
</h4>
|
823
840
|
</div>
|
824
841
|
<ul
|
825
|
-
|
842
|
+
className="nav">
|
826
843
|
<li>
|
827
844
|
<a
|
828
|
-
|
829
|
-
|
845
|
+
className="download-fasta-of-all"
|
846
|
+
onClick={this.downloadFastaOfAll}>
|
830
847
|
FASTA of all hits
|
831
848
|
</a>
|
832
849
|
</li>
|
833
850
|
<li>
|
834
851
|
<a
|
835
|
-
|
836
|
-
|
852
|
+
className="download-fasta-of-selected disabled"
|
853
|
+
onClick={this.downloadFastaOfSelected}>
|
837
854
|
FASTA of <span className="text-bold"></span> selected hit(s)
|
838
855
|
</a>
|
839
856
|
</li>
|
840
857
|
<li>
|
841
858
|
<a
|
842
|
-
|
843
|
-
|
844
|
-
|
859
|
+
className="download-alignment-of-all"
|
860
|
+
onClick={this.downloadAlignmentOfAll}>
|
861
|
+
Alignment of all hits
|
845
862
|
</a>
|
846
863
|
</li>
|
847
864
|
<li>
|
848
865
|
<a
|
849
|
-
|
850
|
-
|
851
|
-
|
866
|
+
className="download-alignment-of-selected disabled"
|
867
|
+
onClick={this.downloadAlignmentOfSelected}>
|
868
|
+
Alignment of <span className="text-bold"></span> selected hit(s)
|
852
869
|
</a>
|
853
870
|
</li>
|
854
871
|
<li>
|
855
872
|
<a
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
873
|
+
className="download" data-toggle="tooltip"
|
874
|
+
title="15 columns: query and subject ID; scientific
|
875
|
+
name, alignment length, mismatches, gaps, identity,
|
876
|
+
start and end coordinates, e value, bitscore, query
|
877
|
+
coverage per subject and per HSP."
|
878
|
+
href={"download/" + this.props.data.search_id + ".std_tsv"}>
|
862
879
|
Standard tabular report
|
863
880
|
</a>
|
864
881
|
</li>
|
865
882
|
<li>
|
866
883
|
<a
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
884
|
+
className="download" data-toggle="tooltip"
|
885
|
+
title="44 columns: query and subject ID, GI,
|
886
|
+
accessions, and length; alignment details;
|
887
|
+
taxonomy details of subject sequence(s) and
|
888
|
+
query coverage per subject and per HSP."
|
889
|
+
href={"download/" + this.props.data.search_id + ".full_tsv"}>
|
873
890
|
Full tabular report
|
874
891
|
</a>
|
875
892
|
</li>
|
876
893
|
<li>
|
877
894
|
<a
|
878
|
-
|
879
|
-
|
880
|
-
|
895
|
+
className="download" data-toggle="tooltip"
|
896
|
+
title="Results in XML format."
|
897
|
+
href={"download/" + this.props.data.search_id + ".xml"}>
|
881
898
|
Full XML report
|
882
899
|
</a>
|
883
900
|
</li>
|
884
901
|
</ul>
|
885
902
|
</div>
|
886
|
-
)
|
887
|
-
}
|
903
|
+
);
|
904
|
+
},
|
888
905
|
});
|
889
906
|
|
890
907
|
/**
|
@@ -1211,4 +1228,4 @@ var Page = React.createClass({
|
|
1211
1228
|
}
|
1212
1229
|
});
|
1213
1230
|
|
1214
|
-
|
1231
|
+
React.render(<Page/>, document.getElementById('view'));
|
data/public/js/search.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
+
import SequenceServer from './sequenceserver';
|
1
2
|
import _ from 'underscore';
|
2
3
|
import React from 'react';
|
3
4
|
|
4
|
-
|
5
5
|
/**
|
6
6
|
* Load necessary polyfills.
|
7
7
|
*/
|
@@ -509,21 +509,8 @@ var Databases = React.createClass({
|
|
509
509
|
{
|
510
510
|
_.map(this.databases(category), _.bind(function (database) {
|
511
511
|
return (
|
512
|
-
<li
|
513
|
-
|
514
|
-
<label
|
515
|
-
className={(this.state.type && this.state.type !== database.type) && "disabled"}>
|
516
|
-
<input
|
517
|
-
type="checkbox" name="databases[]" value={database.id} data-type={database.type}
|
518
|
-
disabled={this.state.type && this.state.type !== database.type}
|
519
|
-
onChange=
|
520
|
-
{
|
521
|
-
_.bind(function () {
|
522
|
-
this.handleClick(database)
|
523
|
-
}, this)
|
524
|
-
}/>
|
525
|
-
{" " + (database.title || database.name)}
|
526
|
-
</label>
|
512
|
+
<li className="list-group-item">
|
513
|
+
{ this.renderDatabase(database) }
|
527
514
|
</li>
|
528
515
|
);
|
529
516
|
}, this))
|
@@ -538,6 +525,26 @@ var Databases = React.createClass({
|
|
538
525
|
);
|
539
526
|
},
|
540
527
|
|
528
|
+
renderDatabase: function (database) {
|
529
|
+
var disabled = this.state.type && this.state.type !== database.type;
|
530
|
+
|
531
|
+
return (
|
532
|
+
<label
|
533
|
+
className={disabled && 'disabled database' || 'database'}>
|
534
|
+
<input
|
535
|
+
type="checkbox" name="databases[]" value={database.id}
|
536
|
+
data-type={database.type} disabled={disabled}
|
537
|
+
onChange=
|
538
|
+
{
|
539
|
+
_.bind(function () {
|
540
|
+
this.handleClick(database)
|
541
|
+
}, this)
|
542
|
+
}/>
|
543
|
+
{" " + (database.title || database.name)}
|
544
|
+
</label>
|
545
|
+
);
|
546
|
+
},
|
547
|
+
|
541
548
|
shouldComponentUpdate: function (props, state) {
|
542
549
|
return !(state.type && state.type === this.state.type);
|
543
550
|
},
|
@@ -925,4 +932,4 @@ var Page = React.createClass({
|
|
925
932
|
}
|
926
933
|
});
|
927
934
|
|
928
|
-
|
935
|
+
React.render(<Page/>, document.getElementById('view'));
|
data/public/js/sequenceserver.js
CHANGED
@@ -1,18 +1,9 @@
|
|
1
1
|
import 'jquery';
|
2
|
-
import 'jquery-ui';
|
2
|
+
import 'jquery-ui/ui/effect-drop';
|
3
|
+
import 'jquery-ui/ui/effect-bounce';
|
3
4
|
import 'bootstrap';
|
4
5
|
import 'webshim';
|
5
6
|
|
6
|
-
import React from 'react';
|
7
|
-
import Router from 'react-router';
|
8
|
-
|
9
|
-
import {Page as Search} from './search';
|
10
|
-
import {Page as Report} from './report';
|
11
|
-
|
12
|
-
var Route = Router.Route;
|
13
|
-
var DefaultRoute = Router.DefaultRoute;
|
14
|
-
var RouteHandler = Router.RouteHandler;
|
15
|
-
|
16
7
|
/**
|
17
8
|
* Simple, small jQuery extensions for convenience.
|
18
9
|
*/
|
@@ -101,59 +92,31 @@ var RouteHandler = Router.RouteHandler;
|
|
101
92
|
};
|
102
93
|
}(jQuery));
|
103
94
|
|
104
|
-
|
105
|
-
|
106
|
-
// Class methods. //
|
95
|
+
export default {
|
107
96
|
|
108
|
-
|
109
|
-
FASTA_FORMAT: /^>/,
|
97
|
+
FASTA_FORMAT: /^>/,
|
110
98
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
});
|
99
|
+
setupTooltips: function () {
|
100
|
+
$('.pos-label').each(function () {
|
101
|
+
$(this).tooltip({
|
102
|
+
placement: 'right'
|
116
103
|
});
|
104
|
+
});
|
117
105
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
},
|
122
|
-
|
123
|
-
showErrorModal: function (jqXHR, beforeShow) {
|
124
|
-
setTimeout(function () {
|
125
|
-
beforeShow();
|
126
|
-
if (jqXHR.responseText) {
|
127
|
-
$("#error").html(jqXHR.responseText).modal();
|
128
|
-
}
|
129
|
-
else {
|
130
|
-
$("#error-no-response").modal();
|
131
|
-
}
|
132
|
-
}, 500);
|
133
|
-
},
|
134
|
-
|
135
|
-
routes: function () {
|
136
|
-
return (
|
137
|
-
<Route handler={SequenceServer}>
|
138
|
-
<Route path="/" handler={Search}/>
|
139
|
-
<Route path="/:jid" handler={Report}/>
|
140
|
-
</Route>
|
141
|
-
);
|
142
|
-
},
|
143
|
-
|
144
|
-
run: function () {
|
145
|
-
Router.run(this.routes(), Router.HistoryLocation, function (Root) {
|
146
|
-
React.render(<Root/>, document.getElementById("view"));
|
147
|
-
});
|
148
|
-
}
|
106
|
+
$('.downloads a').each(function () {
|
107
|
+
$(this).tooltip();
|
108
|
+
});
|
149
109
|
},
|
150
110
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
111
|
+
showErrorModal: function (jqXHR, beforeShow) {
|
112
|
+
setTimeout(function () {
|
113
|
+
beforeShow();
|
114
|
+
if (jqXHR.responseText) {
|
115
|
+
$("#error").html(jqXHR.responseText).modal();
|
116
|
+
}
|
117
|
+
else {
|
118
|
+
$("#error-no-response").modal();
|
119
|
+
}
|
120
|
+
}, 500);
|
156
121
|
}
|
157
|
-
}
|
158
|
-
|
159
|
-
SequenceServer.run();
|
122
|
+
};
|