Skip to content

Commit

Permalink
Add reference project to distances versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Sep 28, 2024
1 parent a3635c4 commit cb7bd02
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/miga/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def daemon
def option_by_metadata(key)
case key.to_sym
when :ref_project, :db_proj_dir
y = metadata[key]
y = File.expand_path(y, path) if y && y =~ /^[^\/]/
y = metadata[key] or return
y = File.expand_path(y, path)
return y
end

Expand Down
2 changes: 1 addition & 1 deletion lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 21, 0].freeze
VERSION = [1.3, 21, 1].freeze

##
# Nickname for the current major.minor version.
Expand Down
13 changes: 13 additions & 0 deletions scripts/distances.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ fi
ruby -I "$MIGA/lib" "$MIGA/utils/distances.rb" "$PROJECT" "$DATASET"

# Finalize
refproject=no
fastaai=no
aai=no
ani=no
blast=no
blat=no
diamond=no
fastani=no
REF_PROJECT=$(miga option -P "$PROJECT" -D "$DATASET" -k db_project)

[[ -d "$REF_PROJECT" ]] && refproject=yes

if [[ ! -s "${DATASET}.empty" ]] ; then
case $(miga option -P "$PROJECT" -k haai_p) in
fastaai)
Expand Down Expand Up @@ -76,6 +81,14 @@ cat <<VERSIONS \
| miga add_result -P "$PROJECT" -D "$DATASET" -r "$SCRIPT" -f --stdin-versions
=> MiGA
$(miga --version)
$(
if [[ "$refproject" == "yes" ]] ; then
echo "=> Reference Project"
miga about -P "$REF_PROJECT" -m name
echo "=> Reference Project Release"
miga about -P "$REF_PROJECT" -m release
fi
)
$(
if [[ "$fastaai" == "yes" ]] ; then
echo "=> FastAAI"
Expand Down
1 change: 1 addition & 0 deletions scripts/taxonomy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ blat=no
diamond=no
fastani=no
REF_PROJECT=$(miga option -P "$PROJECT" -k ref_project)

if [[ -d "$REF_PROJECT" ]] ; then
refproject=yes

Expand Down

0 comments on commit cb7bd02

Please sign in to comment.