miga-base 1.3.13.3 → 1.3.13.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/lib/miga/cli/action/doctor/base.rb +3 -2
- data/lib/miga/cli/action/get.rb +6 -2
- data/lib/miga/cli.rb +6 -1
- data/lib/miga/version.rb +2 -2
- data/scripts/aai_distances.bash +2 -4
- data/scripts/haai_distances.bash +3 -0
- data/scripts/project_stats.bash +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1685116a04fec8af54d7f61494d8465fe51ae333620b36e5733094dfe3cb084
|
4
|
+
data.tar.gz: 3b88d700bab3819fc510e433855c86c1dad22a237364397e0cc32cec79caa673
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341e70012a81c98836843ca5ff286b293f9cd5ae381636b7936943bad6118bbacd4af7e854dfaf944ee19aa56a975290a0734e791c29fca94a7df03c73d6e481
|
7
|
+
data.tar.gz: ab555131f4e7863b0409c2d89f6d493b539482afb075e19b172755d645ecd736491266f0a74dace121583c356a3b94216f605ab419268b84517488d7c2d4c458
|
@@ -37,10 +37,11 @@ module MiGA::Cli::Action::Doctor::Base
|
|
37
37
|
return if fix.empty?
|
38
38
|
|
39
39
|
cli.say("- Fixing #{fix.size} datasets")
|
40
|
-
fix
|
41
|
-
cli.advance(' > Fixing',
|
40
|
+
MiGA::Parallel.distribute(fix, cli[:threads]) do |d_n, idx, thr|
|
41
|
+
cli.advance(' > Fixing', idx + 1, fix.size, false) if thr == 0
|
42
42
|
p.dataset(d_n).cleanup_distances!
|
43
43
|
end
|
44
|
+
cli.say
|
44
45
|
end
|
45
46
|
|
46
47
|
##
|
data/lib/miga/cli/action/get.rb
CHANGED
@@ -77,6 +77,9 @@ class MiGA::Cli::Action::Get < MiGA::Cli::Action
|
|
77
77
|
'Path to an NCBI Taxonomy dump directory to query instead of API calls',
|
78
78
|
'If the path is not passed, the dump is automatically downloaded'
|
79
79
|
) { |v| cli[:ncbi_taxonomy_dump] = v || true }
|
80
|
+
opt.on(
|
81
|
+
'--ignore-file', '::HIDE::' # Only for internal use
|
82
|
+
) { |v| cli[:ignore_file] = v }
|
80
83
|
end
|
81
84
|
end
|
82
85
|
|
@@ -100,9 +103,10 @@ class MiGA::Cli::Action::Get < MiGA::Cli::Action
|
|
100
103
|
private
|
101
104
|
|
102
105
|
def get_sub_cli
|
103
|
-
return [cli] if cli[:file].nil?
|
106
|
+
return [cli] if cli[:file].nil? || cli[:ignore_file]
|
104
107
|
|
105
108
|
glob = []
|
109
|
+
cli_default = cli.original_argv + ['--ignore-file']
|
106
110
|
File.open(cli[:file], 'r') do |fh|
|
107
111
|
h = nil
|
108
112
|
fh.each do |ln|
|
@@ -110,7 +114,7 @@ class MiGA::Cli::Action::Get < MiGA::Cli::Action
|
|
110
114
|
if h.nil?
|
111
115
|
h = r
|
112
116
|
else
|
113
|
-
argv_i =
|
117
|
+
argv_i = cli_default.dup
|
114
118
|
h.each_with_index do |field, k|
|
115
119
|
case field.downcase
|
116
120
|
when *%w[query ignore-dup get-metadata only-metadata]
|
data/lib/miga/cli.rb
CHANGED
@@ -19,9 +19,13 @@ class MiGA::Cli < MiGA::MiGA
|
|
19
19
|
attr_accessor :task
|
20
20
|
|
21
21
|
##
|
22
|
-
# The CLI parameters (except the task),
|
22
|
+
# The unparsed CLI parameters (except the task), an Array of String
|
23
23
|
attr_accessor :argv
|
24
24
|
|
25
|
+
##
|
26
|
+
# The original ARGV passed to the CLI, an Array of String
|
27
|
+
attr_accessor :original_argv
|
28
|
+
|
25
29
|
##
|
26
30
|
# Action to launch, an object inheriting from MiGA::Cli::Action
|
27
31
|
attr_accessor :action
|
@@ -62,6 +66,7 @@ class MiGA::Cli < MiGA::MiGA
|
|
62
66
|
@data = {}
|
63
67
|
@defaults = { verbose: false, tabular: false }
|
64
68
|
@opt_common = true
|
69
|
+
@original_argv = argv.dup
|
65
70
|
@objects = {}
|
66
71
|
if argv[0].nil? or argv[0].to_s[0] == '-'
|
67
72
|
@task = :generic
|
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, 13,
|
15
|
+
VERSION = [1.3, 13, 5].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, 3,
|
23
|
+
VERSION_DATE = Date.new(2024, 3, 20)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
data/scripts/aai_distances.bash
CHANGED
@@ -24,10 +24,8 @@ function aai_tsv {
|
|
24
24
|
echo "a b value sd n omega" | tr " " "\\t"
|
25
25
|
if [[ ${#DS[@]} -gt 40000 ]] ; then
|
26
26
|
# Use comparisons in strictly one direction only for huge projects
|
27
|
-
|
28
|
-
|
29
|
-
{ if ($1 > $2) { a=$1; $1=$2; $2=a; } } { print $0 }' \
|
30
|
-
| sort -k 1,2 -u
|
27
|
+
# (assuming the distances are truly bidirectional!)
|
28
|
+
foreach_database_aai | awk -F"\t" '$1 >= $2'
|
31
29
|
else
|
32
30
|
foreach_database_aai
|
33
31
|
fi
|
data/scripts/haai_distances.bash
CHANGED
@@ -12,6 +12,9 @@ miga_start_project_step "$DIR"
|
|
12
12
|
# Cleanup databases
|
13
13
|
ruby -I "$MIGA/lib" "$MIGA/utils/cleanup-databases.rb" "$PROJECT" "$CORES"
|
14
14
|
|
15
|
+
# Ensure bidirectional reference distances
|
16
|
+
miga doctor -P "$PROJECT" --only bidirectional -v -t "$CORES"
|
17
|
+
|
15
18
|
# No real need for hAAI distributions at all
|
16
19
|
echo -n "" > miga-project.log
|
17
20
|
echo -n "" > miga-project.txt
|
data/scripts/project_stats.bash
CHANGED
@@ -9,9 +9,9 @@ DIR="$PROJECT/data/90.stats"
|
|
9
9
|
# Initialize
|
10
10
|
miga_start_project_step "$DIR"
|
11
11
|
|
12
|
-
# Execute doctor
|
12
|
+
# Execute doctor (bidirectional is checked in haai_distances)
|
13
13
|
echo "# Doctor"
|
14
|
-
miga doctor -P "$PROJECT" -t "$CORES" -v
|
14
|
+
miga doctor -P "$PROJECT" -t "$CORES" -v --ignore bidirectional
|
15
15
|
|
16
16
|
# Index taxonomy
|
17
17
|
echo "# Index taxonomy"
|
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.13.
|
4
|
+
version: 1.3.13.5
|
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-03-
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|