This commit is contained in:
2026-10-02 03:32:03 +08:00
parent e398109a10
commit 06954e0e49
21 changed files with 4336 additions and 8560 deletions
+20
View File
@@ -0,0 +1,20 @@
#! /bin/bash
set -e
dirname=$(dirname "$0")
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <input_fasta> <output_nexus>"
exit 1
fi
in_fasta=$(readlink -f "$1")
out_nex=$2
# Convert fasta to nexus
out_dir=$(dirname "$out_nex")
mkdir -p "$out_dir"
seqmagick convert --output-format nexus --alphabet dna --input-format fasta "$in_fasta" "$out_nex"
# append MrBayes block to nexus file
cat "$dirname/mbblock.txt" >>"$out_nex"
# Run MrBayes
mb "$out_nex" >"${out_dir}"/mrbayes.log 2>&1