unipept 0.3.4 → 0.3.5
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/bin/unipept +8 -6
- 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: 912794c26e712f70f1db0cb0946d87479a1c4dae
|
|
4
|
+
data.tar.gz: 44adc715b0704425d542ca0450c4e523df0f19d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7dea9e6717f0f3b18510ae53b21c040412c4d25db3525fdd13baa660df72c24c44a6f9f5981301f3fc0352768821826acb082712652d9d2fb4d30b51f22527e
|
|
7
|
+
data.tar.gz: 911afafcbb596b5d66e86c3cdec7ab4022622f635ff0edad85fbfce587949708feb85a2f33b51e0bfdfd4cddb1bb246905bd1dbf40d25db2f181383163030ecc
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.5
|
data/bin/unipept
CHANGED
|
@@ -94,11 +94,13 @@ class ApiRunner < Cri::CommandRunner
|
|
|
94
94
|
|
|
95
95
|
# wait till it's our turn to write
|
|
96
96
|
batch_order.wait(i) do
|
|
97
|
-
if !
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
if ! sub_result.empty?
|
|
98
|
+
if ! printed_header
|
|
99
|
+
write_to_output formatter.header(sub_result)
|
|
100
|
+
printed_header = true
|
|
101
|
+
end
|
|
102
|
+
write_to_output formatter.format(sub_result)
|
|
100
103
|
end
|
|
101
|
-
write_to_output formatter.format(sub_result)
|
|
102
104
|
end
|
|
103
105
|
else
|
|
104
106
|
path = File.expand_path(File.join(Dir.home, "unipept.log"))
|
|
@@ -143,7 +145,7 @@ class ApiRunner < Cri::CommandRunner
|
|
|
143
145
|
def download_xml(result)
|
|
144
146
|
if options[:xml]
|
|
145
147
|
File.open(options[:xml] + ".xml", "wb") do |f|
|
|
146
|
-
f.write
|
|
148
|
+
f.write Typhoeus.get("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=#{result.first.map{|h| h['taxon_id'] }.join(",")}&retmode=xml").response_body
|
|
147
149
|
end
|
|
148
150
|
end
|
|
149
151
|
end
|
|
@@ -195,7 +197,7 @@ class Pept2prot < ApiRunner
|
|
|
195
197
|
FileUtils.mkdir_p(options[:xml])
|
|
196
198
|
result.first.each do |prot|
|
|
197
199
|
File.open(options[:xml] + "/#{prot['uniprot_id']}.xml", "wb") do |f|
|
|
198
|
-
f.write
|
|
200
|
+
f.write Typhoeus.get("http://www.uniprot.org/uniprot/#{prot['uniprot_id']}.xml").response_body
|
|
199
201
|
end
|
|
200
202
|
end
|
|
201
203
|
end
|