diff --git a/tools/raxmlng/raxmlng.xml b/tools/raxmlng/raxmlng.xml
index fda00f0c8e4..db8ff52a9da 100644
--- a/tools/raxmlng/raxmlng.xml
+++ b/tools/raxmlng/raxmlng.xml
@@ -1,8 +1,9 @@
Maximum Likelihood based inference of large phylogenetic trees
- 1.2.2
- 1
+ 2.0.0
+ 0
+ raxmlng_macros.xml
RAxML-NG
@@ -12,41 +13,79 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -236,21 +322,81 @@ $rate_scalers
-
-
-
-
-
+
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -258,9 +404,40 @@ $rate_scalers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -268,80 +445,205 @@ $rate_scalers
-
-
-
-
-
-
-
-
-
-
-
+-->
- general_opts['command'] in ["--search", "--search1", "--all", "--evaluate"]
+
+ general_opts['cmdtype']['command'] in ["--search", "--fast", "--all", "--allfast", "--evaluate"]
+
+
+
+ general_opts['cmdtype']['command'] in ["--search", "--fast", "--all", "--allfast", "--evaluate"] and output_opts['keep_interim_files'] and ("bestTreeCollapsed" in output_opts['keep_interim_files'])
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "fbp" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "tbe" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--allfast", "--ebg"] or (general_opts['cmdtype']['command'] in ["--all"] and "ebg" in general_opts['cmdtype']['bs_metric'])
-
- general_opts['command'] in ["--all", "--support"]
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "rbs" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "sh" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "ps" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "pbs" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "ic1" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "ica" in general_opts['cmdtype']['bs_metric']
+
+
+
+ general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "gcf" in general_opts['cmdtype']['bs_metric']
- general_opts['command'] in ["--all", "--bootstrap"]
+
+ general_opts['cmdtype']['command'] == "--bootstrap" or (general_opts['cmdtype']['command'] in ["--all"] and output_opts['keep_interim_files'] and "bootstrapTrees" in output_opts['keep_interim_files'])
- general_opts['command'] in ["--search", "--search1", "--all", "--evaluate"]
+
+ general_opts['cmdtype']['command'] in ["--search", "--fast", "--all", "--allfast", "--evaluate"]
- general_opts['command'] in ["--search", "--search1", "--all", "--start"]
+
+ general_opts['cmdtype']['command'] == "--start" or (general_opts['cmdtype']['command'] in ["--search", "--fast", "--all", "--allfast"] and output_opts['keep_interim_files'] and "startTree" in output_opts['keep_interim_files'])
+
+
+
+ general_opts['cmdtype']['command'] in ["--search", "--all"] and output_opts['keep_interim_files'] and ("mlTrees" in output_opts['keep_interim_files'])
- general_opts['command'] == "--sitelh"
+
+ general_opts['cmdtype']['command'] == "--sitelh"
- general_opts['command'] == "--rfdist"
+
+ general_opts['cmdtype']['command'] == "--rfdist"
- general_opts['command'] == "--terrace"
+
+ general_opts['cmdtype']['command'] == "--terrace"
- general_opts['command'] == "--consense" and tree_opts['consensus_type'] == "strict"
+
+ general_opts['cmdtype']['command'] == "--consense" and general_opts['cmdtype']['consensus_type'] == "strict"
- general_opts['command'] == "--consense" and tree_opts['consensus_type'] == "mr"
+
+ general_opts['cmdtype']['command'] == "--consense" and general_opts['cmdtype']['consensus_type'] == "mr"
- general_opts['command'] == "--consense" and tree_opts['consensus_type'] == "mre"
+
+ general_opts['cmdtype']['command'] == "--consense" and general_opts['cmdtype']['consensus_type'] == "mre"
-
- general_opts['command'] == "--ancestral"
+
+
+ general_opts['cmdtype']['command'] == "--ancestral"
- general_opts['command'] == "--ancestral"
+
+ general_opts['cmdtype']['command'] == "--ancestral"
+
+
+
+ general_opts['cmdtype']['command'] == "--ancestral"
+
+
+
+ general_opts['cmdtype']['command'] == "--mutmap"
-
- general_opts['command'] == "--ancestral"
+
+
+ general_opts['cmdtype']['command'] == "--mutmap"
+
+
+
+ general_opts['cmdtype']['command'] == "--moose"
+
+
+
+ general_opts['cmdtype']['command'] == "--moose"
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -358,7 +660,6 @@ $rate_scalers
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -398,19 +806,198 @@ $rate_scalers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`_, `automatic model selection `_, and `fast branch support metrics `_.
+
+RAxML-NG_ is a successor of RAxML 8.x (Stamatakis 2014).
-Documentation: https://github.com/amkozlov/raxml-ng/wiki
+Documentation: https://codeberg.org/amkozlov/raxml-ng/wiki
-.. _RAxML-NG: http://www.exelixis-lab.org/web/software/raxml-ng/
+.. _RAxML-NG: http://raxml.ng/
]]>
10.1093/bioinformatics/btz305
+ 10.1093/molbev/msad227
+ 10.1093/molbev/msae215
+ 10.1101/2025.03.25.645182
diff --git a/tools/raxmlng/raxmlng_macros.xml b/tools/raxmlng/raxmlng_macros.xml
new file mode 100644
index 00000000000..02f85e820bc
--- /dev/null
+++ b/tools/raxmlng/raxmlng_macros.xml
@@ -0,0 +1,214 @@
+
+ 2.0.0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ not output_opts['nofiles'] and (not "@INTERIM_FILETYPE@" or output_opts['keep_interim_files'] and "@INTERIM_FILETYPE@" in output_opts['keep_interim_files'])
+
+
diff --git a/tools/raxmlng/test-data/prot21.fa b/tools/raxmlng/test-data/prot21.fa
new file mode 100644
index 00000000000..830eac806a3
--- /dev/null
+++ b/tools/raxmlng/test-data/prot21.fa
@@ -0,0 +1,42 @@
+>RL5X_THETH
+PIGLRVTLRRDRMWIFLEKLLNVALPRIRDFRGLN..PNSFDGRGNYNLGLREQLIFPEITYDMVDALRGMDIAVVT------TAETDEE----------ARALLELLGFPFR
+>RL5_THEMA
+PIGLKVTLRGARMYNFLYKLINIVLPKVRDFRGLD--PNSFDGRGNYSFGLSEQLVFPELNPDEVRRIQGMDITIVT------TAKTDQE----------ARRLLELFGMPFK
+>RL5_MYCCA
+AIGAKVTLRGKKMYDFLDKLINVALPRVRDFRGVS--KTSFDGFGNFYTGIKEQIIFPEVDHDKVIRLRGMDITIVT------SAKTNKE----------AFALLQKIGMPFE
+>RK5_CYAPA
+PIGVMVTLRGDYMYAFLDRLINLSLPRIRDFRGIT--AKSFDGRGNYNLGLKEQLIFPEVDYDGIEQIRGMDISIVT------TAKTDQE----------GLALLKSLGMPFA
+>RL5_MICLU
+PIGTHATLRGDRMWEFLDRLVTLPLPRIRDFRGLS--DRQFDGNGNYTFGLSEQTVFHEIDQDKIDRVRGMDITVVT------TAKNDDE----------GRALLKALGFPFK
+>RL5_BUCAK
+PIGCKVTLRGERMWEFFERLISIAVPRIRDFRGLS--AKSFDGRGNYSMGVREQIIFPEIDYDKVDRVRGLDITITT------TAKSDDE----------GRALLAAFNFPFR
+>RL5_MYCGE
+LIGCKVTLRNKKMWSFLEKLIYIALPRVRDFRGLS--LRSFDGKGNYTIGIKEQIIFPEIVYDDIKRIRGFDITIVT------STNKDSE----------ALALLRALKMPFV
+>RK5_EUGGR
+PVGMFLTLRSEKMYSFLDRLINLSLPRIRDFQGIN--KNCFDGSGNFSFGLSEQSMFPEINFDKMIKVQGLNITIVT------TAETNQE----------AFFLLKELGIPFR
+>RK5_ODOSI
+ELGLTVTLRGSKMYSFLTKLIFFTFAQIRDFRGLS--VRSFDKAGNYTLGLKEQLIFPEIDYDDVDQTQGFSITLVF------SSTAPKSRSKTMDRVLNGMVLFKFLRFPLN
+>RL5_SULAC
+PIGVKATLRRQAAVEFLKKVL-----PAVNFRLK---QSSFDNYGNVSFGIAEHVLIPGTRYDPEIGIFGMDVAITLVRPGYRTMKRKRKKA----SIPRRHRVTKEEAINFM
+>RL5_METVA
+PIGLKVTLRGKNAEEFLENAF-----VAFKVSGKVLYASSFDKVGNFSFGVPEHIDFPGQKYDPTVGIYGMDICVTFEKPGYRVKSRKLKRS----HIPAKHLVKKEEAIEYI
+>RL5_METJA
+PIGLKVTLRGKKAEEFLKNAF-----EAFQKEGKKLYDYSFDDYGNFSFGIHEHIDFPGQKYDPMIGIFGMDVCVTLERPGFRVKRRKRCRA----KIPRRHRLTREEAIEFI
+>RL5_HALMA
+PIGAKVTLRDEMAEEFLQTAL-----PLAELATS-----QFDDTGNFSFGVEEHTEFPSQEYDPSIGIYGLDVTVNLVRPGYRVAKRDKASR----SIPTKHRLNPADAVAFI
+>RL11_YEAST
+KIAVHVTVRGPKAEEILERGL-----KVKEYQLR---DRNFSATGNFGFGIDEHIDL-GIKYDPSIGIFGMDFYVVMNRPGARVTRRKRCKG----TVGNSHKTTKEDTVSWF
+>RL11_SCHPO
+KIACHVTVRGPKAEEILERGL-----KVKEYELK---KRNFSATGNFGFGIQEHIDL-GIKYDPSIGIYGMDFYVVMDRPGMRVARRKAQRG----RVGYTHKINAEDTINWF
+>RL11_LEICH
+KIAVHCTVRGKKAEELLEKGL-----KVKEFELK---SYNFSDTGSFGFGIDEHIDL-GIKYDPSTGIYGMDFYVVLGRRGERVAHRKRKCS----RVGHSHHVTKEEAMKWF
+>RL11_DROME
+KIAVHCTVRGAKAEEILERGL-----KVREYELR---RENFSSTGNFGFGIQEHIDL-GIKYDPSIGIYGLDFYVVLGRPGYNVNHRKRKSG----TVGFQHRLTKEDAMKWF
+>RL11_HUMAN
+KIAVHCTVRGAKAEEILEKGL-----KVREYELR---KNNFSDTGNFGFGIQEHIDL-GIKYDPSIGIYGLDFYVVLGRPGFSIADKKRRTG----CIGAKHRISKEEAMRWF
+>RL11_CHLRE
+KISCYVTVRGEKAYDLVKRGL-----AVKEFELI---RKNFSDTGNFGFGIQEHIDL-GLKYDPSTGIYGMDFYVCLERRGYRVARRRKQKA----HVGVKHKVTKEDAIKWF
+>R111_ARATH
+KIACYVTVRGEKAMQLLESGL-----KVKEYELL---RRNFSDTGCFGFGIQEHIDL-GIKYDPSTGIYGMDFYVVLERPGYRVARRRRCKA----RVGIQHRVTKDDAMKWF
+>RL11_TETTH
+KMAVHVTIRGDKARDILTRGL-----KVKEMELR---KKNFSNTGNFGFGIQEHIDL-GMKYDPSTGIFGMDFYVVLERPGTRVARRRRATS----RVGNNQMISKEECINWF
diff --git a/tools/raxmlng/test-data/prot21.part.txt b/tools/raxmlng/test-data/prot21.part.txt
new file mode 100644
index 00000000000..38bfd0d09ce
--- /dev/null
+++ b/tools/raxmlng/test-data/prot21.part.txt
@@ -0,0 +1,3 @@
+LG4X+I, p1 = 1-20, 81-113
+LG4M+I, p2 = 21-50
+JTT+G, p3 = 51-80
diff --git a/tools/raxmlng/test-data/prot21.tree b/tools/raxmlng/test-data/prot21.tree
new file mode 100644
index 00000000000..acbf8a20e0d
--- /dev/null
+++ b/tools/raxmlng/test-data/prot21.tree
@@ -0,0 +1 @@
+((((RL11_HUMAN:0.173933,RL11_DROME:0.077104):0.082878,RL11_LEICH:0.208301):0.086231,(((RL5_METVA:0.392422,RL5_METJA:0.093040):0.175449,(RL5_HALMA:0.608438,((RL5_MYCCA:0.251112,((RK5_CYAPA:0.231501,((RL5_MYCGE:0.233019,RK5_ODOSI:0.686663):0.197233,((RL5_THEMA:0.294393,RL5X_THETH:0.235685):0.129184,(RL5_BUCAK:0.172298,RL5_MICLU:0.322469):0.064411):0.052678):0.036215):0.144765,RK5_EUGGR:0.432194):0.033014):1.233905,RL5_SULAC:0.319059):0.156297):0.056926):0.578604,((RL11_YEAST:0.154410,RL11_SCHPO:0.104150):0.080601,RL11_TETTH:0.277573):0.057376):0.008696):0.117758,RL11_CHLRE:0.222517,R111_ARATH:0.062000):0.0;