sequenceserver 1.0.0.pre.1 → 1.0.0.pre.2
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/public/css/custom.css +14 -17
- data/public/js/sequence.js +94 -59
- data/public/js/sequenceserver.js +12 -12
- data/sequenceserver.gemspec +1 -1
- data/views/result.erb +6 -12
- data/views/search.erb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f26e8eac4c55a9a2a0997d2ab6e922c88ded0d8
|
4
|
+
data.tar.gz: 60684bb5f9291fcbbfefd410517ea3892df9ff5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a51d9aff1dc67c12898295dbbc36452216820c22695a0e2b1507fa977d49fe8cf235f2da44762b0a5229bce2e59266b00358f40b51a072fbb9de007b9b60bef0
|
7
|
+
data.tar.gz: 8042ec1559d3719d2f910681c8cb4988d6cf0fe81d4205d5b596929be31045b0309ec44ad3bd335a457fae2c3ad0c1d80dc0be4c3322fc5d07501af494210695
|
data/public/css/custom.css
CHANGED
@@ -182,6 +182,7 @@ a.disabled:hover {
|
|
182
182
|
.label-reset {
|
183
183
|
color: inherit;
|
184
184
|
line-height: inherit;
|
185
|
+
font-weight: normal;
|
185
186
|
}
|
186
187
|
|
187
188
|
/**
|
@@ -309,11 +310,12 @@ h1,h2,h3,h4,h5,h6,.page-header {
|
|
309
310
|
}
|
310
311
|
|
311
312
|
.main {
|
312
|
-
border-right: 1px solid #ddd
|
313
|
+
/*border-right: 1px solid #ddd;*/
|
313
314
|
}
|
314
315
|
|
315
316
|
.sidebar > .page-header > h4 {
|
316
|
-
padding:
|
317
|
+
padding: 10px 0px 0px 0px;
|
318
|
+
font-size: 14px;
|
317
319
|
}
|
318
320
|
|
319
321
|
.sidebar.affix {
|
@@ -393,6 +395,14 @@ svg:not(:root) {
|
|
393
395
|
letter-spacing: 1px;
|
394
396
|
}
|
395
397
|
|
398
|
+
.fastan > .page-header {
|
399
|
+
padding-bottom: 8px;
|
400
|
+
}
|
401
|
+
.fastan > .page-content {
|
402
|
+
padding-top: 8px;
|
403
|
+
padding-left: 0;
|
404
|
+
}
|
405
|
+
|
396
406
|
.footer a:first-child {
|
397
407
|
vertical-align: super;
|
398
408
|
}
|
@@ -453,21 +463,8 @@ svg:not(:root) {
|
|
453
463
|
}
|
454
464
|
|
455
465
|
.glow {
|
456
|
-
-
|
457
|
-
|
458
|
-
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
|
459
|
-
-webkit-backface-visibility: hidden;
|
460
|
-
backface-visibility: hidden;
|
461
|
-
-moz-osx-font-smoothing: grayscale;
|
462
|
-
-webkit-transition-duration: 0.3s;
|
463
|
-
transition-duration: 0.3s;
|
464
|
-
-webkit-transition-property: box-shadow;
|
465
|
-
transition-property: box-shadow;
|
466
|
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
466
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
|
467
|
+
border-left: 2px solid #f0ad4e;
|
467
468
|
padding-left: 16px;
|
468
469
|
padding-right: 16px;
|
469
470
|
}
|
470
|
-
|
471
|
-
.pos-marker {
|
472
|
-
display: none;
|
473
|
-
}
|
data/public/js/sequence.js
CHANGED
@@ -275,10 +275,7 @@ Sequence = Class(
|
|
275
275
|
this._buildFormatSelector();
|
276
276
|
|
277
277
|
// DIV for the sequence
|
278
|
-
this._contentDiv = jQuery('<div
|
279
|
-
this._contentDiv.css({
|
280
|
-
'text-align': 'left'
|
281
|
-
});
|
278
|
+
this._contentDiv = jQuery('<div/>').appendTo(this._container);
|
282
279
|
|
283
280
|
// Initialize highlighting
|
284
281
|
this._highlights = this.opt.highlights;
|
@@ -836,21 +833,18 @@ Sequence = Class(
|
|
836
833
|
* Inputs: -
|
837
834
|
*/
|
838
835
|
_drawCodata : function() {
|
839
|
-
|
840
|
-
var self = this;
|
841
|
-
var a = this.opt.sequence.toUpperCase().split('');
|
842
|
-
var pre = jQuery('<pre/>').appendTo(this._contentDiv);
|
836
|
+
var seq = this.opt.sequence.toUpperCase().split('');
|
843
837
|
|
844
|
-
|
845
|
-
var str = 'ENTRY ' + this.opt.id + '<br/>';
|
846
|
-
str += 'SEQUENCE<br/>';
|
838
|
+
// Add header.
|
847
839
|
if ( this.opt.formatOptions !== undefined ){
|
848
840
|
if(this.opt.formatOptions.title !== undefined ){
|
849
|
-
if (this.opt.formatOptions.title
|
850
|
-
|
851
|
-
|
841
|
+
if (this.opt.formatOptions.title != false) {
|
842
|
+
var header =
|
843
|
+
$('<pre/>').addClass('header').appendTo(this._contentDiv);
|
844
|
+
header.html('ENTRY ' + this.opt.id +
|
845
|
+
'<br/>SEQUENCE<br/>'); }
|
852
846
|
}
|
853
|
-
}
|
847
|
+
}
|
854
848
|
|
855
849
|
/* Correct column size in case the sequence is as small peptide */
|
856
850
|
var numCols = this.opt.columns.size;
|
@@ -868,19 +862,18 @@ Sequence = Class(
|
|
868
862
|
numColsForSpace: 0,
|
869
863
|
spaceBetweenChars: true
|
870
864
|
};
|
865
|
+
this._drawSequence(seq, opt);
|
871
866
|
|
872
|
-
|
873
|
-
|
874
|
-
var footer = '<br/>///';
|
867
|
+
// Add footer.
|
875
868
|
if (this.opt.formatOptions !== undefined) {
|
876
869
|
if (this.opt.formatOptions.footer !== undefined) {
|
877
|
-
if (this.opt.formatOptions.footer
|
878
|
-
footer =
|
870
|
+
if (this.opt.formatOptions.footer != false) {
|
871
|
+
var footer =
|
872
|
+
$('<pre/>').addClass('footer').appendTo(this._contentDiv);
|
873
|
+
footer.html('<br/>///');
|
879
874
|
}
|
880
875
|
}
|
881
876
|
}
|
882
|
-
str += footer;
|
883
|
-
pre.html(str);
|
884
877
|
|
885
878
|
this._drawAnnotations(opt);
|
886
879
|
},
|
@@ -1066,9 +1059,7 @@ Sequence = Class(
|
|
1066
1059
|
* Inputs: -
|
1067
1060
|
*/
|
1068
1061
|
_drawPride : function() {
|
1069
|
-
var
|
1070
|
-
var a = this.opt.sequence.toUpperCase().split('');
|
1071
|
-
var pre = jQuery('<pre></pre>').appendTo(this._contentDiv);
|
1062
|
+
var seq = this.opt.sequence.toUpperCase().split('');
|
1072
1063
|
|
1073
1064
|
/* Correct column size in case the sequence is as small peptide */
|
1074
1065
|
var numCols = this.opt.columns.size;
|
@@ -1079,18 +1070,14 @@ Sequence = Class(
|
|
1079
1070
|
opt = {
|
1080
1071
|
numLeft: true,
|
1081
1072
|
numLeftSize: 5,
|
1082
|
-
numLeftPad:'
|
1083
|
-
numRight:
|
1073
|
+
numLeftPad: ' ',
|
1074
|
+
numRight: false,
|
1084
1075
|
numRightSize: 5,
|
1085
|
-
numRightPad: '
|
1076
|
+
numRightPad: '',
|
1086
1077
|
numCols: numCols,
|
1087
|
-
numColsForSpace:
|
1078
|
+
numColsForSpace: this.opt.columns.spacedEach
|
1088
1079
|
};
|
1089
|
-
|
1090
|
-
pre.html(
|
1091
|
-
this._drawSequence(a, opt)
|
1092
|
-
);
|
1093
|
-
|
1080
|
+
this._drawSequence(seq, opt);
|
1094
1081
|
this._drawAnnotations(opt);
|
1095
1082
|
},
|
1096
1083
|
/*
|
@@ -1101,34 +1088,38 @@ Sequence = Class(
|
|
1101
1088
|
* opt -> {Object} opt The CUSTOM format.
|
1102
1089
|
*/
|
1103
1090
|
_drawSequence : function(a, opt) {
|
1104
|
-
|
1091
|
+
var indL = '';
|
1092
|
+
var indT = '';
|
1093
|
+
var indR = '\n';
|
1094
|
+
var str = '';
|
1105
1095
|
|
1106
1096
|
// Index at top?
|
1107
1097
|
if( opt.numTop )
|
1108
1098
|
{
|
1109
|
-
|
1099
|
+
indT += '<span class="numTop pos-marker">'
|
1110
1100
|
var size = (opt.spaceBetweenChars)? opt.numTopEach*2: opt.numTopEach;
|
1111
1101
|
|
1112
1102
|
if (opt.numLeft) {
|
1113
|
-
|
1103
|
+
indT += this._formatIndex(' ', opt.numLeftSize, ' ');
|
1114
1104
|
}
|
1115
1105
|
|
1116
|
-
|
1106
|
+
indT += this._formatIndex(' ', size, ' ');
|
1117
1107
|
|
1118
1108
|
for(var x = opt.numTopEach; x < opt.numCols; x += opt.numTopEach) {
|
1119
|
-
|
1109
|
+
indT += this._formatIndex(x, size, ' ', true);
|
1120
1110
|
}
|
1121
|
-
|
1111
|
+
indT += '</span>'
|
1122
1112
|
}
|
1123
1113
|
|
1124
1114
|
|
1125
1115
|
// Index at the left?
|
1126
1116
|
if (opt.numLeft) {
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1117
|
+
indL += '<span id="numLeft_' + this.getId() + '_' + 0 + '"';
|
1118
|
+
indL += 'class="pos-marker">'
|
1119
|
+
indL += this._formatIndex(1, opt.numLeftSize, opt.numLeftPad);
|
1120
|
+
indL += ' ';
|
1121
|
+
indL += '</span>';
|
1122
|
+
indL += '\n';
|
1132
1123
|
}
|
1133
1124
|
|
1134
1125
|
var j=1;
|
@@ -1138,30 +1129,33 @@ Sequence = Class(
|
|
1138
1129
|
str += '<span class="sequence" id="' + this.getId() + '_' + i + '">' + a[i-1] + '</span>';
|
1139
1130
|
|
1140
1131
|
if (opt.numRight) {
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1132
|
+
indR += '<span id="numRight_' + this.getId() + '_' + i + '"';
|
1133
|
+
indR += 'class="pos-marker">'
|
1134
|
+
indR += ' ';
|
1135
|
+
indR += this._formatIndex(i, opt.numRightSize, opt.numRightPad);
|
1136
|
+
indR += '</span>';
|
1137
|
+
indR += '\n';
|
1146
1138
|
}
|
1147
1139
|
|
1148
1140
|
str += '<br/>';
|
1149
1141
|
|
1150
1142
|
var aaRemaining = a.length - i;
|
1151
1143
|
if (opt.numLeft && aaRemaining > 0) {
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1144
|
+
indL += '<span id="numLeft_' + this.getId() + '_' + i + '"';
|
1145
|
+
indL += 'class="pos-marker">'
|
1146
|
+
indL += this._formatIndex(i+1, opt.numLeftSize, opt.numLeftPad);
|
1147
|
+
indL += ' ';
|
1148
|
+
indL += '</span>';
|
1149
|
+
indL += '\n';
|
1150
|
+
}
|
1158
1151
|
|
1159
1152
|
j = 1;
|
1160
1153
|
|
1161
1154
|
} else {
|
1162
|
-
str += '<span class="sequence" id="' + this.getId() + '_' + i + '"
|
1163
|
-
str += (
|
1164
|
-
str += (opt.spaceBetweenChars)? ' ' : '';
|
1155
|
+
str += '<span class="sequence" id="' + this.getId() + '_' + i + '"';
|
1156
|
+
str += (j % opt.numColsForSpace == 0)? ' style="letter-spacing: 1em;"' : '';
|
1157
|
+
str += (opt.spaceBetweenChars)? ' style="letter-spacing: 1em;"' : '';
|
1158
|
+
str += '">' + a[i-1];
|
1165
1159
|
str += '</span>';
|
1166
1160
|
j++;
|
1167
1161
|
}
|
@@ -1173,6 +1167,47 @@ Sequence = Class(
|
|
1173
1167
|
str = "<pre>" + str + "</pre>";
|
1174
1168
|
}
|
1175
1169
|
|
1170
|
+
|
1171
|
+
var ret = [];
|
1172
|
+
if (opt.numTop) {
|
1173
|
+
$('<pre/>')
|
1174
|
+
.html(indT)
|
1175
|
+
.addClass('indT')
|
1176
|
+
.css({
|
1177
|
+
color: '#aaa'
|
1178
|
+
})
|
1179
|
+
.appendTo(this._contentDiv);
|
1180
|
+
}
|
1181
|
+
if (opt.numLeft) {
|
1182
|
+
$('<pre/>')
|
1183
|
+
.html(indL)
|
1184
|
+
.addClass('indL')
|
1185
|
+
.css({
|
1186
|
+
color: '#aaa',
|
1187
|
+
display: 'inline-block'
|
1188
|
+
})
|
1189
|
+
.appendTo(this._contentDiv);
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
$('<pre/>')
|
1193
|
+
.html(str)
|
1194
|
+
.addClass('seqF')
|
1195
|
+
.css({
|
1196
|
+
display: 'inline-block'
|
1197
|
+
})
|
1198
|
+
.appendTo(this._contentDiv);
|
1199
|
+
|
1200
|
+
if (opt.numRight) {
|
1201
|
+
$('<pre/>')
|
1202
|
+
.html(indR)
|
1203
|
+
.addClass('indR')
|
1204
|
+
.css({
|
1205
|
+
color: '#aaa',
|
1206
|
+
display: 'inline-block'
|
1207
|
+
})
|
1208
|
+
.appendTo(this._contentDiv);
|
1209
|
+
}
|
1210
|
+
|
1176
1211
|
return str;
|
1177
1212
|
},
|
1178
1213
|
/*
|
data/public/js/sequenceserver.js
CHANGED
@@ -55,16 +55,15 @@
|
|
55
55
|
|
56
56
|
(function ($) {
|
57
57
|
$.fn.poll = function () {
|
58
|
-
var that
|
59
|
-
|
60
|
-
|
61
|
-
val = that.val();
|
58
|
+
var that = this;
|
59
|
+
var val = null;
|
60
|
+
var newval;
|
62
61
|
|
63
62
|
(function ping () {
|
64
|
-
|
63
|
+
newval = that.val();
|
65
64
|
|
66
|
-
if (
|
67
|
-
val =
|
65
|
+
if (newval != val){
|
66
|
+
val = newval;
|
68
67
|
that.change();
|
69
68
|
}
|
70
69
|
|
@@ -266,8 +265,6 @@ if (!SS) {
|
|
266
265
|
this.$sequenceFile = $('#sequence-file');
|
267
266
|
this.$sequenceControls = $('.sequence-controls');
|
268
267
|
|
269
|
-
this.$sequence.poll();
|
270
|
-
|
271
268
|
SS.blast.init();
|
272
269
|
};
|
273
270
|
|
@@ -280,7 +277,7 @@ if (!SS) {
|
|
280
277
|
SS.selectHit = function (checkbox) {
|
281
278
|
if (!checkbox || !checkbox.value) return;
|
282
279
|
|
283
|
-
var $hitn = $(
|
280
|
+
var $hitn = $($(checkbox).data('target'));
|
284
281
|
|
285
282
|
// Highlight selected hit and sync checkboxes if sequence viewer is open.
|
286
283
|
if(checkbox.checked) {
|
@@ -361,9 +358,10 @@ SS.showSequenceViewer = (function () {
|
|
361
358
|
var widget = new Sequence({
|
362
359
|
sequence: sequence.value,
|
363
360
|
target: widgetId,
|
364
|
-
format: '
|
361
|
+
format: 'PRIDE',
|
365
362
|
columns: {
|
366
|
-
size:
|
363
|
+
size: 40,
|
364
|
+
spacedEach: 5
|
367
365
|
},
|
368
366
|
formatOptions: {
|
369
367
|
title: false,
|
@@ -725,4 +723,6 @@ $(document).ready(function(){
|
|
725
723
|
|
726
724
|
return false;
|
727
725
|
});
|
726
|
+
|
727
|
+
SS.$sequence.poll();
|
728
728
|
});
|
data/sequenceserver.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
# meta
|
3
3
|
s.name = 'sequenceserver'
|
4
|
-
s.version = '1.0.0-
|
4
|
+
s.version = '1.0.0-2'
|
5
5
|
s.authors = ['Anurag Priyam', 'Ben J Woodcroft', 'Vivek Rai', 'Yannick Wurm']
|
6
6
|
s.email = ['anurag08priyam@gmail.com', 'b.woodcroft@uq.edu.au']
|
7
7
|
s.homepage = 'http://sequenceserver.com'
|
data/views/result.erb
CHANGED
@@ -109,7 +109,7 @@
|
|
109
109
|
<div class="hit-links text-right">
|
110
110
|
<label>
|
111
111
|
<input
|
112
|
-
type="checkbox" value
|
112
|
+
type="checkbox" value="<%= hit.accession %>" data-target="<%= "#Query_#{query.number}_hit_#{hit.number}" %>">
|
113
113
|
Select
|
114
114
|
</label>
|
115
115
|
<% report.link_per_hit(hit.accession).each do |link| %>
|
@@ -142,18 +142,15 @@ Total letters in queried databases: <%= report.stats[1] %>
|
|
142
142
|
|
143
143
|
<% unless report.queries.length == 1 && report.queries.first.hits.empty? %>
|
144
144
|
<div
|
145
|
-
class="side col-md-3">
|
145
|
+
class="side col-md-3 hidden-xs hidden-sm">
|
146
146
|
<div
|
147
147
|
class="sidebar">
|
148
148
|
<div
|
149
149
|
class="page-header">
|
150
150
|
<h4>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<%= report.querydb.length %> <%= report.querydb.length > 1 ? 'databases' : 'database' %>,
|
155
|
-
<%= report.program.upcase %>
|
156
|
-
</small>
|
151
|
+
<%= report.program.upcase %>:
|
152
|
+
<%= report.queries.length %> <%= report.queries.length > 1 ? 'queries' : 'query' %>,
|
153
|
+
<%= report.querydb.length %> <%= report.querydb.length > 1 ? 'databases' : 'database' %>
|
157
154
|
</h4>
|
158
155
|
</div>
|
159
156
|
<ul
|
@@ -176,10 +173,7 @@ Total letters in queried databases: <%= report.stats[1] %>
|
|
176
173
|
<div
|
177
174
|
class="page-header">
|
178
175
|
<h4>
|
179
|
-
|
180
|
-
<small>
|
181
|
-
FASTA, XML, TSV
|
182
|
-
</small>
|
176
|
+
Download FASTA, XML, TSV
|
183
177
|
</h4>
|
184
178
|
</div>
|
185
179
|
<ul
|
data/views/search.erb
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
|
17
17
|
<link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
|
18
18
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
|
19
|
-
<link rel="stylesheet" media="screen" type="text/css" href="css/bootstrap.min.css"/>
|
20
|
-
<link rel="stylesheet" media="screen" type="text/css" href="css/font-awesome.min.css"/>
|
21
|
-
<link rel="stylesheet" media="screen" type="text/css" href="css/custom.css"/>
|
19
|
+
<link rel="stylesheet" media="screen,print" type="text/css" href="css/bootstrap.min.css"/>
|
20
|
+
<link rel="stylesheet" media="screen,print" type="text/css" href="css/font-awesome.min.css"/>
|
21
|
+
<link rel="stylesheet" media="screen,print" type="text/css" href="css/custom.css"/>
|
22
22
|
</head>
|
23
23
|
|
24
24
|
<body>
|
@@ -235,8 +235,7 @@
|
|
235
235
|
<button
|
236
236
|
type="submit"
|
237
237
|
id="method" class="btn btn-primary col-md-12"
|
238
|
-
title="Use Ctrl+Enter as shortcut."
|
239
|
-
disabled="disabled">
|
238
|
+
title="Use Ctrl+Enter as shortcut.">
|
240
239
|
blast
|
241
240
|
</button>
|
242
241
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequenceserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anurag Priyam
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-01-
|
14
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thin
|