Westerdijk logo

PopART


Download PopART 1.7



PopART is a program with which reticulate networks can be built on the basis of a file containing haplotypes in a nexus-format.
These haplotypes can be created using DnaSP 6.11. The created file contains information and data blocks, that are not used in PopART.

Download DnaSP 6.11



Version 6.12 is not available as zipfile, but only as msi-file (installation)




Editing the created haplotype file for PopART:
Find Hap# in the file. The first block shows the frequency of sequences per haplotype, the second block the strain numbers, that belong to these sequences.
Both blocks should be deleted from the file, but keep the first block with frequencies; we need them later.

Instead of editing the file manually, you could use the program that is decribed here.

In the block 'BEGIN CHARACTERS;' the part from CHARLABELS till ; should be deleted.
Then block 'MATRIX' follows. The numbers and * including the open [ and closing ] are deleted.

At the end is says BEGIN DnaSP;
This whole block is deleted. The file now only contains BEGIN TAXA, BEGIN CHARACTERS and MATRIX.
Comments are in between [  ]. In DnaSP there are no closing ']'; take care that at the end of comments it is closed with a closing bracket ]. The final result:

#NEXUS
[File generated by DnaSP Ver. 5.10.01; aug 27, 2017
Haplotype Data from Data File: E.derm BT2 updated.fas
Number of sequences: 29 Number of sequences used: 29
Number of Sites in the complete Data File: 429
Selected Region: 1-429
Sites with alignment gaps: not considered
Invariable sites: removed]

BEGIN TAXA;
DIMENSIONS NTAX=12;
TAXLABELS
Hap_1
Hap_2
Hap_3
Hap_4
Hap_5
Hap_6
Hap_7
Hap_8
Hap_9
Hap_10
Hap_11
Hap_12;
END;

BEGIN CHARACTERS;
DIMENSIONS NCHAR=112;
FORMAT DATATYPE=DNA MISSING=? GAP=- MATCHCHAR=.;

MATRIX
Hap_1  GAACATGGTCCGTGGCAATAGCATTCCGATTAGCGAGTATCTCTTAAGGTATGTATGTACAAAGTTGCTTGAGCACTTACGTGTCCGCTGGCAATCTATGCCCGTTGCATTT
Hap_2  ............................................................G..T........A.......................................
Hap_3  ...............................................................T........A.......................................
Hap_4  ....GCC.........GGG.............................................................................................
Hap_5  ..........................T.....A.......T...................G....C.T....A..GGC........AA.......T..........A.....
Hap_6  AGT.G..AAG.A.TTGG..........TTCCG..TGC.GAAGA.GCG.TC..TA..........................................................
Hap_7  .....C..C.T.....TC..CTC.C.T..C..A.......T.............T..CGA..CCGG..G.AGT...C.G..GA.GTCA.......G..CCG..AC.CT.C.C
Hap_8  ..G..C.........ATCC.C...C....CC..T...C.............GTGTGCCCGC.CTC.T.ACA.A.TA.A.T.CC.T.AT...TG..TACCC.TG.AAC.T.CA
Hap_9  ..G..C.........ATCC.C...C....CC..T...C.............G.GTGCCCGC.CTC.T.ACA.A.TA.A.T.CC.T.AT...TG..TACCC.TG.AAC.T.CA
Hap_10 ..G..C.........ATCC.C...C....CC..T...C.............G.G.GCCCGC.CTC.T.ACA.A.TA.A.T.CC.T.AT...TG..TACCC.TG.AAC.T.CA
Hap_11 .CGA....C...C...TC.TC..CCTA..CC.C....C.....A...AA.GC..CACGT..T.CG.CAGAT.AAGACC.AA.CCTA..CAA.GTCGCCCC....C.C.C.A.
Hap_12 ..G.....C...C...GC.TC..CCTA..CC......C.........A..GG..CACGT..T.CG.CAGAT.AAGACC.AA.CCTA..CAA.GTCGCCCC....C.C.C.A.
;
END;

After the last END; a new block is inserted 'BEGIN TRAITS;'.
What 'traits' are part of these haplotypes?

We are going to use 3 traits: clinical isolate, rock isolate, plant isolate.

BEGIN TRAITS;
DIMENSIONS NTRAITS=3;
FORMAT labels=yes separator=Comma;
[clinical, rock, plant]
TraitLabels clinical rock plant;
Matrix

;
END;

To fill in the information after 'Matrix', we are going to use the frequency table, that we kept. Hap_1 has e.g. 17 strains. On the basis of these strain numbers we know where the isolate comes from.
Imagin there are 13 clinical isolates, 3 rock isolates and 1 plant isolate. The line for Hap_1 would look like this:

Hap_1 13,3,1

For all the haplotypes these numbers have to be filled in between 'Matrix' en ;
It will look like this:

BEGIN TRAITS;
DIMENSIONS NTRAITS=3;
FORMAT labels=yes separator=Comma;
[clinical, rock, plant]
TraitLabels clinical rock plant;
Matrix
Hap_1 13,3,1
Hap_2 0,2,0
Hap_3 1,0,0
Hap_4 1,0,0
Hap_5 0,0,1
Hap_6 0,1,0
Hap_7 0,1,0
Hap_8 0,0,1
Hap_9 1,0,0
Hap_10 1,0,0
Hap_11 0,1,0
Hap_12 0,0,1
;

END;

Save the file as 'BT2-traits.nex'. Start PopART and open this file.



PopART start pagina


If everything goes well, the 3 traits should be visible under tab 'Traits'.
Calculate and draw the network by selecting: Network - Median Joining Network
For the time being the value for Epsilon can be used unchanged and click on 'OK'.

The network is drawn in black and white as default, but can be drawn in color as well. Click on the square with colored dots and choose a theme. Here you can select whether the colors should be used for the network as well the geographical map. Because we didn't add any geotags, this is not important.
The + en - symbols in the menu can be used the change the zoom factor.

In the graph the names of the Hap_ can be added. This is the final result.

PopART resultaat

 
At the end of the file you could also add 'GeoTags'.

BEGIN GeoTags;
DIMENSIONS NClusts=5;
FORMAT labels=yes separator=Spaces;
[position of the cluster on the map]
ClustLatitude 53 43.6811 5.4 -25.61 -0;
ClustLongitude 16.75 87.3311 26.5 134.355 -76;
Clustlabels Europe Azia Afrika Australia America;
Matrix
Hap_1 48.3621687364 -10.6803478956 3
Hap_1 20.9011934738 41.0061010737 10
Hap_6 -34.5248765744 156.980424598 1
Hap_5 6.47997227196 -126.310890191 1
Hap_7 12.3724817276 32.9959970947 1
Hap_8 -25.3125032726 132.069876577 1
Hap_9 -17.5420017453 -81.8875028076 1
Hap_10 -28.1278668152 133.927583142 1
Hap_11 1.90619338755 -100.675193346 1
Hap_3 -9.2031496606 156.495614547 1
Hap_4 2.76141711712 -95.3738206052 1
Hap_2 43.4068001627 40.4459241442 1
Hap_2 36.0290665027 68.1753092664 1
Hap_12 2.76141711712 32.9959970947 1
;
END;

ClustLatitude and ClustLongitude are the positions of the pie chart on the map.
The first value, 53 and 16.75 for example are the coordinates for Europe.
The values behind the Hap_ elementen are the real position of the isolates, Hap_1 has 3 isolates on one position and 10 on another. With these values PopART knows the exact position and places the result in the right pie-chart.

When starting PopART and opening the new file you have to choose 'Traits' or 'GeoTags'.
Once the network is drawn it is possible to switch between the 'views'.
It is wise with every change to recalculate the network.

PopART op de wereldkaart


Another example with Hortaea werneckii haplotypes using geographical distribution of the isolates: