Migrant detection needs a single data file that includes both the populations for which migrants will be seeked and the potential source populations for migrants.
Start GeneClass2 from your "Start" menu, folder "CBGP". The splash-screen appears, followed by the main window of GeneClass2.
Load a datafile by clicking on the "Open" button and choose a datafile
in the selector [A1].
Choose the "Detection of first generation migrants" option in the
first tab of the main window [A2].
Select the type of likelihood computation to use for migrant detection. For
instance select "L = L_home / L_max" which is the ratio of the likelihood
computed from the population where the individual was sampled (L_home) over
the highest likelihood value among all population samples including the population
where the individual was sampled (L_max) [A3]
(see Paetkau et al. 2004).

By clicking on the "2) Criteria for Computation" tab [B1] you can now select the criterion that will be used for likelihood computations. Bayesian and Frequencies-based methods appears to be better than distance-based methods (see Cornuet et al. 1999 for a comparative study). Let's for instance select Paetkau et al. (1995)'s criterion [B2]. This criterion needs a specific parameter which is the default frequency in the case of missing allele (Paetkau et al. 2004 ). You can slide the cursor [B3] to define this default value (eg. 0.01).

If you want to compute the probability that an individual is a resident (i.e.
not a first generation migrant), click on the "3) Probability computation"
tab [C1], and then check the "Enable
probability computation (Monte-Carlo resampling)" box [C2].
You can now choose a resampling algorithm [C3]
(eg. Paetkau et al. 2004; recommended
for first generation migrants detection, but see Rannala
& Mountain (1997) and Cornuet et
al. (1999)). Slide the cursors to define the minimum number of simulated
individuals [C4] (eg. 1000, default
value or 10000 leading to a ten times longer but more precise computation),
and the "Type I error (alpha)" cursor [C5]
(eg. 0.01, default value, see Cornuet et
al. (1999); Paetkau et al.
(2004)):

If needed, you can deselect some loci in the "Loci selection" tab
[D1]. Deselected loci will be
ignored during calculations.
Finally, click on the "Start" button [D2]
to run the computation.

The program displays the "Log file" [E1]
that displays the running parameters.
The progress bar and a counter shows the state of the computation [E2].
The "Stop" button [E3]
allows the computation to be aborted.

Once computations are finished, the results are displayed in a grid where potential
F0 migrants (Paetkau et al., 2004)
are labelled in red (p < threshold) [F1]
and the most likely population in green [F2].
The number of individuals with a probability below the threshold value is also
indicated [F3].
Results can be printed ("Print" button [F4])
or exported in csv format ("Export" button [F5]).
