find.quantiles {fsthet} | R Documentation |
Generates quantiles from binned Fst values
Description
This takes the output from make.bins and calculates the smoothed quantiles.
Usage
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
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)
[Package fsthet version 1.0.1 Index]