Population Genetics Data Analysis
domingo, 13 de julho de 2014
quarta-feira, 31 de outubro de 2012
segunda-feira, 9 de abril de 2012
R code for HW exact test
I show above a simple R code to perform Fisher's exact test using "pegas" package.
Enjoy!!!
Enjoy!!!
require(adegenet) #load genepop/genetix/fstat datasets into R
require(pegas) #summary loci statistics as HE and HO and Fisher exact test for genotype/alles proportions
mydataset.genind<-read.genepop("MyData.gen",quiet=TRUE) #adegenet function
mydataset.genind
validObject( mydataset.genind ) #if TRUE == "is a genind object"
summary( mydataset.genind ) #alleles frequencies and HE/HO per locus
mydataset.loci<- as.loci( mydataset.genind ) #to converto to "pegas" object as.loci
mydataset.loci
HWtest<-function(x){hw.test(x, B=10000)} #I defined a R function that contains pegas' hw.test to change the number of Monte Carlo replications
HWtest( mydataset.loci ) #I used that "new function" to obtaint the test
require(pegas) #summary loci statistics as HE and HO and Fisher exact test for genotype/alles proportions
mydataset.genind<-read.genepop("MyData.gen",quiet=TRUE) #adegenet function
mydataset.genind
validObject( mydataset.genind ) #if TRUE == "is a genind object"
summary( mydataset.genind ) #alleles frequencies and HE/HO per locus
mydataset.loci<- as.loci( mydataset.genind ) #to converto to "pegas" object as.loci
mydataset.loci
HWtest<-function(x){hw.test(x, B=10000)} #I defined a R function that contains pegas' hw.test to change the number of Monte Carlo replications
HWtest( mydataset.loci ) #I used that "new function" to obtaint the test
sábado, 17 de março de 2012
terça-feira, 17 de janeiro de 2012
domingo, 11 de dezembro de 2011
New era of Population Genetics data analysis
As we have already know the R environment and other open sources tools are changing the way we perform and think on data analysis. And this revolution is touching the population genetics data analysis as well. Recently I discovered (so late) two very interesting R packages that perform basic and multivariate statistical analysis on gene frequencies accounted from populations. These packages are “pegas” and “adegenet”. The former I am using to test HW equilibrion (loci), gametic disequilibrium and F-statistics. The later I am using to access population structure (or sub-structure) into my data set through multivariate methods. For more information I recommend:
‘pegas’ page:
‘adegenet’ page:
Assinar:
Comentários (Atom)