Skip to content

Commit

Permalink
Prevent incomplete AAI/ANI tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Apr 15, 2024
1 parent 270d367 commit 33ff2fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
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, 14, 5].freeze
VERSION = [1.3, 14, 6].freeze

##
# Nickname for the current major.minor version.
Expand Down
14 changes: 5 additions & 9 deletions scripts/aai_distances.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@ function aai_tsv {
fi
}

if [[ ! -s "miga-project.txt.gz" ]] ; then
rm -f "miga-project.txt"
aai_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
| gzip -9c > "miga-project.txt.gz"
LNO=$(cat "miga-project.txt.lno")
rm "miga-project.txt.lno"
else
LNO=$(gzip -cd "miga-project.txt.gz" | wc -l | awk '{print $1-1}')
fi
rm -f "miga-project.txt"
aai_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
| gzip -9c > "miga-project.txt.gz"
LNO=$(cat "miga-project.txt.lno")
rm "miga-project.txt.lno"

# R-ify
cat <<R | R --vanilla
Expand Down
14 changes: 5 additions & 9 deletions scripts/ani_distances.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ function ani_tsv {
foreach_database_ani
}

if [[ ! -s "miga-project.txt.gz" ]] ; then
rm -f "miga-project.txt"
ani_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
| gzip -9c > "miga-project.txt.gz"
LNO=$(cat "miga-project.txt.lno")
rm "miga-project.txt.lno"
else
LNO=$(gzip -cd "miga-project.txt.gz" | wc -l | awk '{print $1-1}')
fi
rm -f "miga-project.txt"
ani_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
| gzip -9c > "miga-project.txt.gz"
LNO=$(cat "miga-project.txt.lno")
rm "miga-project.txt.lno"

# R-ify
cat <<R | R --vanilla
Expand Down

0 comments on commit 33ff2fc

Please sign in to comment.