sequenceserver 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sequenceserver/customisation.rb +56 -100
- data/public/js/sequenceserver.js +1 -1
- data/sequenceserver.gemspec +1 -1
- data/views/search.erb +5 -21
- metadata +51 -87
@@ -1,104 +1,60 @@
|
|
1
1
|
module SequenceServer
|
2
2
|
module Customisation
|
3
|
+
## When not commented out, this method is used to take a
|
4
|
+
## sequence ID, and return a hyperlink that
|
5
|
+
## replaces the hit in the BLAST output.
|
6
|
+
##
|
7
|
+
## Return the hyperlink to link to, or nil
|
8
|
+
## to not not include a hyperlink.
|
9
|
+
##
|
10
|
+
## When this method
|
11
|
+
## is commented out, the default link is used. The default
|
12
|
+
## is a link to the full sequence of
|
13
|
+
## the hit is displayed (if makeblastdb has been run with
|
14
|
+
## -parse_seqids), or no link at all otherwise.
|
15
|
+
# def construct_custom_sequence_hyperlink(options)
|
16
|
+
# ## Example:
|
17
|
+
# ## sequence_id comes in like "psu|MAL13P1.200 | organism=Plasmodium_falciparum_3D7 | product=mitochondrial"
|
18
|
+
# ## output: "http://apiloc.bio21.unimelb.edu.au/apiloc/gene/MAL13P1.200"
|
19
|
+
# matches = options[:sequence_id].match(/^\s*psu\|(\S+) /)
|
20
|
+
# if matches #if the sequence_id conforms to our expectations
|
21
|
+
# # All is good. Return the hyperlink.
|
22
|
+
# return "http://apiloc.bio21.unimelb.edu.au/apiloc/gene/#{matches[1]}"
|
23
|
+
# else
|
24
|
+
# # Parsing the sequence_id didn't work. Don't include a hyperlink for this
|
25
|
+
# # sequence_id, but log that there has been a problem.
|
26
|
+
# settings.log.warn "Unable to parse sequence id `#{options[:sequence_id]}'"
|
27
|
+
# # Return nil so no hyperlink is generated.
|
28
|
+
# return nil
|
29
|
+
# end
|
30
|
+
# end
|
3
31
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# pbar genomic
|
32
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
33
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/pbarbatus_1/?name=#{id}"
|
34
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
35
|
-
when /lcl\|SI2.2.0/ # => sinv
|
36
|
-
sid = options[:sequence_id]
|
37
|
-
|
38
|
-
# construct Hymenopterabase genome browser link
|
39
|
-
bid = sid.match(/(Si_gnF.scaffold\d*)\[(\d*..\d*)\]/)[1..2].join(':')
|
40
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/sinvicta_1/?name=#{bid}"
|
41
|
-
|
42
|
-
# construct uniprot link
|
43
|
-
ukey = sid.match(/SI2.2.0_(\d*)/)[1]
|
44
|
-
uid = Uniprot::SINV["SINV_#{ukey}"]
|
45
|
-
uniprot = "http://www.uniprot.org/uniprot/#{uid}"
|
46
|
-
|
47
|
-
# construct the entire line
|
48
|
-
line << " [<a href='#{browser}'>Genome Browser</a>] [<a href='#{uniprot}'>Uniprot</a>]\n"
|
49
|
-
when /^lcl\|(Si_gnF.scaffold\d*) /
|
50
|
-
# sinv genomic
|
51
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
52
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/sinvicta_1/?name=#{id}"
|
53
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
54
|
-
when /^lcl\|(LH\d*-RA) /
|
55
|
-
# lhum cds and protein
|
56
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
57
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/lhumile_1/?name=#{id}"
|
58
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
59
|
-
when /^lcl\|(scf\d*) /
|
60
|
-
# lhum genomic
|
61
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
62
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/lhumile_1/?name=#{id}"
|
63
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
64
|
-
when /^lcl\|(ACEP_\d*-RA) /
|
65
|
-
# acep cds and protein
|
66
|
-
id = $1.gsub(/EP_000/, '')
|
67
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/acephalotes_1/?name=#{id}"
|
68
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
69
|
-
when /^lcl\|Acep_(scaffold\d*) /
|
70
|
-
# acep genomic
|
71
|
-
id = $1
|
72
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/acephalotes_1/?name=#{id}:#{options[:hit_coordinates].join('..')}"
|
73
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
74
|
-
when /^lcl\|Cflo_(\d*)--/
|
75
|
-
# cflo cds and protein
|
76
|
-
id = "CFLO#{$1}-RA"
|
77
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/cfloridanus_1/?name=#{id}"
|
78
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
79
|
-
when /^lcl\|Cflo_gn3.3_((scaffold\d*)|(C\d*)) /
|
80
|
-
# cflo genomic
|
81
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
82
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/cfloridanus_1/?name=#{id}"
|
83
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
84
|
-
when /^lcl\|Hsal_(\d*)--/
|
85
|
-
# hsal cds and protein
|
86
|
-
id = "HSAL#{$1}-RA"
|
87
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/hsaltator_1/?name=#{id}"
|
88
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
89
|
-
when /^lcl\|Hsal_gn3.3_((scaffold\d*)|(C\d*)) /
|
90
|
-
# hsal genomic
|
91
|
-
id = "#{$1}:#{options[:hit_coordinates].join('..')}"
|
92
|
-
browser = "http://genomes.arc.georgetown.edu/cgi-bin/gbrowse/hsaltator_1/?name=#{id}"
|
93
|
-
line << " [<a href='#{browser}'>Genome Browser</a>]\n"
|
94
|
-
else
|
95
|
-
# Parsing the sequence_id didn't work. Don't include a hyperlink for this
|
96
|
-
# sequence_id, but log that there has been a problem.
|
97
|
-
settings.log.warn "Unable to parse sequence id `#{options[:sequence_id]}'"
|
98
|
-
# Return nil so no hyperlink is generated.
|
99
|
-
return nil
|
100
|
-
end
|
101
|
-
line
|
102
|
-
end
|
32
|
+
## Much like construct_custom_sequence_hyperlink, except
|
33
|
+
## instead of just a hyperlink being defined, the whole
|
34
|
+
## line as it appears in the blast results is generated.
|
35
|
+
##
|
36
|
+
## This is a therefore more flexible setup than is possible
|
37
|
+
## with construct_custom_sequence_hyperlink, because doing
|
38
|
+
## things such as adding two hyperlinks for the one hit
|
39
|
+
## are possible.
|
40
|
+
##
|
41
|
+
## When this method is commented out, the behaviour is that
|
42
|
+
## the construct_custom_sequence_hyperlink method is used,
|
43
|
+
## or failing that the default method of that is used.
|
44
|
+
# def construct_custom_sequence_hyperlinking_line(options)
|
45
|
+
# matches = options[:sequence_id].match(/^\s*psu\|(\S+) /)
|
46
|
+
# if matches #if the sequence_id conforms to our expectations
|
47
|
+
# # All is good. Return the hyperlink.
|
48
|
+
# link1 = "http://apiloc.bio21.unimelb.edu.au/apiloc/gene/#{matches[1]}"
|
49
|
+
# link2 = "http://google.com/?q=#{matches[1]}"
|
50
|
+
# return "<a href='#{link1}'>ApiLoc page</a>, <a href='#{link2}'>Google search</a>"
|
51
|
+
# else
|
52
|
+
# # Parsing the sequence_id didn't work. Don't include a hyperlink for this
|
53
|
+
# # sequence_id, but log that there has been a problem.
|
54
|
+
# settings.log.warn "Unable to parse sequence id `#{options[:sequence_id]}'"
|
55
|
+
# # Return nil so no hyperlink is generated.
|
56
|
+
# return nil
|
57
|
+
# end
|
58
|
+
# end
|
103
59
|
end
|
104
|
-
end
|
60
|
+
end
|
data/public/js/sequenceserver.js
CHANGED
data/sequenceserver.gemspec
CHANGED
data/views/search.erb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
|
-
<title>
|
4
|
+
<title>SequenceServer: Custom BLAST Server</title>
|
5
5
|
<meta name="author" content="Anurag Priyam" />
|
6
6
|
<meta name="author" content="Ben J. Woodcroft" />
|
7
7
|
<meta name="author" content="Yannick Wurm" />
|
8
8
|
<meta name="author" content="Cedric Wurm" />
|
9
|
-
<meta name="description" content="BLAST
|
10
|
-
<meta name="keywords" content="ant genomes, blast search, fire ant genome, harvester ant genome, leafcutter ant genome, camponotus genome, harpegnathos genome."/>
|
9
|
+
<meta name="description" content="Custom BLAST server provided by SequenceServer (http://www.sequenceserver.com)"/>
|
11
10
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
|
12
11
|
<script type="text/javascript" src="<%= uri('/js/jquery.js') %>"></script>
|
13
12
|
<script type="text/javascript" src="<%= uri('/js/jquery.enablePlaceholder.min.js') %>"></script>
|
@@ -18,30 +17,16 @@
|
|
18
17
|
<%# without a space after erb's closing tag, a / gets appended to css' path %>
|
19
18
|
<link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.min.css') %>" />
|
20
19
|
<link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/custom.css') %>" />
|
21
|
-
|
22
|
-
<script type="text/javascript">
|
23
|
-
var _gaq = _gaq || [];
|
24
|
-
_gaq.push(['_setAccount', 'UA-471841-4']);
|
25
|
-
_gaq.push(['_setDomainName', 'none']);
|
26
|
-
_gaq.push(['_setAllowLinker', true]);
|
27
|
-
_gaq.push(['_trackPageview']);
|
28
|
-
|
29
|
-
(function() {
|
30
|
-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
31
|
-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
32
|
-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
33
|
-
})();
|
34
|
-
</script>
|
35
20
|
</head>
|
36
21
|
|
37
22
|
<body>
|
38
23
|
<div class="container">
|
39
24
|
<div class="page">
|
40
25
|
<div class="page-header" id="banner">
|
41
|
-
<h1>BLAST
|
26
|
+
<h1>BLAST Sequence(s)</h1>
|
42
27
|
</div>
|
43
28
|
|
44
|
-
<form method="post" action="<%= uri('/#result') %>">
|
29
|
+
<form method="post" id="blast" action="<%= uri('/#result') %>">
|
45
30
|
<div class="row">
|
46
31
|
<div class="span12">
|
47
32
|
<div class="offset-left sequence">
|
@@ -231,8 +216,7 @@
|
|
231
216
|
</div>
|
232
217
|
|
233
218
|
<div id="underbar">
|
234
|
-
<p
|
235
|
-
<p>Please cite: <a href="http://www.biomedcentral.com/1471-2164/10/5/abstract">Wurm <em>et al</em> (2009) <strong>Fourmidable: a database for ant genomics.</strong> <em>BMC Genomics</em> 10:5</a> and the appropriate ant genome paper(s).</p>
|
219
|
+
<p>© <a href='http://www.sequenceserver.com'>SequenceServer: BLAST search made easy!</a></p>
|
236
220
|
</div>
|
237
221
|
</div> <!-- /page -->
|
238
222
|
</div> <!-- /container -->
|
metadata
CHANGED
@@ -1,79 +1,61 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequenceserver
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.8
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 7
|
9
|
-
- 7
|
10
|
-
version: 0.7.7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Anurag Priyam
|
14
9
|
- Ben J Woodcroft
|
15
10
|
- Yannick Wurm
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2012-02-21 00:00:00.000000000Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
23
17
|
name: bundler
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &21083000 !ruby/object:Gem::Requirement
|
26
19
|
none: false
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
version: "0"
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
34
24
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: sinatra
|
38
25
|
prerelease: false
|
39
|
-
|
26
|
+
version_requirements: *21083000
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sinatra
|
29
|
+
requirement: &21082380 !ruby/object:Gem::Requirement
|
40
30
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 31
|
45
|
-
segments:
|
46
|
-
- 1
|
47
|
-
- 2
|
48
|
-
- 0
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
49
34
|
version: 1.2.0
|
50
35
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: ptools
|
54
36
|
prerelease: false
|
55
|
-
|
37
|
+
version_requirements: *21082380
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: ptools
|
40
|
+
requirement: &21081860 !ruby/object:Gem::Requirement
|
56
41
|
none: false
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
segments:
|
62
|
-
- 0
|
63
|
-
version: "0"
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
64
46
|
type: :runtime
|
65
|
-
|
66
|
-
|
67
|
-
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *21081860
|
49
|
+
description: ! 'SequenceServer lets you rapidly set up a BLAST+ server with an intuitive
|
50
|
+
user interface for use locally or over the web.
|
68
51
|
|
52
|
+
'
|
69
53
|
email: anurag08priyam@gmail.com
|
70
|
-
executables:
|
54
|
+
executables:
|
71
55
|
- sequenceserver
|
72
56
|
extensions: []
|
73
|
-
|
74
57
|
extra_rdoc_files: []
|
75
|
-
|
76
|
-
files:
|
58
|
+
files:
|
77
59
|
- lib/sequenceserver.rb
|
78
60
|
- lib/sequenceserver/database_formatter.rb
|
79
61
|
- lib/sequenceserver/sequencehelpers.rb
|
@@ -114,49 +96,31 @@ files:
|
|
114
96
|
- sequenceserver.gemspec
|
115
97
|
- bin/sequenceserver
|
116
98
|
homepage: http://sequenceserver.com
|
117
|
-
licenses:
|
99
|
+
licenses:
|
118
100
|
- SequenceServer (custom)
|
119
|
-
post_install_message:
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
To launch SequenceServer execute 'sequenceserver' from command line.
|
125
|
-
|
126
|
-
$ sequenceserver
|
127
|
-
|
128
|
-
|
129
|
-
Visit http://sequenceserver.com for more.
|
130
|
-
------------------------------------------------------------------------
|
131
|
-
|
101
|
+
post_install_message: ! "\n------------------------------------------------------------------------\n
|
102
|
+
\ Thank you for installing SequenceServer :)!\n\n To launch SequenceServer execute
|
103
|
+
'sequenceserver' from command line.\n\n $ sequenceserver\n\n\n Visit http://sequenceserver.com
|
104
|
+
for more.\n------------------------------------------------------------------------\n\n"
|
132
105
|
rdoc_options: []
|
133
|
-
|
134
|
-
require_paths:
|
106
|
+
require_paths:
|
135
107
|
- lib
|
136
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
109
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
- 0
|
144
|
-
version: "0"
|
145
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
115
|
none: false
|
147
|
-
requirements:
|
148
|
-
- -
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
|
151
|
-
segments:
|
152
|
-
- 0
|
153
|
-
version: "0"
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
154
120
|
requirements: []
|
155
|
-
|
156
121
|
rubyforge_project:
|
157
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.10
|
158
123
|
signing_key:
|
159
124
|
specification_version: 3
|
160
125
|
summary: iPod of BLAST searching
|
161
126
|
test_files: []
|
162
|
-
|