PartitionFinder
In this section:
Description
According to the page of PartitionFinder, PartitionFinder is a free and open-source software for selecting partitioning schemes and models of molecular evolution for phylogenetic analyses.
Available Versions
partitionfinder/2.1.1 (default)
Loading the Module
# Load PartitionFinder
module load partitionfinder/2.1.1
# Available variables
echo $PartitionFinder
# /opt/gridunesp/dist/partitionfinder/2.1.1/bin/PartitionFinder.py
echo $PartitionFinderProtein
# /opt/gridunesp/dist/partitionfinder/2.1.1/bin/PartitionFinderProtein.py
echo $PartitionFinderMorphology
# /opt/gridunesp/dist/partitionfinder/2.1.1/bin/PartitionFinderMorphology.py
Serial Job Submission
submit_partitionfinder.sh
#!/bin/bash
#SBATCH -J partitionfinder
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 23:00:00
#SBATCH --mem=8G
export INPUT="examples/nucleotide"
export OUTPUT="pf_results/"
module load partitionfinder/2.1.1
job-nanny python $PartitionFinder examples/nucleotide
Example Configuration File
partition_finder.cfg
## ALIGNMENT FILE ##
alignment = my_alignment.nex;
## BRANCHLENGTHS ##
branchlengths = linked;
## MODELS OF EVOLUTION ##
models = all;
## MODEL SELECCTION ##
model_selection = aicc;
## DATA BLOCKS ##
[data_blocks]
gene1 = 1-1000;
gene2 = 1001-2000;
## SCHEMES ##
[schemes]
scheme1 = gene1, gene2;
## USER SCHEMES ##
[user schemes]
Job Array for Multiple Alignments
submit_pf_array.sh
#!/bin/bash
#SBATCH -J pf_array
#SBATCH --array=1-10
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 24:00:00
#SBATCH --mem=8G
ALIGNMENTS=(
"gene1.nex"
"gene2.nex"
"gene3.nex"
"gene4.nex"
"gene5.nex"
"gene6.nex"
"gene7.nex"
"gene8.nex"
"gene9.nex"
"gene10.nex"
)
ALIGNMENT=${ALIGNMENTS[$SLURM_ARRAY_TASK_ID-1]}
export INPUT="$ALIGNMENT partition_finder.cfg"
export OUTPUT="pf_${ALIGNMENT%.nex}/"
module load partitionfinder/2.1.1
mkdir -p pf_${ALIGNMENT%.nex}
cd pf_${ALIGNMENT%.nex}
cp ../$ALIGNMENT .
cp ../partition_finder.cfg .
job-nanny python $PartitionFinder . > pf_output.log
Results Analysis
analyze_pf.sh
#!/bin/bash
#SBATCH -J analyze_pf
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 00:30:00
#SBATCH --mem=2G
# Extract best scheme
grep "Best scheme" */*.log > best_schemes.txt
# Extract AICc scores
grep "AICc score" */*.log | awk '{print $4}' > aicc_scores.txt
# Extract selected models
grep "Model for partition" */*.log > models.txt
# Generate summary
echo "Analysis summary:" > summary.txt
echo "=====================" >> summary.txt
for dir in pf_*/; do
echo "Directory: $dir" >> summary.txt
grep "Best scheme" ${dir}partition_finder.log >> summary.txt
grep "AICc score" ${dir}partition_finder.log >> summary.txt
echo "" >> summary.txt
done
References
Documentation: http://www.robertlanfear.com/partitionfinder/
Tutorial: http://www.robertlanfear.com/partitionfinder/tutorial/
See also
RAxML - Phylogenetic inference
BEAST - Bayesian analysis
Running Simulations - How to submit jobs