unipept 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/peptfilter +2 -2
- data/bin/unipept +19 -12
- data/bin/uniprot +1 -1
- 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: 24fa491dfa6ce5dbfbe53ff9bd7ee63159ff0b8f
|
4
|
+
data.tar.gz: d353c545fdd8db4bb33d873046f4dbf7d2a5fdab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 309a643a2f2f0b98c305e269aae484aa1c9c3dfed0c665a69ab2475dbf9a23b2c0519dae6b6fe5c25ab1e21dbc44fcd65d123c0a231c087242a178eed6f7c693
|
7
|
+
data.tar.gz: 43d0c9c573c2cab2facc26730873401dc07d5c1876b5927e9c226a6356a24189b652a5229292286719f1cae09dbba47f639be5caf72b97067bbd8e8285e00c4f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/bin/peptfilter
CHANGED
@@ -16,8 +16,8 @@ root_cmd = Cri::Command.new_basic_root.modify do
|
|
16
16
|
filtered = $stdin.readlines.select do |pept|
|
17
17
|
pept = pept.chomp
|
18
18
|
length_ok = pept.length >= minlen && pept.length <= maxlen
|
19
|
-
lacks_ok = (pept.chars & lacks).size == 0
|
20
|
-
contains_ok = (pept.chars & contains).size == contains.size
|
19
|
+
lacks_ok = (pept.chars.to_a & lacks).size == 0
|
20
|
+
contains_ok = (pept.chars.to_a & contains).size == contains.size
|
21
21
|
|
22
22
|
length_ok && lacks_ok && contains_ok
|
23
23
|
end
|
data/bin/unipept
CHANGED
@@ -73,7 +73,7 @@ class ApiRunner < Cri::CommandRunner
|
|
73
73
|
printed_header = false
|
74
74
|
result = []
|
75
75
|
|
76
|
-
peptides
|
76
|
+
peptide_iterator(peptides) do |sub_division|
|
77
77
|
begin
|
78
78
|
sub_result = JSON[Faraday.post(@url, url_options(sub_division)).body]
|
79
79
|
rescue
|
@@ -105,18 +105,17 @@ class ApiRunner < Cri::CommandRunner
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def write_to_output(string)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
108
|
+
if options[:output]
|
109
|
+
File.open(options[:output], 'a') do |f|
|
110
|
+
f.write string
|
111
|
+
end
|
112
|
+
else
|
113
|
+
if STDOUT.tty?
|
114
|
+
progress.log string
|
112
115
|
else
|
113
|
-
|
114
|
-
progress.log string
|
115
|
-
else
|
116
|
-
puts string
|
117
|
-
end
|
116
|
+
puts string
|
118
117
|
end
|
119
|
-
|
118
|
+
end
|
120
119
|
end
|
121
120
|
|
122
121
|
|
@@ -128,6 +127,10 @@ class ApiRunner < Cri::CommandRunner
|
|
128
127
|
end
|
129
128
|
end
|
130
129
|
|
130
|
+
def peptide_iterator(peptides, &block)
|
131
|
+
peptides.each_slice(batch_size, &block)
|
132
|
+
end
|
133
|
+
|
131
134
|
private
|
132
135
|
|
133
136
|
def glob_to_regex(glob_string)
|
@@ -146,8 +149,12 @@ class Taxa2lca < ApiRunner
|
|
146
149
|
{:taxon_ids => sub_part, :full_lineage => options[:lineage]}
|
147
150
|
end
|
148
151
|
|
152
|
+
def peptide_iterator(peptides, &block)
|
153
|
+
block.call(peptides)
|
154
|
+
end
|
155
|
+
|
149
156
|
def batch_size
|
150
|
-
|
157
|
+
raise "NOT NEEDED FOR TAXA2LCA"
|
151
158
|
end
|
152
159
|
|
153
160
|
end
|
data/bin/uniprot
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unipept
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toon Willems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|