miga-base 0.7.5.0 → 0.7.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6361b203b4612214936255e8b285959cbf556e7e64f88119a058e167774264f9
4
- data.tar.gz: 1a3d8df11d57a363a49eecc88011a5337ddb40573cf8727942eea24e5071ecf5
3
+ metadata.gz: 2b881cdffbe06953931fafa52599b97d7e8b66d17fb37ca3d16d774df4162f23
4
+ data.tar.gz: 57253881d9af0a362102853d8bd8e876ad8da50f496eff72a77cac0a20fad46a
5
5
  SHA512:
6
- metadata.gz: 53786e1830ed8b3c56bffbf1fc581745185084e96b68631323b01fd9994c2b59cdeac582c2f4cef8d0ed622136a2c2cf4f68e06cc3a9e7dbf580d10d1aedc9e5
7
- data.tar.gz: 26322daf6a52906466c4f28cc93ef455bac22e98e115fc6f6b3ad685998d58854454c8044126491e5a886910ce5ddceece2713e94acafaf86459442970617f4f
6
+ metadata.gz: 39a1a13da018cee4512620b014c140f3a661ee0fe658fd8d1d5d727884116d872bc45b77e23a50045e133c8d901acf51edb5a27ec1706d2c9f0ffb5e96969535
7
+ data.tar.gz: d34f900c757d290d143846bd77c4d6dc331b7cbfdadea7170c6ca9421dc8b112991c2e664658d11b2e36d312bb0d8e588321e29c97642d968defc580deaa00c9
@@ -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(cli,
70
- "echo #{cmd.shellescape} | #{paths['R'].shellescape} --vanilla -q 2>&1")
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(cli,
85
- "#{paths['ruby'].shellescape} -r #{pkg.shellescape} -e '' 2>/dev/null")
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(cli, "#{paths['ruby'].shellescape} \
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.expand_path('utils/requirements.txt', MiGA.root_path)
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["MyTaxa"]
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.\nExecute 'python2 #{mt}/utils/download_db.py'."
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.\nDownload " \
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
@@ -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, 5, 0]
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, 13)
19
+ VERSION_DATE = Date.new(2020, 5, 19)
20
20
 
21
21
  ##
22
22
  # Reference of MiGA.
@@ -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 o:Ortervirales f:Retroviridae ' \
35
- 'g:Lentivirus s:Human_immunodeficiency_virus_2',
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: o:Ortervirales f:Retroviridae ' \
40
- 'g:Lentivirus s:Human_immunodeficiency_virus_2 ssp: str: ds:',
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.5.0
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-13 00:00:00.000000000 Z
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.4'
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.4'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement