F.stat: Head function to calculate F statistics.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculation of F_{is} values for a single population and several loci. Calculations are based on statistics from Weir and Cockerham 1984 and Nei 1983.

Usage

1
2
3
     F.stat(tab.pop, object = TRUE, iteration = 1000, 
            directory.name = "NA", out.name = "NA")
     

Arguments

tab.pop

A file with a dataframe containing genetic information with format inputformat.

object

logical - whether data are object or file.

iteration

Number of bootstrap replicates

directory.name

Directory name where files should be exported. Directory must be present when running the function. If set as "NA" results are only printed on screen.

out.name

Name of file for exporting summary of statistics.

Details

This function is executed by Demerelate when Fis set as TRUE. However, F_{is} values can be calculated on single populations without the need of doing a whole new relatedness analysis. This may be useful if F_{is} values were not calculated in the first place. Be sure that the path already is present prior to analysis. However, if set as NA results are printed on screen or exported to an object. Inputdata will be splitted by population names and calculations will be made for each single population. Note that mean F_{is} values calculated by Weir and Cockerham's method are either given as arithmetic mean of single loci F_{is} and as weighted average over loci, which should be unbiased to a first aproximation according to Weir and Cockerham 1984. Since there are many ways to calculate mean F_{is} and all may serve in different situations as a 'good' estimate you should spent some thoughts on this issue.

Value

Function returns a list for each population containing the following information:

output.fis[[1]]

Empirical F_{is} values according to Nei 1983.

output.fis[[2]]

Empirical F_{is} values according to Weir and Cockerham 1984.

output.fis[[3]]

p values for significance for F_{is} values according to Nei 1983.

output.fis[[4]]

p values for significance for F_{is} values according to Weir and Cockerham 1984.

Additionally, a file will be generated containing all these information if file.output is set as TRUE or alternatively when directory.name and out.name are given.

SummaryPopulationout.name.txt

Combined output with different F_{is} metrices and allele\genotype frequencies

Author(s)

Philipp Kraemer, <philipp.kraemer@uni-oldenburg.de>

References

Weir, B.S. and Cockerham, C.C. (1984) Estimating F-Statistics for the analysis of population structure. Evolution, 38, 1358-1370.
Nei, M. (1977) F-statistics and analysis of gene diversity in subdivided populations. Annals of Human Genetics, 41, 225-233.
Nei, M. and Chesser R.K. (1983) Estimation of fixation indices and gene diversities. Annals of Human Genetics, 47, 253-259.

See Also

Fis.calc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
        ## Fis statistics are calculated on demerelpop. Weir and Cockerham
        ## and Nei estimates are provided and either written to an object
        ## or to a file.
        ## For end results iteration of 1000 is recommended.


	      data(demerelpop)
	      fstat.results <- F.stat(demerelpop, iteration = 10, 
                                directory.name = "NA", 
                                out.name = "NA")
        
     

Demerelate documentation built on May 2, 2019, 4:01 p.m.