.. _raxml-ng: ======== RAxML-NG ======== .. contents:: In this section: :local: :depth: 2 Description =========== According to the `page of RAxML-NG `_, RAxML-NG is a phylogenetic inference tool using the maximum likelihood (ML) optimality criterion. It is the successor to RAxML, offering improvements in speed, flexibility, and usability. Available Versions ================== * raxml-ng/1.0.3 (default) Loading the Module ================== .. code-block:: bash # Load RAxML-NG module load raxml-ng/1.0.3 # Verify installation raxml-ng --version raxml-ng-mpi --version Job Submission ============== .. code-block:: bash :caption: submit_raxml-ng.sh #!/bin/bash #SBATCH -J raxmlng #SBATCH -N 1 #SBATCH -c 8 #SBATCH -t 24:00:00 #SBATCH --mem=16G export INPUT="test.fa" export OUTPUT="test.fa.raxml.*" module load raxml-ng/1.0.3 job-nanny raxml-ng --msa test.fa --model GTR+G --threads $SLURM_CPUS_PER_TASK Best Tree Search ================ .. code-block:: bash :caption: submit_raxml-ng_search.sh #!/bin/bash #SBATCH -J raxmlng_search #SBATCH -N 1 #SBATCH -c 8 #SBATCH -t 48:00:00 #SBATCH --mem=32G export INPUT="alignment.phy" export OUTPUT="RAxMLNG_*" module load raxml-ng/1.0.3 job-nanny raxml-ng --msa alignment.phy --model GTR+G \ --threads $SLURM_CPUS_PER_TASK \ --prefix RAxMLNG --seed 12345 Bootstrap ========= .. code-block:: bash :caption: submit_raxml-ng_bootstrap.sh #!/bin/bash #SBATCH -J raxmlng_boot #SBATCH -N 1 #SBATCH -c 8 #SBATCH -t 72:00:00 #SBATCH --mem=32G export INPUT="alignment.phy" export OUTPUT="RAxMLNG_*" module load raxml-ng/1.0.3 # Bootstrap job-nanny raxml-ng --bootstrap --msa alignment.phy --model GTR+G \ --threads $SLURM_CPUS_PER_TASK \ --prefix boot --seed 12345 --bs-trees 100 # Map bootstrap on best tree job-nanny raxml-ng --support --tree boot.raxml.bestTree \ --bs-trees boot.raxml.bootstraps \ --prefix support --threads $SLURM_CPUS_PER_TASK Full Analysis (Search + Bootstrap) ================================== .. code-block:: bash :caption: submit_raxml-ng_all.sh #!/bin/bash #SBATCH -J raxmlng_all #SBATCH -N 1 #SBATCH -c 8 #SBATCH -t 96:00:00 #SBATCH --mem=32G export INPUT="alignment.phy" export OUTPUT="RAxMLNG_*" module load raxml-ng/1.0.3 job-nanny raxml-ng --all --msa alignment.phy --model GTR+G \ --threads $SLURM_CPUS_PER_TASK \ --prefix complete --seed 12345 \ --bs-trees 100 Available Models ================ .. list-table:: Evolution Models :header-rows: 1 :widths: 20 80 * - Model - Description * - ``GTR+G`` - General Time Reversible with gamma distribution * - ``GTR+G4`` - GTR with 4 gamma categories * - ``GTR+I+G4`` - GTR with invariant proportion + gamma * - ``JC69`` - Jukes-Cantor 1969 * - ``HKY85`` - Hasegawa-Kishino-Yano 1985 * - ``TN93`` - Tamura-Nei 1993 * - ``K80`` - Kimura 2-parameter * - ``F81`` - Felsenstein 1981 Job Array for Multiple Alignments ================================= .. code-block:: bash :caption: submit_raxml-ng_array.sh #!/bin/bash #SBATCH -J raxmlng_array #SBATCH --array=1-10 #SBATCH -N 1 #SBATCH -c 8 #SBATCH -t 48:00:00 #SBATCH --mem=32G FILES=($(ls *.phy *.fa *.fasta)) FILE=${FILES[$SLURM_ARRAY_TASK_ID-1]} PREFIX="raxmlng_${FILE%.*}" export INPUT="$FILE" export OUTPUT="${PREFIX}_*" module load raxml-ng/1.0.3 job-nanny raxml-ng --msa $FILE --model GTR+G \ --threads $SLURM_CPUS_PER_TASK \ --prefix $PREFIX --seed 12345 Results Analysis ================ .. code-block:: bash :caption: analyze_raxml-ng.sh #!/bin/bash #SBATCH -J analyze_raxmlng #SBATCH -N 1 #SBATCH -n 1 #SBATCH -t 01:00:00 #SBATCH --mem=4G module load raxml-ng/1.0.3 # Check bootstrap convergence raxml-ng --bsconvergence --bs-trees boot.raxml.bootstraps \ --prefix convergence --seed 12345 # Calculate consensus tree raxml-ng --consense --tree boot.raxml.bootstraps \ --prefix consense --seed 12345 # Extract statistics for f in *.raxml.log; do echo "File: $f" grep "Final log likelihood" $f grep "Tree length" $f grep "Number of distinct tree topologies" $f echo "---" done > stats.txt # Generate tree PDF (requires Python with ete3) cat > plot_tree.py << 'EOF' from ete3 import Tree, TreeStyle import glob for tree_file in glob.glob("*.raxml.bestTree"): t = Tree(tree_file) ts = TreeStyle() ts.show_leaf_name = True ts.show_branch_length = True ts.show_branch_support = True outfile = tree_file.replace("bestTree", "tree.pdf") t.render(outfile, tree_style=ts) EOF python plot_tree.py 2>/dev/null || echo "ete3 not installed" References ========== - Documentation: https://github.com/amkozlov/raxml-ng/wiki - Manual: https://github.com/amkozlov/raxml-ng/blob/master/README.md - Tutorial: https://github.com/amkozlov/raxml-ng/wiki/Tutorial .. seealso:: - :ref:`raxml` - Previous version - :ref:`beast` - Bayesian analysis - :ref:`exabayes` - Bayesian alternative - :ref:`running_simulations` - How to submit jobs