...
Code Block | ||
---|---|---|
| ||
#NEXUS BEGIN NETWORKS; Network net = ((a,(b,(c)x#1)),((x#1,d),e)); Network net1 = ((a,(b,(c)x#1)),((d,x#1),e)); Network net2 = ((((a, (c)x#1), d), (b, x)), e); Network net3 = ((a,b),(c,(d,(e,(f,g))))); Network net4 = ((f,b),(c,(d,(a,(e,g))))); END; BEGIN PHYLONET; Charnet net -m tree; Cmpnets net1 net2 -m cluster; CountCoal net3 net4; END; |
Blocks in a NEXUS file start with the BEGIN
keyword and terminate with the END;
keyword. This example file contains two blocks--NETWORKS
and PHYLONET
. Contained within the PHYLONET
block is the list of commands PhyloNet will executed when processing a NEXUS file. Commands in the PhyloNet block begin with a command identifier and terminate with a semicolon. In this example script, three commands are listed: Charnet
, Cmpnets
, and CountCoal
. Appearing after the command identifier but before the semicolon are any parameters that should be provided to a given command for its execution.
The NETWORKS
block provides an area for defining any phylogenetic networks utilized by any command in the PHYLONET
block. A network definition in the NETWORKS
block must be of the form:
Code Block | ||
---|---|---|
| ||
Network "identifier" = "rich newick string";
|
Where "identifier" is a user specified name for the network and "rich newick string" is a user specified rich newick string. For more information about rich newick strings see its corresponding reference page.
In addition to the NETWORKS
block, the TREES
block may also be used to define rich newick strings. However, rich newick strings defined in a TREES
block may not contain hybridization nodes. The inclusion of the TREES
block in addition to the NETWORKS
block is for increased comparability with NEXUS processing tools besides PhyloNet that also consume or produce TREES
blocks within NEXUS files.
For example, consider the following NEXUS file that utilizes a TREES
block:
Code Block | ||
---|---|---|
| ||
#NEXUS
BEGIN TREES;
Tree speceiesTree = ((((a,b),c),d),e);
Tree geneTree1 = ((((a,b),c),d),e);
Tree geneTree2 = ((a,b),((c,e),d));
Tree geneTree3 = ((a,c),((b,e),d));
END;
BEGIN PHYLONET;
DeepCoalCount {speceiesTree} {geneTree1, geneTree2, geneTree3};
END;
|