gabefoley / itol_annotations

Generate ITOL annotation files from annotated dataframes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate iTOL annotations

It works on passing a .csv file that looks something like this, i.e. there is a column that matches the labels you have in your nwk file followed by annotations.

Dataframe

Then it just replaces values from this file into the templates defined in itol_text.py.

It will generate a colour_dict automatically, but you can also just define your own colours and pass in a colour_dict (there's a comment in the code where you can override it).

It generates these three styles of annotations:

Colour ranges (from 'xref_orthodb' column)

Ranges

Colour strips (from lineage_superkingdom, lineage_phylum)

Colour Strips

Text on extants / ancestors (from value column)

Text

Note for ranges

Note that for ranges you need to toggle - 'Cover leaf labels' and 'Extend to fit labels' to view them correctly

iTOL Options

About

Generate ITOL annotation files from annotated dataframes


Languages

Language:Python 76.4%Language:Jupyter Notebook 23.6%