2. Generation of Phylosift tree and subsequent annotation in iTOL - maxlcummins/APEC-MGEN-2018 GitHub Wiki

To allow phylogenetic comparison of the 95 APEC strains, PhyloSift was used in combination with FastTree2 and iTOL.

All supporting data is avaiable in the data folder of this github repository.

Phylosift Tree Generation

Using a submission script available here, we submit a Phylosift script for each job as follows:

Here BigChook_genomes is an input directory containing the assemblies of the APEC sequence data. Note that no other files can be kept in this directory or the script will probably fail. BigChook_PSout is an output directory into which our intermediate files will be generated.

phylosift_submit.sh BigChook_genomes BigChook_PSout

Next we need to concatenate the sequences generated by Phylosift for each sample using the following step:

cat BigChook_PSout/*/alignDir/concat.codon.updated.1.fasta > concat_BigChook.fa

Following this we need to trim '.fasta*' from the concatenated file as follows:

perl -p -i -e "s/\.fasta.+//g" concat_BigChook.fa

Next we use FastTree2.1 to make a tree file. Here '~/software/FastTree' is the path to the FastTree executable.

~/software/FastTree -nt -gtr <concat_BigChook.fa> BigChook_Phylosift.tree

Tree visualisation and annotation in iTOL

Next we create an account at iTOL and load the tree after midpoint rooting it by clicking on the settings logo on the right hand side of the page.

How to midpoint root in iTOL

Then we need to make iTOL annotation files. You can find templates to make your own here, or use those that I used for this tree which you can download from this github repository.

Before your annotation your tree will look like this:

iTOL pre annotation

After adding annotations it will look like this:

iTOL post annotation

You can export the tree as a PDF as follows:

iTOL export