Usage Arguments Value Examples
View source: R/fst.pairwise.dioecious.R
1 2 | fst.pairwise.dioecious(N,i,j,xi,xj,ti,tj,si,sj)
fst.pairwise.dioecious(folder.name,i,j,xi,xj,ti,tj,si,sj)
|
N |
A 4-D array (ex: |
folder.name |
Character string giving the name of the folder where the results of |
i, xi, ti |
Identifiers of the first group of individuals: it specifies the individuals of deme |
i, xi, ti |
Identifiers of the second group of individuals: as above. |
si, sj |
Identifiers of the sex of the first and second group of individuals. Character string: |
Pairwise genetic differentiation index Fst calculated as ratio of heterozygosities: (Ht - Hs) / Ht
. Ht
is the expected heterozygosity over the population formed by the two groups. Hs
is the average expected heterozygosity over the two groups. The average is weighted by the number of individuals in each group: Hs = (n_i * H_S_i + n_j * H_S_j)/(n_i + n_j)
where n_i
and n_j
are the number of individuals in the first and second group, respectively, and H_s_i
and H_s_j
are the expected heterozygosities in the first and second group, respectively.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Load the example data and simulates metapopulation genetics
data(FourPopDioecious)
N <- sim.metapopgen.dioecious(input.type="array", N1_M=N1_M, N1_F=N1_F, sigma_M=sigma_M, sigma_F=sigma_F, phi_F=phi_F, phi_M=phi_M, mu=mu, delta=delta, settler.surv=settler.surv)
# Calculates fst between various pairs of groups of individuals
fst.pairwise.dioecious(N,1,2,1,1,5,5,"M","M") # Between one-year old male individuals of deme 1 and 2 at time 5
fst.pairwise.dioecious(N,1,1,1,1,5,5,"M","F") # Between male and female one-year old individuals of deme 1 at time 5
# Example with results from sim.metapopgen.dioecious saved on disk
data(FourPopDioecious)
N <- sim.metapopgen.dioecious(input.type="array", N1_M=N1_M, N1_F=N1_F, sigma_M=sigma_M, sigma_F=sigma_F, phi_F=phi_F, phi_M=phi_M, mu=mu, delta=delta, settler.surv=settler.surv, save.res=T)
# Let us assume that results are stored in a folder named "2014-avr.-11-12.53"
fst.pairwise.dioecious("2014-avr.-11-12.53",1,1,1,1,5,5,"M","F") # Between male and female one-year old individuals of deme 1 at time 5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.