Giter Site home page Giter Site logo

m.viridis's Introduction

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.

usage: M.viridis.py -n tree.nw

Creates an interactive version of the tree given a newick file (tree.nw)

optional arguments:

-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)

m.viridis's People

Contributors

mjsull avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

vikash84

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.