ms-uniprot 0.1.0
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.
- data/History +4 -0
- data/MIT-LICENSE +22 -0
- data/README +22 -0
- data/lib/ms/uniprot/entry.rb +39 -0
- data/tap.yml +0 -0
- metadata +83 -0
data/History
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2009, Regents of the University of Colorado.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
= {Ms-Uniprot}[http://mspire.rubyforge.org/projects/ms-uniprot]
|
2
|
+
|
3
|
+
An {Mspire}[http://mspire.rubyforge.org] library for working with {UniProt}[http://www.uniprot.org/].
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
* Lighthouse[http://bahuvrihi.lighthouseapp.com/projects/16692-mspire/tickets]
|
8
|
+
* Github[http://github.com/bahuvrihi/ms-uniprot/tree/master]
|
9
|
+
* {Google Group}[http://groups.google.com/group/mspire-forum]
|
10
|
+
|
11
|
+
== Installation
|
12
|
+
|
13
|
+
Ms-Uniprot is available as a gem on RubyForge[http://rubyforge.org/projects/mspire]. Use:
|
14
|
+
|
15
|
+
% gem install ms-uniprot
|
16
|
+
|
17
|
+
== Info
|
18
|
+
|
19
|
+
Copyright (c) 2009, Regents of the University of Colorado.
|
20
|
+
Developer:: {Simon Chiang}[http://bahuvrihi.wordpress.com], {Biomolecular Structure Program}[http://biomol.uchsc.edu/], {Hansen Lab}[http://hsc-proteomics.uchsc.edu/hansenlab/]
|
21
|
+
Support:: CU Denver School of Medicine Deans Academic Enrichment Fund
|
22
|
+
Licence:: {MIT-Style}[link:files/MIT-LICENSE.html]
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
module Ms
|
4
|
+
module Uniprot
|
5
|
+
|
6
|
+
# :startdoc::manifest gets a UniProt entry
|
7
|
+
#
|
8
|
+
# Retrieves the UniProt entry for the specified accession number by making
|
9
|
+
# an HTTP get request to the UniProt website. The format obviously
|
10
|
+
# specifies the result format; different formats typically contain
|
11
|
+
# different information. These are the available formats (02/2009):
|
12
|
+
#
|
13
|
+
# * fasta
|
14
|
+
# * txt
|
15
|
+
# * xml
|
16
|
+
# * rdf
|
17
|
+
# * gff
|
18
|
+
#
|
19
|
+
# Examples:
|
20
|
+
#
|
21
|
+
# % rap uniprot/entry P08246 --: dump
|
22
|
+
# % rap uniprot/entry P08246 --format xml --: dump
|
23
|
+
#
|
24
|
+
class Entry < Tap::Task
|
25
|
+
FORMATS = %w{fasta txt xml rdf gff}
|
26
|
+
|
27
|
+
config :uniprot_url, "http://www.uniprot.org/" # The url of UniProt
|
28
|
+
config :format, 'fasta', &c.select(*FORMATS) # The entry format
|
29
|
+
|
30
|
+
def uri(accession)
|
31
|
+
File.join(uniprot_url, "uniprot", "#{accession}.#{format}")
|
32
|
+
end
|
33
|
+
|
34
|
+
def process(accession)
|
35
|
+
Net::HTTP.get URI.parse(uri(accession))
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/tap.yml
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ms-uniprot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Simon Chiang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-03-30 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: configurable
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.4.2
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: tap
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.12.4
|
34
|
+
version:
|
35
|
+
description:
|
36
|
+
email: simon.a.chiang@gmail.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- History
|
43
|
+
- README
|
44
|
+
- MIT-LICENSE
|
45
|
+
files:
|
46
|
+
- lib/ms/uniprot/entry.rb
|
47
|
+
- tap.yml
|
48
|
+
- History
|
49
|
+
- README
|
50
|
+
- MIT-LICENSE
|
51
|
+
has_rdoc: true
|
52
|
+
homepage: http://rubyforge.org/projects/ms-uniprot/
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options:
|
55
|
+
- --main
|
56
|
+
- README
|
57
|
+
- -S
|
58
|
+
- -N
|
59
|
+
- --title
|
60
|
+
- Ms-Uniprot
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
version:
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
75
|
+
requirements: []
|
76
|
+
|
77
|
+
rubyforge_project: mspire
|
78
|
+
rubygems_version: 1.3.1
|
79
|
+
signing_key:
|
80
|
+
specification_version: 2
|
81
|
+
summary: ms-uniprot
|
82
|
+
test_files: []
|
83
|
+
|