fst.boot.means: Calculates mean values within the bins.

Description Usage Arguments Value Examples

View source: R/fsthet.R

Description

This calculates mean heterozygosity and Fst values for each bin used in bootstrapping.

Usage

1
fst.boot.means(boot.out)

Arguments

boot.out

The first item in the output lists from fst.boot (aka boot.out[[1]].

Value

bmu

A dataframe containing four columns: heterozygosity Fst the number of loci in the bin the lower Ht value for the bin and the upper Ht value for the bin.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  gpop<-data.frame(popinfo=c(rep("POP 1", 20),rep("POP 2", 20)),ind.names=c(1:20,1:20))
   for(i in 1:40){
    gpop[1:20,(i+2)]<-sample(c("0101","0102","0202"),20,replace=TRUE)
    gpop[21:40,(i+2)]<-sample(c("0101","0102","0202"),20,replace=TRUE)
   }
    fsts<-calc.actual.fst(gpop)
  boot.out<-as.data.frame(t(replicate(1, fst.boot(gpop))))
  outliers<-find.outliers(fsts,boot.out)
## Not run: 
  gfile<-system.file("extdata", "example.genepop.txt",package = 'fsthet')
  gpop<-my.read.genepop(gfile)
  fsts<-calc.actual.fst(gpop)
  boot.out<-as.data.frame(t(replicate(10, fst.boot(gpop))))
  outliers<-find.outliers(fsts,boot.out)

## End(Not run)

fsthet documentation built on March 21, 2018, 1:04 a.m.