SLiMSuite REST Server

EdwardsLab Homepage
EdwardsLab Blog
SLiMSuite Blog
REST Pages
REST Status
REST Tools
REST Alias Data
REST Sitemap

rje_tree V2.16.1

Phylogenetic Tree Module

Module: rje_tree
Description: Phylogenetic Tree Module
Version: 2.16.1
Last Edit: 19/06/18

Copyright © 2007 Richard J. Edwards - See source code for GNU License Notice

Imported modules: rje rje_ancseq rje_html rje_seq rje_svg rje_tree_group

See SLiMSuite Blog for further documentation. See rje for general commands.


Reads in, edits and outputs phylogenetic trees. Executes duplication and subfamily determination. More details available in documentation for HAQESAC, GASP and BADASP at

General Commands

nsfin=FILE : load NSF tree from FILE
phbin=FILE : load ClustalW Format *.phb NSF tree from FILE
seqin=FILE : load sequence list from FILE (not compatible with useanc)
disin=FILE : load distance matrix from FILE (Phylip format for use with distance matrix methods) [None]
useanc=FILE : load sequences from ancestral sequence FILE (not compatible with seqin)
deflen=X : Default length for branches when no lengths given [0.1] (or 0.1 x longest branch)
*Note that in the case of conflicts (e.g. seqin=FILE1 useanc=FILE2), the latter will be used.*
autoload=T/F : Whether to automatically load sequences upon initiating object [True]

Rooting Commands

root=X : Rooting of tree (
- mid = midpoint root tree.
- ran = random branch.
- ranwt = random branch, weighted by branch lengths.
- man = always ask for rooting options (unless i<0).
- none = unrooted tree
- FILE = with seqs in FILE as outgroup. (Any option other than above)
rootbuffer=X : Min. distance from node for root placement (percentage of branch length)[0.1]

Grouping/Subfamily Commands

bootcut=X : cut-off percentage of tree bootstraps for grouping.
mfs=X : minimum family size [3]
fam=X : minimum number of families (If 0, no subfam grouping) [0]
orphan=T/F : Whether orphans sequences (not in subfam) allowed. [True]
allowvar=T/F: Allow variants of same species within a group. [False]
qryvar=T/F : Keep variants of query species within a group (over-rides allowvar=F). [False]
groupspec=X : Species for duplication grouping [None]
specdup=X : Minimum number of different species in clade to be identified as a duplication [1]
9spec=T/F : Whether to treat 9XXXX species codes as actual species (generally higher taxa) [False]
group=X : Grouping of tree
- man = manual grouping (unless i<0).
- dup = duplication (all species unless groupspec specified).
- qry = duplication with species of Query sequence (or Sequence 1) of treeseq
- one = all sequences in one group
- None = no group (case sensitive)
- FILE = load groups from file

Tree Making Commands

cwtree=FILE : Make a ClustalW NJ Tree from FILE (will save *.ph or *.phb) [None]
kimura=T/F : Whether to use Kimura correction for multiple hits [True]
bootstraps=X : Number of bootstraps [0]
clustalw=CMD : Path to CLUSTALW (and including) program [''] * Use forward slashes (/)
fasttree=PATH : Path to FastTree (and including) program ['']
iqtree=FULLPATH : Path IQTree program including program ['iqtree']
phylip=PATH : Path to PHYLIP programs [''] * Use forward slashes (/)
phyoptions=FILE : File containing extra Phylip tree-making options ('batch running') to use [None]
protdist=FILE : File containing extra Phylip PROTDIST options ('batch running') to use [None]
maketree=X : Program for making tree [None]
- None = Do not make tree from sequences
- clustalw = ClustalW NJ method
- neighbor = PHYLIP NJ method
- upgma = PHYLIP UPGMA (neighbor) method
- fitch = PHYLIP Fitch method
- kitsch = PHYLIP Kitsch (clock) method
- protpars = PHYLIP MP method
- proml = PHYLIP ML method
- fasttree = Use FastTree
- iqtree = Use IQTree
- PATH = Alternatively, a path to a different tree program/script can be given. This should accept ClustalW parameters.

Tree Display/Saving Commands
savetree=FILE : Save a generated tree as FILE [seqin.maketree.nsf]
savetype=X : Format for generated tree file (nsf/nwk/text/r/png/bud/qspec/cairo/te/svg/html) [nwk]
treeformats=LIST: List of output formats for generated trees [nwk]
outnames=X : 'short'/'long' names in output file [short]
truncnames=X : Truncate names to X characters (0 for no truncation) [123]
branchlen=T/F : Whether to use branch lengths in output tree [True]
deflen=X : Default branch length (when none given, also for tree scaling) [0.1]
textscale=X : Default scale for text trees (no. of characters per deflen distance) [4]
seqnum=T/F : Output sequence numbers (if making tree from sequences) [True]


- Phylogenetic Tree class.
- Individual nodes (internal and leaves) for Tree object.
- Individual branches for Tree object.

History Module Version History

    # 0.0 - Initial Compilation.
    # 0.1 - Changed CladeList to lists inside tuple
    # 0.2 - Completely reworked with a much greater OO focus
    # 0.3 - No Out Object in Objects
    # 1.0 - Better
    # 1.1 - Added tree-drawing with ClustalW
    # 1.2 - Bug fixing.
    # 1.3 - Added separate maketree=PATH command to enable replacement of ClustalW tree drawing
    # 1.4 - Added toggling of full sequence description in TextTree/EditTree
    # 1.5 - Added ability to read in integer branch lengths
    # 1.6 - Added PHYLIP tree making
    # 1.7 - Modified text/log output. Added commandline scale option for text trees.
    # 1.8 - Updating reporting of redundant duplication finding.
    # 1.9 - Modified mapSeq() method to be more robust to different formats
    # 1.10- Fixed some bugs and had a minor tidy.
    # 2.0 - Updated code to be more inline with newer RJE modules. Fixed some bugs.
    # 2.1 - Added tree savetype
    # 2.2 - Added treeformats=LIST option to eventually replace savetype. Added te (TreeExplorer) format.
    # 2.3 - Added specdup=X   : Minimum number of different species in clade to be identified as a duplication [1]
    # 2.4 - Added fasttree generation of trees.
    # 2.5 - Added qryvar=T/F  : Allow variants of query species within a group (over-rides allowvar=F). [False]
    # 2.6 - Added PNG R variants.
    # 2.7 - Added Improved NSF Tree reading.
    # 2.8 - Added SVG and HTML Tree output.
    # 2.9 - Added NWK output (=NSF output with different extension for MEGA!)
    # 2.10- Added cleanup of *.r.csv file following R-based PNG generation.
    # 2.11.0 - Modified for standalone running as part of SeqSuite.
    # 2.11.1 - Tweaked QryVar interactivity.
    # 2.11.2 - Updated tree paths.
    # 2.12.0 - Added treeLen() method.
    # 2.13.0 - Updated PNG saving with R to use newer code.
    # 2.14.0 - Added cladeSpec().
    # 2.14.1 - Fixed clustalw2 makeTree issue.
    # 2.15.0 - Added IQTree.
    # 2.16.0 - 9spec=T/F   : Whether to treat 9XXXX species codes as actual species (generally higher taxa) [False]
    # 2.16.1 - Modified NSF reading to cope with extra information beyond the ";".

rje_tree REST Output formats

Run with &rest=docs for program documentation and options. A plain text version is accessed with &rest=help.
&rest=OUTFMT can be used to retrieve individual parts of the output, matching the tabs in the default
(&rest=format) output. Individual OUTFMT elements can also be parsed from the full (&rest=full) server output,
which is formatted as follows:
... contents for OUTFMT section ...

Available REST Outputs

There is currently no specific help available on REST output for this program.

© 2015 RJ Edwards. Contact: