Nexus Example

#NEXUS
[This is an example of a Nexus file, modified from a sample file distributed 
with DNASP. It should run in PopART. Any text appearing between square braces is
a comment and will be ignored by the program.]


BEGIN TAXA;
[You need either taxa and characters blocks, or else a data block.]
DIMENSIONS NTAX=7;

TAXLABELS
seq_1
seq_2
seq_3
seq_4
seq_5
seq_6
seq_7
;

END;

BEGIN CHARACTERS;
[You can either use the matchchar option or else include all characters for 
all sequences.]
DIMENSIONS NCHAR=56;
FORMAT DATATYPE=DNA MISSING=? GAP=- MATCHCHAR=. ;
MATRIX

seq_1 ATATACGGGGTTA---TTAGA----AAAATGTGTGTGTGTTTTTTTTTTCATGTGG

seq_2 ......--..A..---...C.----.G...C.A...C..C...C............

seq_3 ..........A..---...T.----.G.............................

seq_4 ..........A..---G...T----..............................A

seq_5 ..........A..---G...G----..............................C

seq_6 ..........A..---G...C----..............................T

seq_7 ..........A..---G....----..............................A

;

END;

BEGIN TRAITS;
[The traits block is specific to PopART. The numbers in the matrix are number of
samples associated with each trait. The order of the columns must match the 
order of TraitLabels. Separator can be comma, space, or tab.]
  Dimensions NTRAITS=5;
  Format labels=yes missing=? separator=Comma;
  [Optional: if you include TraitLatitude and TraitLongitude they will be used to place trait groups on the map]
  TraitLatitude 53 43.6811 5.4 -25.61 -0;
  TraitLongitude 16.75 87.3311 26.5 134.355 -76;
  TraitLabels Europe Asia Africa Australia America;
  Matrix
seq_2 10,5,0,6,0
seq_7 0,0,5,0,0
seq_5 4,0,10,0,0
seq_4 0,0,0,4,2
seq_3 0,0,0,3,5
seq_1 0,0,0,3,3
seq_6 0,0,0,7,3
;

END;

[The geotags block lets you specify coordinates for each sequence. These will be clustered into the number of groups specified by NClusts]
Begin GeoTags;
Dimensions NClusts=5;
Format labels=yes separator=Spaces;
[ClustLatitude and ClustLongitude are optional. If they are given, they will be used to determine how sequences are clustered. Otherwise, the k-means clustering algorithm will choose where to place clusters on the map]
ClustLatitude 53 43.6811 5.4 -25.61 -0;
ClustLongitude 16.75 87.3311 26.5 134.355 -76;
[ClustLabels is only allowed if ClustLatitude and ClustLongitude are given]
ClustLabels Europe Asia Africa Australia America;
[The matrix has sequence name, latitude, longitude, number of samples. Sequences may appear more than once. Number of samples is optional. You can also give a number indicating which cluster a sequence belongs to (between 1 and NClusts)]
Matrix
seq_5 48.3621687364 -10.6803478956 4
seq_5 20.9011934738 41.0061010737 10
seq_4 -34.5248765744 156.980424598 4
seq_4 6.47997227196 -126.310890191 2
seq_7 12.3724817276 32.9959970947 5
seq_6 -25.3125032726 132.069876577 7
seq_6 -17.5420017453 -81.8875028076 3
seq_1 -28.1278668152 133.927583142 3
seq_1 1.90619338755 -100.675193346 3
seq_3 -9.2031496606 156.495614547 3
seq_3 2.76141711712 -95.3738206052 5
seq_2 43.4068001627 40.4459241442 10
seq_2 36.0290665027 68.1753092664 5
seq_2 -21.8525898158 120.606615453 6
;
End;



[This is a trees block from PAUP*. If you want to build an Ancestral Parsimony 
network, you need a trees block. These were all MP trees, but feel free to use 
ML or Bayesian trees, or else sub-optimal parsimony trees.]
Begin trees;  [Treefile saved Sun Jun 10 12:51:09 2012]
[!
>Data file = /home/jleigh/workspace/Hapnet/examples/dnasp.nex
>Heuristic search settings:
>  Optimality criterion = parsimony
>    Character-status summary:
>      Of 56 total characters:
>        All characters are of type 'unord'
>        All characters have equal weight
>        45 characters are constant
>        8 variable characters are parsimony-uninformative
>        Number of parsimony-informative characters = 3
>    Gaps are treated as "missing"
>  Starting tree(s) obtained via stepwise addition
>  Addition sequence: simple (reference taxon = seq 1)
>  Number of trees held at each step during stepwise addition = 1
>  Branch-swapping algorithm: tree-bisection-reconnection (TBR)
>  Steepest descent option not in effect
>  Initial 'MaxTrees' setting = 100 (will be auto-increased by 100)
>  Branches collapsed (creating polytomies) if maximum branch length is zero
>  'MulTrees' option in effect
>  Topological constraints not enforced
>  Trees are unrooted
>
>Heuristic search completed
>   Total number of rearrangements tried = 976
>   Score of best tree(s) found = 16
>   Number of trees retained = 14
>   Time used = <1 sec (CPU time = 0.00 sec)
]
  Translate
    1 seq_1,
    2 seq_2,
    3 seq_3,
    4 seq_4,
    5 seq_5,
    6 seq_6,
    7 seq_7
    ;
tree PAUP_1 = [&U] (1,((2,3),((4,6,7),5)));
tree PAUP_2 = [&U] (1,((2,3),(((4,7),6),5)));
tree PAUP_3 = [&U] (1,((2,3),(((4,7),5),6)));
tree PAUP_4 = [&U] (1,((2,3),(((4,6),7),5)));
tree PAUP_5 = [&U] (1,((2,3),((4,7),(5,6))));
tree PAUP_6 = [&U] (1,((2,3),((4,(5,6)),7)));
tree PAUP_7 = [&U] (1,((2,3),(4,(5,6),7)));
tree PAUP_8 = [&U] (1,((2,3),((4,5),6,7)));
tree PAUP_9 = [&U] (1,((2,3),(4,5,6,7)));
tree PAUP_10 = [&U] (1,((2,3),((4,6),5,7)));
tree PAUP_11 = [&U] (1,((2,3),(((4,6),5),7)));
tree PAUP_12 = [&U] (1,((2,3),((4,5,7),6)));
tree PAUP_13 = [&U] (1,((2,3),(((4,5),7),6)));
tree PAUP_14 = [&U] (1,((2,3),(((4,5),6),7)));
End;