miga-base 1.3.13.3 → 1.3.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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: bdf054cb57b5a84d9ffb450b440a4dc6310e8aaf826d9b2160f0eecabce16385
|
4
|
+
data.tar.gz: 237517417fa21ad566df29aa9da67a8307b8b6a3988b0fae16fd4b594d2cc6f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae8695fab93405b5bb96063c35b12218eed2c78fcea1b2f308589bf29e600c7fbd89515cff59fc1b378b090b0786d55d627444d88810c7c25b202c0d772a310
|
7
|
+
data.tar.gz: 923d60bb47caeab98c9b062dc8af575e8dbe2950cf0602e123cfe8e7533ccdb0aaa5034d1bf0006d5e5f418f7004777c08f861a1e2eb9d143a79044ece69a2d3
|
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, 4].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.4
|
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
|