unipept 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +25 -26
- data/VERSION +1 -1
- data/bin/prot2pept +1 -1
- data/bin/unipept +1 -1
- data/bin/uniprot +13 -9
- data/lib/unipept/api_runner.rb +7 -7
- data/unipept.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc51bfb9426c0e63f031b38e701e8629d2752ca5
|
4
|
+
data.tar.gz: 3d09c51e3487bab60beab0bf14382b00d8a517eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbc63fb2023bcb9b5b09fafe67f01e24565da71aa65893057c21fecd8e1dca895f63561a0e381d19f847149f233cbbd6e91a5311a4be98fd06de0e87ff0ddc10
|
7
|
+
data.tar.gz: 0744d0dabccfe1baa1eb5cec427724eff403d16c84324ea8ed58c30599bd853407d253c8deb2ece8ebcec9818aa42c186b54dd24e8cdb1146a5bb8e87ec937f9
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (4.
|
5
|
-
i18n (~> 0.6, >= 0.6.
|
6
|
-
|
7
|
-
|
4
|
+
activesupport (4.1.1)
|
5
|
+
i18n (~> 0.6, >= 0.6.9)
|
6
|
+
json (~> 1.7, >= 1.7.7)
|
7
|
+
minitest (~> 5.1)
|
8
8
|
thread_safe (~> 0.1)
|
9
|
-
tzinfo (~>
|
10
|
-
addressable (2.3.
|
11
|
-
atomic (1.1.15)
|
9
|
+
tzinfo (~> 1.1)
|
10
|
+
addressable (2.3.6)
|
12
11
|
builder (3.2.2)
|
13
|
-
descendants_tracker (0.0.
|
14
|
-
|
12
|
+
descendants_tracker (0.0.4)
|
13
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
14
|
+
docile (1.1.5)
|
15
15
|
faraday (0.9.0)
|
16
16
|
multipart-post (>= 1.2, < 3)
|
17
|
-
git (1.2.
|
17
|
+
git (1.2.7)
|
18
18
|
github_api (0.11.3)
|
19
19
|
addressable (~> 2.3)
|
20
20
|
descendants_tracker (~> 0.0.1)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
multi_json (>= 1.7.5, < 2.0)
|
24
24
|
nokogiri (~> 1.6.0)
|
25
25
|
oauth2
|
26
|
-
hashie (
|
26
|
+
hashie (3.0.0)
|
27
27
|
highline (1.6.21)
|
28
28
|
i18n (0.6.9)
|
29
29
|
jeweler (2.0.1)
|
@@ -36,39 +36,38 @@ GEM
|
|
36
36
|
rake
|
37
37
|
rdoc
|
38
38
|
json (1.8.1)
|
39
|
-
jwt (0.
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
multi_json (1.9.0)
|
39
|
+
jwt (1.0.0)
|
40
|
+
mini_portile (0.6.0)
|
41
|
+
minitest (5.3.5)
|
42
|
+
multi_json (1.10.1)
|
44
43
|
multi_xml (0.5.5)
|
45
44
|
multipart-post (2.0.0)
|
46
|
-
nokogiri (1.6.1)
|
47
|
-
mini_portile (
|
48
|
-
oauth2 (0.9.
|
45
|
+
nokogiri (1.6.2.1)
|
46
|
+
mini_portile (= 0.6.0)
|
47
|
+
oauth2 (0.9.4)
|
49
48
|
faraday (>= 0.8, < 0.10)
|
50
|
-
jwt (~>
|
49
|
+
jwt (~> 1.0)
|
51
50
|
multi_json (~> 1.3)
|
52
51
|
multi_xml (~> 0.5)
|
53
52
|
rack (~> 1.2)
|
54
53
|
rack (1.5.2)
|
55
|
-
rake (10.
|
54
|
+
rake (10.3.2)
|
56
55
|
rdoc (3.12.2)
|
57
56
|
json (~> 1.4)
|
58
57
|
shoulda (3.5.0)
|
59
58
|
shoulda-context (~> 1.0, >= 1.0.1)
|
60
59
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
61
|
-
shoulda-context (1.1
|
62
|
-
shoulda-matchers (2.
|
60
|
+
shoulda-context (1.2.1)
|
61
|
+
shoulda-matchers (2.6.1)
|
63
62
|
activesupport (>= 3.0.0)
|
64
63
|
simplecov (0.8.2)
|
65
64
|
docile (~> 1.1.0)
|
66
65
|
multi_json
|
67
66
|
simplecov-html (~> 0.8.0)
|
68
67
|
simplecov-html (0.8.0)
|
69
|
-
thread_safe (0.
|
70
|
-
|
71
|
-
|
68
|
+
thread_safe (0.3.4)
|
69
|
+
tzinfo (1.2.1)
|
70
|
+
thread_safe (~> 0.1)
|
72
71
|
|
73
72
|
PLATFORMS
|
74
73
|
ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.7
|
data/bin/prot2pept
CHANGED
@@ -9,7 +9,7 @@ root_cmd = Cri::Command.new_basic_root.modify do
|
|
9
9
|
run do |opts, args, cmd|
|
10
10
|
pattern = opts.fetch(:pattern, "([KR])([^P])")
|
11
11
|
# decide if we have FASTA input
|
12
|
-
fasta_header = gets
|
12
|
+
fasta_header = $stdin.gets
|
13
13
|
if fasta_header.start_with? '>'
|
14
14
|
# fasta input, need to join lines
|
15
15
|
while !$stdin.eof?
|
data/bin/unipept
CHANGED
@@ -66,7 +66,7 @@ root_cmd = Cri::Command.new_basic_root.modify do
|
|
66
66
|
option :f, :format, "output format (available: #{Unipept::Formatter.available.join "," }) (default: #{Unipept::Formatter.default})", :argument => :required
|
67
67
|
|
68
68
|
# Configuration options
|
69
|
-
option nil, "
|
69
|
+
option nil, "host", "Override host setting", argument: :required
|
70
70
|
|
71
71
|
run do |opts, args, cmd|
|
72
72
|
if opts[:version]
|
data/bin/uniprot
CHANGED
@@ -16,14 +16,18 @@ def get_uniprot_entry(arg, fasta = false)
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
root_cmd = Cri::Command.new_basic_root.modify do
|
20
|
+
name 'uniprot'
|
21
|
+
description 'Download protein sequence from uniprot.org'
|
22
|
+
required :f, :format, "specify output format (available: fasta, plain)"
|
23
|
+
run do |opts, args, cmd|
|
24
|
+
fasta = opts[:format] == 'fasta'
|
25
|
+
iterator = args.empty? ? $stdin.each_line : args
|
26
|
+
iterator.each do |pept|
|
27
|
+
get_uniprot_entry(pept.chomp, fasta)
|
28
|
+
end
|
28
29
|
end
|
29
30
|
end
|
31
|
+
|
32
|
+
# run_this runs this command without subcommands! Absolutely needed here
|
33
|
+
root_cmd.run_this(ARGV)
|
data/lib/unipept/api_runner.rb
CHANGED
@@ -13,8 +13,8 @@ module Unipept
|
|
13
13
|
|
14
14
|
def set_configuration
|
15
15
|
# find host in opts first
|
16
|
-
if options[:
|
17
|
-
host = options[:
|
16
|
+
if options[:host]
|
17
|
+
host = options[:host]
|
18
18
|
else
|
19
19
|
host = @configuration['host']
|
20
20
|
end
|
@@ -86,8 +86,8 @@ module Unipept
|
|
86
86
|
peptides = input_iterator
|
87
87
|
|
88
88
|
filter_list = options[:select] ? options[:select] : []
|
89
|
-
|
90
|
-
|
89
|
+
# Parse filter list: convert to regex and split on commas
|
90
|
+
filter_list = filter_list.map { |f| f.include?(",") ? f.split(",") : f }.flatten.map { |f| glob_to_regex(f) }
|
91
91
|
|
92
92
|
batch_order = Unipept::BatchOrder.new
|
93
93
|
|
@@ -214,9 +214,9 @@ module Unipept
|
|
214
214
|
|
215
215
|
private
|
216
216
|
|
217
|
-
def glob_to_regex(
|
218
|
-
|
219
|
-
Regexp.new glob_string.gsub("*", ".*")
|
217
|
+
def glob_to_regex(string)
|
218
|
+
/^#{string.gsub('*','.*')}$/
|
220
219
|
end
|
220
|
+
|
221
221
|
end
|
222
222
|
end
|
data/unipept.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: unipept 0.5.
|
5
|
+
# stub: unipept 0.5.7 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "unipept"
|
9
|
-
s.version = "0.5.
|
9
|
+
s.version = "0.5.7"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|