find.quantiles: Generates quantiles from binned Fst values

Description Usage Arguments Value Examples

Description

This takes the output from make.bins and calculates the smoothed quantiles.

Usage

1
find.quantiles(bins,bin.fst,ci=0.05)

Arguments

bins

A dataframe containing with upper and lower het and Fst values for each bin (output from make.bins).

bin.fst

A list with the Fst values for each bin (output from make.bins).

ci

A value for the confidence intervals alpha (default is 0.05).

Value

fst.CI

A list of data.frames, one for each ci value with the upper and lower Fst quantiles for each Heterozygosity bin.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
  nloci<-(ncol(gpop)-2)
  boot.out<-as.data.frame(t(replicate(nloci, fst.boot.onecol(gpop,"fst"))))
  bins<-make.bins(boot.out,25,Ht.name="V1",Fst.name="V2")
  fst.CI<-find.quantiles(bins$bins,bins$bin.fst)

fsthet documentation built on May 2, 2019, 7:55 a.m.