M.viridis is a tool for drawing trees. It uses etetoolkit to draw, colour and annotate trees using a description file and a TSV of values to be annotated.
Creates an interactive version of the tree given a newick file (tree.nw)
-o tree.svg, --output_svg <tree.svg>
output to svg file
-c, --color
Automatically color tree.
-z, --blend
Blend parent nodes based on child node colour.
-l, --label
Add distance values
-b, --bootstrap
add bootstrap values
-s SCALE, --scale SCALE
change x scale of tree
-t annot.tsv, --tsv annot.tsv
Tab seperated file (tsv) of values to annotate in the Tree
organism MLST SPA type Collection date days from admission location
saureus1 8 t002 2008-12-21 10 ward 1
saurues2 105 t003 2008-06-21 5 ward B
saureus3 8 t002 2010-04-05 22 ward 9
-d desc.tsv, --desc desc.tsv
Description of which columns of the table to annotate, and how to annotate them
For each column you want annotated add line to the description file.
H <column name to include> <how to annotate> <width of annotating>
additionally you may assign colours to variables contained in annot.tsv using the following lines
C <cell value> <color>
For example the following description file will do the following:
Include columns MLST, SPA type, days from admission and collection date twice.
MLST will be indicated with coloured squares - the colours will correspond to the lines begginging with C that follow
SPA type will also be indicated with coloured squares - the colours will be assigned randomly.
Collection date will be indicated with a coloured scale, it will also be included as text at the end.
Days from admission will also be indicated with a coloured scale.
H MLST colour 20
C 5 #d99a46
C 8 #4baf91
C 105 #9c7239
H SPA type colour 20
H Collection date colour_scale_date 10
H days from admission colour_scale 10
H Collection date text 30
-g Group.tsv, --group_file Group.tsv
Give a tsv file with id tags and colours the script will colour the branches and ancestral nodes for each colour group.
Example group file:
ER04021 #FF0000
PS00004 #FF0000
ER02837 #FF0000
ER04181 #00FFFF
ER03783 #00FFFF
ER00658 #0000FF
-e, --extend extend tree branch
Draw a dotted line from branch end to the annotation.
-p genes.faa fasta_folder working_dir, --presence_absence genes.faa fasta_folder working_dir
tblastn a fasta of proteins against each strain and report presence or absense. Takes the genes of interest as a fasta file of proteins, a directory that contains all fastas used to generate the tree and a working directory to place files generated by blast.
-a ARC, --arc ARC
To make a circular tree input arc angle. (i.e. 180, 360)