ScripTree - User manual

Processing

The executable command is "scriptree".
There are 3 main parameters : "-tree", "-script" and "-annotations" :

>scriptree -tree file.nwk
"file.nwk" contains one or several newick string(s). Without any others specifications scripTree use default settings for the tree(s) rendering

>scriptree -tree file.nwk -script file.tds
"file.tds" contains scripting commands. Only a sub-set of scripting commands is available because no annotation are used.

>scriptree -tree file.nwk -script file.tds -annotation file.tlf
"file.tlf" contains annotations.

Another optional flag is -out which enables the setting of a prefix file's name for all the scripTree outputs.

scripTree Outputs: a PostScript file (.ps), a SVG file (.svg) and a TGF file (.tgf) Nota Bene: the TGF file is treedyn compatible, that is to say scripTree user's are able to finalize the graphical analysis using the treedyn stand-alone package.

Scriptree could be used throught a web interface (Scriptree works as CGI and have to be install on a web server).
The user only have to fill the 3 boxes related to the 3 main parameters (-tree, -script, -annotations) and submit the form in order to download the resulting trees as TGF, SVG, PS, or images files (JPG, TIFF, BMP). See the tutorials for more information.

Tree

The tree's formats readable by ScripTree is the Newick format with several variations. ScripTree also read tree collections. In the case of multi trees, concatenate all your newick strings in a single file. Never forget the ";" character at the end of the newick string. ScripTree reads the following formats :

symbolic without branch lengths, or bootstrap values/p-values, without the ":" character:
ex: ((a,b),c);

multi-bifurcating trees
ex: ((a,b),c,d);

bootstrap values/p-values without the ":" character
ex: ((Mus,Oryctolagus)100,((Nycticebus,(Lemur,(Propithecus,Microcebus)48)99)76,(Tarsiusxb,...;

newick string with the ":" character and values before it and/or after it
ex: (((((((Prorocentrum:0.0536,Tetrahymena:0.0721)45:0.0038,((Oryza:0.0135,(Lycopersicon:0.0046,...;
ex: ((agl12:0.65147,((((osmads13:0.16224,((ag:0.10194,((agl1:0.0001,((313113:0.08059,4837612:0.05508)...;

Script

A script is a file under text format, sequencing a set of ScriptTree commands. You can add comments to the script using the character "#". Also you can write a command with its arguments on several rows using the character "\". Finally you can write several commands on one row by using the character ";". Example:

# a comment is a row starting with the "#" character

# empty row(s) are possible(s)

# a command with its arguments can be wrote
# using several rows separated by the "\" character
tree -x 10 -y 20 -height 150 -width 50 \
-fg blue -outline black \
-linewidth 1 \
-font {-family Arial -size 8 -slant roman -weight normal -size 8 -overstrike 0 -underline 0}\
-scale {0 0 black}

query_newick -q {H* Ado*} \
-hi {-o {lfg s_foreground_color} -c orange} \
-regexp 0

# multiple commands on one rows are separated by the ";" character
hi -o {l_background_color} -c purple ; query_newick -q {H*}

 

The ScripTree commands are explained belows.

Annotations

Annotations are meta-information related to the entities under the phylogenetic study: taxonomic descriptions, geographic distribution, gene functions and so on. Annotations are useful for the analyses of trees and their publications, but can hardly be encoded within the tree itself (the so-called Newick string), particularly with large trees, multiple trees and multiple annotation variables. Annotations are used by graphical operators for the highlighting of tree items : modifying the foreground/background colors, posting symbols or text linked to sub-trees or in regards of leaf labels. For instance, knowing a tree on the one hand and, on the other hand annotations for some leaf labels, the query "select Leaves from Annotations where VariableX == ValueX1" returns a list of leaf labels found in the tree and matching the "ValueX1" value for the variable "VariableX". This list is then used by a highlighting operation which updates the tree aspect (e.g. sub-tree background color to red). scripTree links unique leaf labels to lists of variables/values pairs of annotations, independently of the tree topologies, remaining fully compatible with the newick format. An annotations file is a simple text file containing one record per line. Each record begins with the name (label) of a leaf in a tree followed by a list of key/{value(s)} pairs. For instance for the tree: ((a,B),c); an annotations file is like:

a country {1} species {X}
B country {1 2} species {X}
c country {3} species {Y}

Nota Bene: (1) leaf labels, variables and their values do not contain the following characters: {, }, (, ), [, ], *, ?, " (2) leaf labels, variable names and values are without space, (3) variable names and values list are separated by space character or tabulation (4) leaf label must be exactly the same between the graphical representation and the annotation records. In particular upper/lower cases must be respected, (5) annotation records do not have necessary the same variables list. In case of unknown values it is nevertheless possible to used generic values such as "0", "Unknown", "NS", and so on, (6) there is no order to respect in the variable/values pair list between the differents records, (7) it is possible to organise information on differents annotation sets, (8) a given annotation set may be used for the annotation of differents trees.

ScripTree Commands

- with or without leaves query/selection
- with or without annotations query/selection
- object of annotation : l | s | e (leaf | edge | subtree)
- graphical annotation : string, symbol, arc...
- source of information used for annotation : from the newick string itself or from annotation files
- annotation : quantitative or qualitative

NAME tree or t
SYNOPSIS tree [OPTION]
DESCRIPTION Tree drawing and edition command. Use the "tree" command at the beginning of yours scripts.
OPTIONS

-bg $color tree background color, symbolic color name or hexadecimal value (default to white)

-columns $column organize a tree collection as a tree matrix with $columns columns

-conformation $id tree shape
1 Rectangular (default)
2 Rectangular with leafs aligned
3 Comb
4 Radial (beta)

-fg $color tree foreground color, symbolic color name or hexadecimal value (default to black)

-font {$font-family $size [normal bold italic] } leaf labels font (default to {Arial 8 italic})

-height $pixels tree height in pixels (default to 600)

-interleaf $pixels interleaf space in pixels (default to 10)

-linewidth $pixels width of the tree lines in pixels (default to 1)

-nodeindex $mode display nodes index
0 hidden index (default)
1 display index

-nodetype $mode nodes index type
id unique number (default)
x: newick information

-outline $color tree bounding box color, symbolic color name or hexadecimal value (default to white)

-root {$l $l...$p $p} root tree(s) at a node corresponding to the leaf labels or pattern list. This operation works also for multi-tree with differents leaf labels sets.
$l leaf label
$p pattern

-scale {$x $y $color} tree scale

-state $mode display or hidden leaf labels
normal display leaf labels (default)
hidden hidden leaf labels

-symbol {$type $x $y $width $height $color $stipple} add a symbol on the tree
$type symbol shape
01 Square/Rectangle
02 Circle/Oval
03 Diamond
04 Triangle right
05 Triangle left
06 Triangle bottom
07 Triangle top
08 checkboxe Off
09 checkboxe On
$stipple symbol stipple
01 
02 
03 
04 
05 

-text {$text $x $y $font $color} add a text on the tree
$text string without spacies
$font {$font-family $size [normal bold italic]}

-where $mode place node index on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)

-width $pixels tree width in pixels (default to 100)

-x $pixels x tree position in pixels (default to 10)

-y $pixels y tree position in pixels (default to 10)


NAME query_annotation or qa
SYNOPSIS qa -q {$v $op $value} [OPTION]
DESCRIPTION

-qe {$n $n...} Query leaf using node index number.

-hi {-o {$o $o...} [OPTION]} highlighting operation, see the hi command

-regexp $mode pattern mode
1 regular expression rules
2 string pattern matching

OPTIONS

-hi {-o {$o $o...} [OPTION]} highlighting operation, see the hi command

-regexp $mode pattern mode
1 regular expression rules
2 string pattern matching


NAME query_newick or qn
SYNOPSIS qn -ql {$l $l... $p $p} [OPTION]
DESCRIPTION

Query leaf's labels using regular expression rules or string pattern matching and highlight tree(s).
$l leaf label
$p pattern

OPTIONS

-qe {$n $n...} Query leaf using node index number.

-hi {-o {$o $o...} [OPTION]} highlighting operation, see the hi command

-regexp $mode pattern mode
1 regular expression rules
2 string pattern matching


NAME hi
SYNOPSIS hi -o {$o $o...} [OPTION]
DESCRIPTION

Hightlightning operations (l: leaf's label, e: edge, s: subtree).
$o operation
lfg l_foreground_color
lbg l_background_color
lfo l_font
lsj l_symbol_juxtaposition
lsc l_symbol_column
ltj l_string_juxtaposition
ltc l_string_column
lsn l_state_normalr
lsh l_state_hidden
efg e_foreground_color
el+ e_line_+
el- e_line_-
ed1 e_dash_on
ed0 e_dash_off
esy e_symbol
est e_string
sfg s_foreground_color
sbg s_background_color
sl+ s_line_+
sl- s_line_-
sd1 s_dash_on
sd0 s_dash_off
sss s_symbolstring
ss1 s_shrink_on
ss0 s_shrink_off

OPTIONS

-bg $color background color, symbolic color name or hexadecimal value.

-c $color foreground and background color, symbolic color name or hexadecimal value.

-fg $color foreground color, symbolic color name or hexadecimal value.

-font {$font-family $size [normal bold italic] } leaf labels font (default to {Arial 8 italic}).

-outline $color bounding box color, symbolic color name or hexadecimal value (default to white)

-regexp $mode pattern mode
1 regular expression rules
2 string pattern matching

-shrink $id sub-tree collapse mode
01 String
02 Symbol
03 Subtree
04 Cumulative subtree
05 Triangle
06 Leaf number
07 Leaf list

-stipple $id stipple
01 
02 
03 
04 
05 

-symbol {$type $x $y $width $height $color $stipple} add a symbol
$type symbol shape
01 Square/Rectangle
02 Circle/Oval
03 Diamond
04 Triangle right
05 Triangle left
06 Triangle bottom
07 Triangle top
08 checkbox Off
09 checkbox On
$stipple symbol stipple
01 
02 
03 
04 
05 

-text $t string without spacies

-where $mode place string on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)


NAMEl_arc_annotation or laa
SYNOPSIS laa -l {$l $l... $p $p} -what {$v $v...} [OPTION]
DESCRIPTION

Projection of arcs beetween leaf's labels, about annotation.
$l leaf label
$p pattern
$v variable domain

OPTIONS

-curve $pixels weight of arc's curve in pixels

-fg $mode arc foreground color mode
progressive 
random 

-font {$font-family $size [normal bold italic] } variable labels font (default to {Arial 8 italic})

-line $pixels width of arc in pixels

-regexp $mode pattern mode
1 regular expression rules
2 string pattern matching

-split $column split arc in $column columns

-tabulation $pixels spacies between tree and arc in pixels

-text $mode 
0 hidden variable label
1 display variable label (default)


NAME l_bracket_annotation or lba
SYNOPSIS lba -what {$v $v...} [OPTION]
DESCRIPTION Brackets in regard of leaf's labels, from annotation.
$v�variable domain
OPTIONS

-bg $mode bracket background color mode
progressive 
random 

-font {$font-family $size [normal bold italic] } variable labels font (default to {Arial 8 italic})

-legend $mode display bracket legend
0 hidden legend (default)
1 display legend

-stipple $id bracket stipple
01 
02 
03 
04 
05 

-tabulation $pixels spacies between tree and bracket in pixels

-text $mode 
0 hidden variable label
1 display variable label (default)

-width $pixels bracket width in pixels


NAME l_chart_annotation or lca
SYNOPSIS lpa -what {$v $v...} [OPTION]
DESCRIPTION Piecharts/barcharts projection in regards of leaf's labels, from annotation
$v�variable domain
OPTIONS

-bg $color chart background color, symbolic color name or hexadecimal value (default to red)

-fg $color chart foreground color, symbolic color name or hexadecimal value (default to black)

-height $pixels chart height in pixels (default to 5)

-outline $color chart bounding box color, symbolic color name or hexadecimal value (default to grey)

-stipple $id chart stipple (default to 01)
01 
02 
03 
04 
05 

-tabulation $pixels spacies between tree and chart in pixels

-type $mode type of chart
bar histogram

-width $pixels chart width in pixels (default to 10)


NAME l_plot_annotation or lpa
SYNOPSIS lpa -what {$v $v...} [OPTION]
DESCRIPTION 2D (X/Y) plots, histograms, curves projection in regards of leaf's labels, from annotation.
$v�variable domain
OPTIONS

-bg $color plot background color, symbolic color name or hexadecimal value (default to white)

-fg $color plot foreground color, symbolic color name or hexadecimal value (default to black)

-height $pixels plot height in pixels (default to 10)

-outline $color plot bounding box color, symbolic color name or hexadecimal value (default to grey)

-type $mode type of plot
scatter (default)
batons 
curve 

-width $pixels plot width in pixels (default to 10)


NAME l_string_annotation or lsa
SYNOPSIS lsa -what {$v $v...} -how replace|juxtapose|column [OPTION]
DESCRIPTION

Textual matrices in regard of leaf's labels from annotation.
$v variable domain
-how how add string
replace string replace leaf's labels
juxtapose add string before leaf's label
column add string in one column in regard of leaf's labels

OPTIONS

-fg $color string foreground color, symbolic color name or hexadecimal value (default to black)

-font {$font-family $size [normal bold italic] } variable labels font (default to {Arial 8 italic})

-prefix $text substring prefix the annotation

-suffix $text substring suffix the annotation

-translate $pixels move down the annotation to $pixels pixels


NAME l_symbol_annotation or lya
SYNOPSIS lya -what {$v $v...} -how binary|rgb|domain [OPTION]
DESCRIPTION

Symbols matrices in regard of leaf's labels from annotation.
$v variable domain
-how how add symbols
binary 
rgb 
domain (default)

OPTIONS

-bg $mode symbol background color mode
progressive 
random (default)

-height $pixels symbol height in pixels

-legend $mode display symbol legend
0 hidden legend (default)
1 display legend

-stipple $id symbol stipple (default to 01)
01 
02 
03 
04 
05 

-symbol $id symbol shape (default to 01)
01 Square/Rectangle
02 Circle/Oval
03 Diamond
04 Triangle right
05 Triangle left
06 Triangle bottom
07 Triangle top
08 checkboxe Off
09 checkboxe On

-tabulation $pixels spacies between tree and symbol in pixels

-width $pixels symbol width in pixels


NAME e_plot_annotation or epa
SYNOPSIS lpa -e {$e $e...} -what {$v $v...} [OPTION]
DESCRIPTION

2D (X/Y) plots, histograms, curves projection in regards of edges, from annotation.
$e node index
$v variable domain

OPTIONS

-bg $color plot background color, symbolic color name or hexadecimal value (default to white)

-fg $color plot foreground color, symbolic color name or hexadecimal value (default to black)

-height $pixels plot height in pixels (default to 10)

-outline $color plot bounding box color, symbolic color name or hexadecimal value (default to grey)

-type $mode type of plot
scatter (default)
batons 
curve 

-width $pixels plot width in pixels (default to 10)

-where $mode place plot on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)


NAME e_string_annotation or esa
SYNOPSIS esa -what {$v $v...} [OPTION]
DESCRIPTION Text projection from annotation (intersection from leaves).
$v�variable domain
OPTIONS

-box $mode display or hidden box
0 hidden box
1 display box (default)

-bg $color string background color, symbolic color name or hexadecimal value (default to #FAFADD)

-fg $color string foreground color, symbolic color name or hexadecimal value (default to black)

-font {$font-family $size [normal bold italic] }  string font (default to {Arial 7})

-justify $mode string justify mode
left align left
center center string (default)
right align right

-leaf $mode display or hidden string on leaf's edges
0 hidden string (default)
1 display string

-outline $color string bounding box color, symbolic color name or hexadecimal value (default to grey)

-where $mode place string on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)


NAME e_string_newick or esn
SYNOPSIS esa -what :x|x: [OPTION]
DESCRIPTION ":x" or "x:" projection (branch lenghts, bootstrap values, p=values...).
OPTIONS

-box $mode display or hidden box
0 hidden box
1 display box (default)

-bg $color string background color, symbolic color name or hexadecimal value (default to #FAFADD)

-fg $color string foreground color, symbolic color name or hexadecimal value (default to black)

-font {$font-family $size [normal bold italic] }  string font

-leaf $mode display or hidden string on leaf's edges
0 hidden string (default)
1 display string

-outline $color string bounding box color, symbolic color name or hexadecimal value (default to grey)

-where $mode place string on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)


NAME e_symbol_annotation or eya
SYNOPSIS eya -what {$v $v...}[OPTION]
DESCRIPTION Symbols projection on internal nodes, from annotation.
$v�variable domain
OPTIONS

-bg $mode symbol background color mode
progressive 
random (default)

-leaf $mode display or hidden symbol on leaf's edges
0 hidden string (default)
1 display string

-legend $mode display symbol legend
0 hidden legend (default)
1 display legend

-stipple $id symbol stipple (default to 01)
01 
02 
03 
04 
05 

-symboltype $id symbol shape (default to 01)
01 Square/Rectangle
02 Circle/Oval
03 Diamond
04 Triangle right
05 Triangle left
06 Triangle bottom
07 Triangle top
08 checkbox Off
09 checkbox On

-symbolx $pixels symbol width in pixels

-symboly $pixels symbol height in pixels

-where $mode place symbol on edges
nw nord west
sw sud west
ne nord est
se sud est
n nord
s sud
w west
e est
c center (default)


NAME s_shape_annotation or ssa
SYNOPSIS eya -what {$v $v...} [OPTION]
DESCRIPTION Subtrees shapes projection, from annotation.
$v�variable domain
OPTIONS

-bg $mode shape background color mode
progressive 
random (default)

-legend $mode display shape legend
0 hidden legend (default)
1 display legend

-shape $id shape (default to 01)
01 polygon, sub-tree
02 rectangular, sub-tree
03 rectangular, sub-tree and leaf labels
04 rectangular, sub-tree with a tree maximum on the horizontal axis
05 rectangular, sub-tree with integration of annotations

-stipple $id shape stipple (default to 01)
01 
02 
03 
04 
05