[adegenet-commits] r548 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 5 16:10:18 CET 2010
Author: jombart
Date: 2010-02-05 16:10:18 +0100 (Fri, 05 Feb 2010)
New Revision: 548
Modified:
pkg/man/dapc.Rd
pkg/man/eHGDP.Rd
Log:
Finished doc of DAPC. working on eHGDP.
Modified: pkg/man/dapc.Rd
===================================================================
--- pkg/man/dapc.Rd 2010-02-02 11:07:36 UTC (rev 547)
+++ pkg/man/dapc.Rd 2010-02-05 15:10:18 UTC (rev 548)
@@ -111,9 +111,19 @@
more details).}
}
\details{
- The Discriminant Analysis of Principal Components (DAPC) is designed to
- investigatey. \cr
+ The Discriminant Analysis of Principal Components (DAPC) is designed
+ to investigate the genetic structure of biological populations. This
+ multivariate method consists in a two-steps procedure. First, genetic
+ data are transformed (centred, possibly scaled) and submitted to a
+ Principal Component Analysis (PCA). Second, principal components of
+ PCA are submitted to a Linear Discriminant Analysis (LDA). A trivial
+ matrix operation allows to express discriminant functions as linear
+ combination of alleles, therefore allowing one to compute allele
+ contributions. More details about the computation of DAPC are to be
+ found in the indicated reference.
+ DAPC does not infer genetic clusters ex nihilo; for this, see the
+ \code{\link{find.clusters}} function.
}
\value{
=== dapc objects ===\cr
Modified: pkg/man/eHGDP.Rd
===================================================================
--- pkg/man/eHGDP.Rd 2010-02-02 11:07:36 UTC (rev 547)
+++ pkg/man/eHGDP.Rd 2010-02-05 15:10:18 UTC (rev 548)
@@ -1,6 +1,6 @@
\encoding{UTF-8}
-\name{microbov}
-\alias{microbov}
+\name{eHGDP}
+\alias{eHGDP}
\docType{data}
\title{Microsatellites genotypes of 15 cattle breeds}
\description{
@@ -10,9 +10,9 @@
15 breeds. Individuals were chosen in order to avoid pseudoreplication
according to their exact genealogy.
}
-\usage{data(microbov)}
+\usage{data(eHGDP)}
\format{
- \code{microbov} is a genind object with 3 supplementary components:
+ \code{eHGDP} is a genind object with 3 supplementary components:
\describe{
\item{coun}{a factor giving the country of each individual (AF:
Afric; FR: France).}
@@ -32,74 +32,10 @@
\bold{39}: 545--567.
}
\examples{
-data(microbov)
-microbov
-summary(microbov)
+data(eHGDP)
+eHGDP
-# make Y, a genpop object
-Y <- genind2genpop(microbov)
-# make allelic frequency table
-temp <- makefreq(Y,missing="mean")
-X <- temp$tab
-nsamp <- temp$nobs
-# perform 1 PCA per marker
-
-if(require(ade4)){
-kX <- ktab.data.frame(data.frame(X),Y at loc.nall)
-
-kpca <- list()
-for(i in 1:30) {kpca[[i]] <- dudi.pca(kX[[i]],scannf=FALSE,nf=2,center=TRUE,scale=FALSE)}
}
-
-sel <- sample(1:30,4)
-col = rep('red',15)
-col[c(2,10)] = 'darkred'
-col[c(4,12,14)] = 'deepskyblue4'
-col[c(8,15)] = 'darkblue'
-
-# display %PCA
-par(mfrow=c(2,2))
-for(i in sel) {
-s.multinom(kpca[[i]]$c1,kX[[i]],n.sample=nsamp[,i],coulrow=col,sub=Y at loc.names[i])
-add.scatter.eig(kpca[[i]]$eig,3,xax=1,yax=2,posi="top")
-}
-
-# perform a Multiple Coinertia Analysis
-kXcent <- kX
-for(i in 1:30) kXcent[[i]] <- as.data.frame(scalewt(kX[[i]],center=TRUE,scale=FALSE))
-mcoa1 <- mcoa(kXcent,scannf=FALSE,nf=3, option="uniform")
-
-# coordinated %PCA
-mcoa.axes <- split(mcoa1$axis,Y at loc.fac)
-mcoa.coord <- split(mcoa1$Tli,mcoa1$TL[,1])
-var.coord <- lapply(mcoa.coord,function(e) apply(e,2,var))
-
-par(mfrow=c(2,2))
-for(i in sel) {
-s.multinom(mcoa.axes[[i]][,1:2],kX[[i]],n.sample=nsamp[,i],coulrow=col,sub=Y at loc.names[i])
-add.scatter.eig(var.coord[[i]],2,xax=1,yax=2,posi="top")
-}
-
-# reference typology
-par(mfrow=c(1,1))
-s.label(mcoa1$SynVar,lab=microbov at pop.names,sub="Reference typology",csub=1.5)
-add.scatter.eig(mcoa1$pseudoeig,nf=3,xax=1,yax=2,posi="top")
-
-# typologial values
-tv <- mcoa1$cov2
-tv <- apply(tv,2,function(c) c/sum(c))*100
-rownames(tv) <- Y at loc.names
-tv <- tv[order(Y at loc.names),]
-
-par(mfrow=c(3,1),mar=c(5,3,3,4),las=3)
-for(i in 1:3){
-barplot(round(tv[,i],3),ylim=c(0,12),yaxt="n",main=paste("Typological value -
-structure",i))
-axis(side=2,at=seq(0,12,by=2),labels=paste(seq(0,12,by=2),"\%"),cex=3)
-abline(h=seq(0,12,by=2),col="grey",lty=2)
-}
-
-}
\keyword{datasets}
More information about the adegenet-commits
mailing list