From 561f88be60a439b7e24ed4c67a42815227024fa3 Mon Sep 17 00:00:00 2001
From: Guoyi Zhang <kuoi@bioarchlinux.org>
Date: Sat, 5 Apr 2025 18:04:33 +1100
Subject: [PATCH] polish: just add warn to polytomy

---
 README.md |  6 ++++--
 guoyi.run | 16 ++++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 6dafabf..f715540 100644
--- a/README.md
+++ b/README.md
@@ -52,11 +52,13 @@ tnt run guoyi.run filename datatype weight 0/K cons resample prefix,
 
 - cons should be `str`, `mjr`, `hlf`  
 
-  -  mjr=majority rule, hlf=half, str=strict (default)                   
+  -  mjr=majority rule, hlf=ea, str=strict (default)                   
 
 - resample should be sum of what you want
 
-  -  relative bremer support (rbrs)=0.1, bremer support (brs)=0.2, jackknifing (jak)=1, bootstrap (boot)=2, symmetric resampling (sym)=4 i.e. rbrs+jak+boot+sym=7.1 (default)       
+  -  relative bremer support (rbrs)=0.1, bremer support (brs)=0.2, jackknifing (jak)=1, bootstrap (boot)=2, symmetric resampling (sym)=4 i.e. jak+boot+sym=7 (default) 
+
+  -  Notice: Bremer related support would change the tree topology, so it should be used with caution.
 
 - prefix can  be empty or a string
 
diff --git a/guoyi.run b/guoyi.run
index bd47a27..9bcdd92 100644
--- a/guoyi.run
+++ b/guoyi.run
@@ -111,7 +111,7 @@ end
 
 /*handle resmaple type*/
 if (argnumber<6)
-  set dojak 1; set doboot 1; set dosym 1; set dorbrs 1;
+  set dojak 1; set doboot 1; set dosym 1; set dorbrs 0;
 else
   set rsmp %6;
   loop 1 5
@@ -356,7 +356,6 @@ set contree ntrees;
 /*Store consensus tree to tree vault*/
 hold /+0; 
 tv>/;
-tchoose 0.'npars';
 
 /*Get rbr/br/jak/boot/sym support and get consensus tree*/
 ttags=;
@@ -377,18 +376,19 @@ if ('dobremer')
 
   /*calculate relative bremer support*/
   if ('dorbrs')
-  bs *]!! 0.'npars';
+  bs ]!! 0.'npars';
   end
 
   /*calculate bremer support*/
   if ('dobrs')
   macfloat 1; /*set the br value float*/
-  bsupport *!! 0.'npars';
+  bsupport !! 0.'npars';
   end
 
 end
-  
+
 /*Choose final tree*/
+tchoose 0.'npars';
 tv<;
 tchoose /;
 
@@ -549,7 +549,11 @@ if ('dohlf')
   quote
 |          half strict consensus tree with     |;
 end end end
-
+if ('dobremer')
+  quote
+|          WARNING: bremer-related will        |
+|          WARNING: change the polytomy        |;
+end
 if ('dorbrs')
   quote
 |          relative bremer support             |;