miga-base 0.7.5.0 → 0.7.6.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.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/init.rb +21 -14
- data/lib/miga/version.rb +2 -2
- data/test/remote_dataset_test.rb +6 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b881cdffbe06953931fafa52599b97d7e8b66d17fb37ca3d16d774df4162f23
|
4
|
+
data.tar.gz: 57253881d9af0a362102853d8bd8e876ad8da50f496eff72a77cac0a20fad46a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39a1a13da018cee4512620b014c140f3a661ee0fe658fd8d1d5d727884116d872bc45b77e23a50045e133c8d901acf51edb5a27ec1706d2c9f0ffb5e96969535
|
7
|
+
data.tar.gz: d34f900c757d290d143846bd77c4d6dc331b7cbfdadea7170c6ca9421dc8b112991c2e664658d11b2e36d312bb0d8e588321e29c97642d968defc580deaa00c9
|
data/lib/miga/cli/action/init.rb
CHANGED
@@ -66,8 +66,10 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def run_r_cmd(cli, paths, cmd)
|
69
|
-
run_cmd(
|
70
|
-
|
69
|
+
run_cmd(
|
70
|
+
cli,
|
71
|
+
"echo #{cmd.shellescape} | #{paths['R'].shellescape} --vanilla -q 2>&1"
|
72
|
+
)
|
71
73
|
end
|
72
74
|
|
73
75
|
def test_r_package(cli, paths, pkg)
|
@@ -81,16 +83,21 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
81
83
|
end
|
82
84
|
|
83
85
|
def test_ruby_gem(cli, paths, pkg)
|
84
|
-
run_cmd(
|
85
|
-
|
86
|
+
run_cmd(
|
87
|
+
cli,
|
88
|
+
"#{paths['ruby'].shellescape} -r #{pkg.shellescape} -e '' 2>/dev/null"
|
89
|
+
)
|
86
90
|
$?.success?
|
87
91
|
end
|
88
92
|
|
89
93
|
def install_ruby_gem(cli, paths, pkg)
|
90
94
|
gem_cmd = "Gem::GemRunner.new.run %w(install --user #{pkg})"
|
91
|
-
run_cmd(
|
95
|
+
run_cmd(
|
96
|
+
cli,
|
97
|
+
"#{paths['ruby'].shellescape} \
|
92
98
|
-r rubygems -r rubygems/gem_runner \
|
93
|
-
-e #{gem_cmd.shellescape} 2>&1"
|
99
|
+
-e #{gem_cmd.shellescape} 2>&1"
|
100
|
+
)
|
94
101
|
end
|
95
102
|
|
96
103
|
def list_requirements
|
@@ -99,7 +106,7 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
99
106
|
'no', %w(yes no)
|
100
107
|
) == 'yes'
|
101
108
|
cli.puts ''
|
102
|
-
req_path = File.
|
109
|
+
req_path = File.join(MiGA.root_path, 'utils', 'requirements.txt')
|
103
110
|
File.open(req_path, 'r') do |fh|
|
104
111
|
fh.each_line { |ln| cli.puts ln }
|
105
112
|
end
|
@@ -205,18 +212,18 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
205
212
|
def check_additional_files(paths)
|
206
213
|
if cli[:mytaxa]
|
207
214
|
cli.puts 'Looking for MyTaxa databases:'
|
208
|
-
mt = File.dirname paths[
|
215
|
+
mt = File.dirname paths['MyTaxa']
|
209
216
|
cli.print 'Looking for scores... '
|
210
217
|
unless Dir.exist?(File.expand_path('db', mt))
|
211
|
-
cli.puts "no
|
218
|
+
cli.puts "no\nExecute 'python2 #{mt}/utils/download_db.py'"
|
212
219
|
exit(1)
|
213
220
|
end
|
214
|
-
cli.puts 'yes
|
221
|
+
cli.puts 'yes'
|
215
222
|
cli.print 'Looking for diamond db... '
|
216
223
|
unless File.exist?(File.expand_path('AllGenomes.faa.dmnd', mt))
|
217
|
-
cli.puts "no
|
224
|
+
cli.puts "no\nDownload " \
|
218
225
|
"'http://enve-omics.ce.gatech.edu/data/public_mytaxa/" \
|
219
|
-
"AllGenomes.faa.dmnd' into #{mt}
|
226
|
+
"AllGenomes.faa.dmnd' into #{mt}"
|
220
227
|
exit(1)
|
221
228
|
end
|
222
229
|
cli.puts ''
|
@@ -228,7 +235,7 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
228
235
|
%w(ape cluster vegan).each do |pkg|
|
229
236
|
cli.print "Testing #{pkg}... "
|
230
237
|
if test_r_package(cli, paths, pkg)
|
231
|
-
cli.puts 'yes
|
238
|
+
cli.puts 'yes'
|
232
239
|
else
|
233
240
|
cli.puts 'no, installing'
|
234
241
|
cli.print '' + install_r_package(cli, paths, pkg)
|
@@ -245,7 +252,7 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
|
|
245
252
|
%w(sqlite3 daemons json).each do |pkg|
|
246
253
|
cli.print "Testing #{pkg}... "
|
247
254
|
if test_ruby_gem(cli, paths, pkg)
|
248
|
-
cli.puts 'yes
|
255
|
+
cli.puts 'yes'
|
249
256
|
else
|
250
257
|
cli.puts 'no, installing'
|
251
258
|
# This hackey mess is meant to ensure the test and installation are done
|
data/lib/miga/version.rb
CHANGED
@@ -8,7 +8,7 @@ module MiGA
|
|
8
8
|
# - Float representing the major.minor version.
|
9
9
|
# - Integer representing gem releases of the current version.
|
10
10
|
# - Integer representing minor changes that require new version number.
|
11
|
-
VERSION = [0.7,
|
11
|
+
VERSION = [0.7, 6, 0]
|
12
12
|
|
13
13
|
##
|
14
14
|
# Nickname for the current major.minor version.
|
@@ -16,7 +16,7 @@ module MiGA
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# Date of the current gem release.
|
19
|
-
VERSION_DATE = Date.new(2020, 5,
|
19
|
+
VERSION_DATE = Date.new(2020, 5, 19)
|
20
20
|
|
21
21
|
##
|
22
22
|
# Reference of MiGA.
|
data/test/remote_dataset_test.rb
CHANGED
@@ -31,13 +31,15 @@ class RemoteDatasetTest < Test::Unit::TestCase
|
|
31
31
|
assert_equal(MiGA::Taxonomy, tx.class, msg)
|
32
32
|
assert_equal('Lentivirus', tx[:g], msg)
|
33
33
|
assert_equal(
|
34
|
-
'ns:ncbi
|
35
|
-
'g:Lentivirus
|
34
|
+
'ns:ncbi k:Pararnavirae p:Artverviricota c:Revtraviricetes ' \
|
35
|
+
'o:Ortervirales f:Retroviridae g:Lentivirus ' \
|
36
|
+
's:Human_immunodeficiency_virus_2',
|
36
37
|
tx.to_s, msg
|
37
38
|
)
|
38
39
|
assert_equal(
|
39
|
-
'ns:ncbi d: k: p: c:
|
40
|
-
'
|
40
|
+
'ns:ncbi d: k:Pararnavirae p:Artverviricota c:Revtraviricetes ' \
|
41
|
+
'o:Ortervirales f:Retroviridae g:Lentivirus ' \
|
42
|
+
's:Human_immunodeficiency_virus_2 ssp: str: ds:',
|
41
43
|
tx.to_s(true), msg
|
42
44
|
)
|
43
45
|
assert_equal('ncbi', tx.namespace, msg)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|