Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aguang committed Jun 14, 2024
2 parents ee6fbc2 + 865c9aa commit 4122427
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 92 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scripts/logs
results
67 changes: 0 additions & 67 deletions notebooks/workshop.qmd

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/00_env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# make results folder
mkdir -p results
mkdir -p ../results

# download singularity image
apptainer pull ../metadata/bootcamp.sif docker://ghcr.io/compbiocore/ccv_bootcamp_phylogenetics:latest
3 changes: 2 additions & 1 deletion scripts/01_iqtree_init.sh → scripts/01_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#SBATCH -e logs/iqtree_init-%J.err
#SBATCH -o logs/iqtree_init-%J.out

WORKDIR=/oscar/data/datasci/aguang/ccv_bootcamp_phylogenetics
#WORKDIR=/users/aguang/ccv_bootcamp_phylogenetics
WORKDIR=~/ccv_bootcamp_phylogenetics

export SINGULARITY_BINDPATH="${WORKDIR}"
IMG=${WORKDIR}/metadata/bootcamp.sif
Expand Down
19 changes: 19 additions & 0 deletions scripts/02_partition.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
#SBATCH -t 00:20:00
#SBATCH --mem 4G
#SBATCH --cpus-per-task=8
#SBATCH -e logs/partition-%J.err
#SBATCH -o logs/partition-%J.out

WORKDIR=/users/aguang/ccv_bootcamp_phylogenetics

export SINGULARITY_BINDPATH="${WORKDIR}"
IMG=${WORKDIR}/metadata/bootcamp.sif

# allows each partition to have its own model
# -p turtle.nex to specify an edge-linked proportional partition model (Chernomor et al., 2016).
# That means, there is one set of branch lengths.
# But each partition can have proportionally shorter or longer tree length,
# representing slow or fast evolutionary rate, respectively.

singularity exec ${IMG} iqtree2 -s ${WORKDIR}/data/turtle.fa -p ${WORKDIR}/data/turtle.nex -B 1000 -T AUTO -pre ${WORKDIR}/results/partition
28 changes: 28 additions & 0 deletions scripts/03_bestscheme_topotest.sh~
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#SBATCH -t 00:20:00
#SBATCH --mem 4G
#SBATCH --cpus-per-task=8
#SBATCH -e logs/test-%J.err
#SBATCH -o logs/test-%J.out

WORKDIR=/users/aguang/ccv_bootcamp_phylogenetics

export SINGULARITY_BINDPATH="${WORKDIR}"
IMG=${WORKDIR}/metadata/bootcamp.sif

# Runs PartitionFinder algorithm to merge partitions to reduce overfitting
# -m MFP+MERGE performs PartitionFinder + tree reconstruction
# -rcluster 10 reduces computations by only examining top 10% partitioning schemes using relaxed clustering

singularity exec ${IMG} iqtree2 -s ${WORKDIR}/data/turtle.fa -p ${WORKDIR}/data/turtle.nex -B 1000 -T AUTO -m MFP+MERGE -rcluster 10 -pre ${WORKDIR}/results/merge

# topology test
# concatenate single + partition trees into trees file
# -p merge.best_scheme.nex provides best partitioning scheme found from ModelFinder
# -z turtle.trees inputs set of trees
# -zb 10000 number of replicates for bootstrap for test
# -au Approximately Unbiased test
# -n 0 avoids tree search, just does testing

cat ${WORKDIR}/results/turtle.treefile ${WORKDIR}/results/partition.treefile >${WORKDIR}/results/turtle.trees
singularity exec ${IMG} iqtree2 -s ${WORKDIR}/data/turtle.fa -p ${WORKDIR}/results/merge.best_scheme.nex -z ${WORKDIR}/results/turtle.trees -zb 10000 -au -n 0 --pre ${WORKDIR}/results/topo
28 changes: 28 additions & 0 deletions scripts/03_topo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#SBATCH -t 00:20:00
#SBATCH --mem 4G
#SBATCH --cpus-per-task=8
#SBATCH -e logs/test-%J.err
#SBATCH -o logs/test-%J.out

WORKDIR=/users/aguang/ccv_bootcamp_phylogenetics

export SINGULARITY_BINDPATH="${WORKDIR}"
IMG=${WORKDIR}/metadata/bootcamp.sif

# Runs PartitionFinder algorithm to merge partitions to reduce overfitting
# -m MFP+MERGE performs PartitionFinder + tree reconstruction
# -rcluster 10 reduces computations by only examining top 10% partitioning schemes using relaxed clustering

singularity exec ${IMG} iqtree2 -s ${WORKDIR}/data/turtle.fa -p ${WORKDIR}/data/turtle.nex -B 1000 -T AUTO -m MFP+MERGE -rcluster 10 -pre ${WORKDIR}/results/merge

# topology test
# concatenate single + partition trees into trees file
# -p merge.best_scheme.nex provides best partitioning scheme found from ModelFinder
# -z turtle.trees inputs set of trees
# -zb 10000 number of replicates for bootstrap for test
# -au Approximately Unbiased test
# -n 0 avoids tree search, just does testing

cat ${WORKDIR}/results/turtle.treefile ${WORKDIR}/results/partition.treefile >${WORKDIR}/results/turtle.trees
singularity exec ${IMG} iqtree2 -s ${WORKDIR}/data/turtle.fa -p ${WORKDIR}/results/merge.best_scheme.nex -z ${WORKDIR}/results/turtle.trees -zb 10000 -au -n 0 -pre ${WORKDIR}/results/topo
Loading

0 comments on commit 4122427

Please sign in to comment.