miga-base 1.3.20.11 → 1.3.21.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91302d7d75ccc35b6ff9606f8b6d777f1ed9d003884b1239ccf88d1a60e9cd23
4
- data.tar.gz: d71e38b02f3e54695a4e2c40b07b910ebaf8719511f20fb5c19198aa9b4dbae2
3
+ metadata.gz: 922c48fb762203b174d2bd7448590c1d30a5ce1d14ef877e55f625b57acfb274
4
+ data.tar.gz: edee96be95f283d4bf017e6221ebb73951eb77a9a9041eb957a54ebbf6e517f1
5
5
  SHA512:
6
- metadata.gz: e0df7e189c74f4c791493d04f14000671c40a2fe5d9a50c92985a82eb0b7fe9670205a8d5b01ab7fb158df9836fb5d41040c1cf3ac81321dd66dde84d01adbe3
7
- data.tar.gz: 0f30aac316c440e623405eab59855a3ace6d5bc04e452bfe67d67c1cb486670a48a629e0fd9f631cdd66446907147043d80d03e273423a620074d5a320bd3975
6
+ metadata.gz: 972dd057f0344ca7131fb166333959ecc7352a3aa7672e0a73e07b730a2a5d8003bcc3b1f23644c2a2bdec5ae01f1aa512bf37fcc9448d6612fc5f9205af7fae
7
+ data.tar.gz: e3ff7e91bdc10d0e989d1409d54af3eba821f33c5104e7f1c4ee1ac60b3e30e4b0c2d03170822e94a10063c5a7e648d7b989fb3a8a26e73646dab65a6cabd68b
data/lib/miga/dataset.rb CHANGED
@@ -196,4 +196,19 @@ class MiGA::Dataset < MiGA::MiGA
196
196
  [name, how_many]
197
197
  )
198
198
  end
199
+
200
+ ##
201
+ # Retrieves the option with name +key+ from the dataset's metadata
202
+ # extending support to relative paths in +:db_project+
203
+ def option_by_metadata(key)
204
+ case key.to_sym
205
+ when :db_project
206
+ y = metadata[key] or return
207
+ ref_location = project.option(:db_proj_dir) || File.dirname(project.path)
208
+ y = File.expand_path(y, ref_location)
209
+ return y
210
+ end
211
+
212
+ super
213
+ end
199
214
  end
data/lib/miga/project.rb CHANGED
@@ -143,8 +143,8 @@ class MiGA::Project < MiGA::MiGA
143
143
  def option_by_metadata(key)
144
144
  case key.to_sym
145
145
  when :ref_project, :db_proj_dir
146
- y = metadata[key]
147
- y = File.expand_path(y, path) if y && y =~ /^[^\/]/
146
+ y = metadata[key] or return
147
+ y = File.expand_path(y, path)
148
148
  return y
149
149
  end
150
150
 
data/lib/miga/version.rb CHANGED
@@ -12,7 +12,7 @@ module MiGA
12
12
  # - String indicating release status:
13
13
  # - rc* release candidate, not released as gem
14
14
  # - [0-9]+ stable release, released as gem
15
- VERSION = [1.3, 20, 11].freeze
15
+ VERSION = [1.3, 21, 1].freeze
16
16
 
17
17
  ##
18
18
  # Nickname for the current major.minor version.
@@ -20,7 +20,7 @@ module MiGA
20
20
 
21
21
  ##
22
22
  # Date of the current gem relese.
23
- VERSION_DATE = Date.new(2024, 9, 13)
23
+ VERSION_DATE = Date.new(2024, 9, 28)
24
24
 
25
25
  ##
26
26
  # References of MiGA
@@ -22,6 +22,7 @@ fi
22
22
  ruby -I "$MIGA/lib" "$MIGA/utils/distances.rb" "$PROJECT" "$DATASET"
23
23
 
24
24
  # Finalize
25
+ refproject=no
25
26
  fastaai=no
26
27
  aai=no
27
28
  ani=no
@@ -29,6 +30,10 @@ blast=no
29
30
  blat=no
30
31
  diamond=no
31
32
  fastani=no
33
+ REF_PROJECT=$(miga option -P "$PROJECT" -D "$DATASET" -k db_project)
34
+
35
+ [[ -d "$REF_PROJECT" ]] && refproject=yes
36
+
32
37
  if [[ ! -s "${DATASET}.empty" ]] ; then
33
38
  case $(miga option -P "$PROJECT" -k haai_p) in
34
39
  fastaai)
@@ -76,6 +81,14 @@ cat <<VERSIONS \
76
81
  | miga add_result -P "$PROJECT" -D "$DATASET" -r "$SCRIPT" -f --stdin-versions
77
82
  => MiGA
78
83
  $(miga --version)
84
+ $(
85
+ if [[ "$refproject" == "yes" ]] ; then
86
+ echo "=> Reference Project"
87
+ miga about -P "$REF_PROJECT" -m name
88
+ echo "=> Reference Project Release"
89
+ miga about -P "$REF_PROJECT" -m release
90
+ fi
91
+ )
79
92
  $(
80
93
  if [[ "$fastaai" == "yes" ]] ; then
81
94
  echo "=> FastAAI"
@@ -25,6 +25,7 @@ blat=no
25
25
  diamond=no
26
26
  fastani=no
27
27
  REF_PROJECT=$(miga option -P "$PROJECT" -k ref_project)
28
+
28
29
  if [[ -d "$REF_PROJECT" ]] ; then
29
30
  refproject=yes
30
31
 
@@ -19,9 +19,7 @@ class MiGA::DistanceRunner
19
19
  @ref_project = MiGA::Project.load(ref_path)
20
20
  raise "Cannot load reference project: #{ref_path}" if @ref_project.nil?
21
21
  elsif !opts[:run_taxonomy] && dataset.option(:db_project)
22
- ref_location = project.option(:db_proj_dir) || File.dirname(project.path)
23
- ref_path = File.expand_path(dataset.option(:db_project), ref_location)
24
- @ref_project = MiGA::Project.load(ref_path)
22
+ @ref_project = MiGA::Project.load(dataset.option(:db_project))
25
23
  raise "Cannot load reference project: #{ref_path}" if @ref_project.nil?
26
24
  else
27
25
  @ref_project = project
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: 1.3.20.11
4
+ version: 1.3.21.1
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: 2024-09-13 00:00:00.000000000 Z
11
+ date: 2024-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons