From 5b04c7ccf90aa4f314f6f5bb9d9c2dfe649b627b Mon Sep 17 00:00:00 2001
From: Julien Guglielmini <julien.guglielmini@pasteur.fr>
Date: Sat, 5 Mar 2022 17:33:17 +0100
Subject: [PATCH] Fixed final sorting

---
 wGRR | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wGRR b/wGRR
index d61bfbf..0d790bb 100755
--- a/wGRR
+++ b/wGRR
@@ -325,7 +325,7 @@ fi
 duration=$SECONDS
 printf "%-10s  --  %s\n" "[INFO]" "Sorting results"
 printf "%-10s  --  %s\n" "[TIME]" $(textifyDuration $duration)
-sort -u -m "$tmp"/$OUT.wgrr_part.* | $AWKEXE 'BEGIN{print "GenomeA\tGenomeB\twGRR1\tCommon1\tRealLengthA\tRealLengthB\twGRR2\tCommon2\tEffectiveLength1A\tEffectiveLength1B\twGRR3\tCommon3\tEffectiveLength2A\tEffectiveLength2B"}1' > $OUT.wgrr.txt
+sort -m "$tmp"/$OUT.wgrr_part.* | sort -u -k1,1V -k2,2V | $AWKEXE 'BEGIN{print "GenomeA\tGenomeB\twGRR1\tCommon1\tRealLengthA\tRealLengthB\twGRR2\tCommon2\tEffectiveLength1A\tEffectiveLength1B\twGRR3\tCommon3\tEffectiveLength2A\tEffectiveLength2B"}1' > $OUT.wgrr.txt
 
 if [[ ! -f "$OUT".wgrr.txt ]] ; then
 	echo "[ERROR]     --  Failed to sort the wGRR table."
-- 
GitLab