How to make an Arlequin input file

By Peter Unmack

First, make sure you sort your individuals by population so that they are all grouped together. It is not absolutely necessary, but makes life easier.

Open DnaSP, open your nexus file (or other format, there are several options), close the next dialog box.

Go Data, format, set it to haploid and set it to mitochondrial, hit ok.

Go Data, define sequence sets. Select sequences on the left side by population, hit the >> button, hit add new sequence set and give it a name. It seems as names cannot be solely numeric. Continue this through the entire dataset. For outgroups and other sequences that you donít want to include just make a sequence set called others or outgroups. For most analyses you should group individuals based on population, do not combine populations (e.g., don't group them by river, that should be done in Arlequin, if you do it here it screws up your analysis).

When you are done hit update all entries. This will close that window.

If you need to check/change your sequence sets then go Data, define sequence sets again (assuming you have closed it already). Click the drop down menu (by default it says New Sequence Set) in the bottom left corner. This list has all of your defined sequence sets. Select a sequence set and the list of individuals will appear in the upper right hand side. If you make any changes be sure to hit update (the upper right big button in the bottom right corner) as you change each population or you will loose any modifications you make.

Go File, save/export data as, choose nexus data format, rename your file (I suggest you add DnaSP before .nex). If you donít do this and you need to make any modifications then you will need to start from scratch. Anytime you make changes in DnaSP make sure you reexport the nexus file. You can also choose Go File, update nexus data file, but only do this after you have renamed it via export first.

Now Go File, save/export data as, choose arlequin data format. It will ask you for a haplotype data file name to save, choose the name of your datafile and hit save, it will then ask you for an arlequin project file name, choose the same name (the file extension will be different), hit save. Make sure you save both file to the same directory, each save file as window starts in the same directory, so if you change it for one you must change it for both.

Next you should check to see that all of the sequences are included in a group. Open the .arp file you just exported in a text editor, scroll to the end of the file. Check that the last group doesn't start with SampleName = "Additional_Seqs". If it does then you'll need to figure out what you've missed. The most accurate way is to take the .hap file, add it to your nexus file (first search and replace two paragraph marks with a single one in the .hap file, i.e., find ^p^p and replace with ^p). Run a neighbor joining tree to see which haplotype numbers correspond to which samples and figure out from the list of haplotypes under "Additional_Seqs" which samples were not included in the groupings in DnaSP.

Now open Arlequin, hit open project, select the arp file you just exported from DnaSP. Go to the second tab called structure editor. Each of your populations has a value of 0. You use this to group your populations into units for analysis in Arlequin. If you wish to do it by population then give each population a unique number (note that this will not run, you must have some populations grouped together, if you need to run by population then you need to setup things in DnaSP differently such that you can group them in Arlequin), if you wish to group populations then give them the same number. Anything that you want excluded (like outgroups), just leave them as 0. Once you have the populations correctly designated hit update project under the structure editor tab. This will save the changes to your arlequin file. I usually save a different arlequin file for each different grouping scheme I use. You can copy the file exported from DnaSP to a new directory, rename it and move it back to the original directory. Open it in Arlequin, make your changes to the structure editor and update it when done. You can check that your file is good (or at least that it will run) by selecting the third tab called settings, select amova, click in the upper most box on the right side (standard amova calculations). This will run and open the output file in your html browser. Scroll down and check that it did not give any error messages about structure.

Back to Unmack's Molecular Phylogenetics page.