Add scripts for phylogenetic analysis using MrBayes and RAxML

- Created `mbblock.txt` for MrBayes configuration.
- Implemented `mrbayes.sh` to convert FASTA to Nexus and run MrBayes.
- Developed `raxml.sh` to run modeltest-ng and raxml-ng on alignments.
- Added `04.filter_ogs.sh` to filter orthologous groups based on taxon count and sequence length.
- Implemented `01.run_mrbayes.sh` to execute MrBayes for multiple FASTA files.
- Created `02.mbsum.sh` to summarize MrBayes output while skipping high DSF analyses.
- Developed `03.run_raxml.sh` to run raxml-ng on filtered alignments.
This commit is contained in:
2025-12-20 23:33:05 +08:00
parent dba4833905
commit e467d67723
16 changed files with 353 additions and 1265 deletions
@@ -0,0 +1,23 @@
#! /bin/bash
set -e
SCRIPTS=${SCRIPTS:-"$PROJECTHOME/99.scripts"}
THREADS=${THREADS:-4}
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <in_dir> <out_dir> <ext>"
echo "Run raxml-ng on filtered orthogroup alignments"
exit 1
fi
in_dir=$(readlink -f "$1")
out_dir=$2
ext=$3
mkdir -p "$out_dir"
echo -n >raxml.cmds
for i in "$in_dir"/*."$ext"; do
j=$(basename "$i" ."$ext")
out_prefix="$out_dir/${j}/${j}"
echo "$SCRIPTS/miscs/raxml.sh $i $out_prefix 4 Zju" >>raxml.cmds
done
xargs -t -P "$THREADS" -I cmd -a raxml.cmds bash -c "cmd"
echo "Raxml-ng all completed."