- 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.
22 lines
606 B
Bash
Executable File
22 lines
606 B
Bash
Executable File
#! /bin/bash
|
|
set -e
|
|
SCRIPTS=${SCRIPTS:-"$PROJECTHOME/99.scripts"}
|
|
|
|
if [ "$#" -ne 3 ]; then
|
|
echo "Usage: $0 <input_fasta_dir> <extension> <output_dir>"
|
|
echo "Run MrBayes for each fasta file in the input directory"
|
|
exit 1
|
|
fi
|
|
|
|
input_dir=$(readlink -f "$1")
|
|
ext=$2
|
|
output_dir=$(readlink -f "$3")
|
|
mkdir -p "${output_dir}"
|
|
echo -n >mrbayes.cmds
|
|
for f in "${input_dir}"/*."${ext}"; do
|
|
j=$(basename "$f" ."${ext}")
|
|
echo "bash $SCRIPTS/miscs/mrbayes.sh $f ${output_dir}/${j}/${j}.nex" >>mrbayes.cmds
|
|
done
|
|
xargs -t -P 12 -I cmd -a mrbayes.cmds bash -c "cmd"
|
|
echo "All MrBayes analyses are done!"
|