unipept 0.5.2 → 0.5.3
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/unipept/api_runner.rb +8 -3
- 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: f2c0a7c05cff467fda34a5a011e8c2a301cfe252
|
4
|
+
data.tar.gz: f0a58a71cb1c07773992fdf562bcc29dec6d2b47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3167ebb88be529deae748259d400b76b20a2ff7425095c5fbf47724da08fc7492193e5fe3c5779dfe1f82f9dfff0460e946e84b9978e07d31a51a966ebf47ab
|
7
|
+
data.tar.gz: a95d748dfaa3cceec4a8456e1e7ba99d972b810f73b6ec5d6703bf7e5d264e7eb3cf9998a0f238c22f18b238d832b940cc2c2a251c1c24c75abfa622596f8062
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/lib/unipept/api_runner.rb
CHANGED
@@ -182,7 +182,7 @@ module Unipept
|
|
182
182
|
end
|
183
183
|
|
184
184
|
def peptide_iterator(peptides, &block)
|
185
|
-
first = peptides.
|
185
|
+
first = peptides.next
|
186
186
|
if first.start_with? '>'
|
187
187
|
# FASTA MODE ENGAGED
|
188
188
|
fasta_header = first
|
@@ -201,9 +201,14 @@ module Unipept
|
|
201
201
|
sub -= fasta_mapper.values.uniq
|
202
202
|
block.call(sub, i, fasta_mapper)
|
203
203
|
end
|
204
|
-
|
205
204
|
else
|
206
|
-
|
205
|
+
# shame we have to be this explicit, but it appears to be the only way
|
206
|
+
Enumerator.new do |y|
|
207
|
+
y << first
|
208
|
+
loop do
|
209
|
+
y << peptides.next
|
210
|
+
end
|
211
|
+
end.each_slice(batch_size).with_index(&block)
|
207
212
|
end
|
208
213
|
end
|
209
214
|
|