From 33ff2fce0cdc4fd5168ef2d476321ee06db84b32 Mon Sep 17 00:00:00 2001 From: "Luis M. Rodriguez-R" Date: Mon, 15 Apr 2024 23:39:17 +0200 Subject: [PATCH] Prevent incomplete AAI/ANI tables --- lib/miga/version.rb | 2 +- scripts/aai_distances.bash | 14 +++++--------- scripts/ani_distances.bash | 14 +++++--------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/lib/miga/version.rb b/lib/miga/version.rb index a07c386..ce9735a 100644 --- a/lib/miga/version.rb +++ b/lib/miga/version.rb @@ -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. diff --git a/scripts/aai_distances.bash b/scripts/aai_distances.bash index 8368139..e909f50 100755 --- a/scripts/aai_distances.bash +++ b/scripts/aai_distances.bash @@ -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 <(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 <