[adegenet-commits] r831 - in pkg: . man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 1 17:05:42 CET 2011
Author: jombart
Date: 2011-03-01 17:05:41 +0100 (Tue, 01 Mar 2011)
New Revision: 831
Modified:
pkg/DESCRIPTION
pkg/man/dapc.Rd
pkg/man/genlight.Rd
pkg/man/glAux.Rd
pkg/man/glPca.Rd
pkg/man/glSim.Rd
pkg/man/seppop.Rd
Log:
Yeepeeeeeee !
All works. All documented.
Package passes the check with no warning.
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/DESCRIPTION 2011-03-01 16:05:41 UTC (rev 831)
@@ -10,6 +10,6 @@
Suggests: ade4, genetics, hierfstat, spdep, tripack, ape, pegas, graph, RBGL, seqinr, multicore
Depends: methods, MASS
Description: Classes and functions for genetic data analysis within the multivariate framework.
-Collate: classes.R basicMethods.R handling.R auxil.R setAs.R find.clust.R hybridize.R scale.R fstat.R import.R seqTrack.R chooseCN.R genind2genpop.R loadingplot.R sequences.R gstat.randtest.R makefreq.R colorplot.R monmonier.R spca.R coords.monmonier.R haploGen.R old2new.R spca.rtests.R dapc.R haploPop.R PCtest.R dist.genpop.R Hs.R propShared.R export.R HWE.R propTyped.R inbreeding.R SNPbin.R glHandle.R glFunctions.R zzz.R
+Collate: classes.R basicMethods.R handling.R auxil.R setAs.R find.clust.R hybridize.R scale.R fstat.R import.R seqTrack.R chooseCN.R genind2genpop.R loadingplot.R sequences.R gstat.randtest.R makefreq.R colorplot.R monmonier.R spca.R coords.monmonier.R haploGen.R old2new.R spca.rtests.R dapc.R haploPop.R PCtest.R dist.genpop.R Hs.R propShared.R export.R HWE.R propTyped.R inbreeding.R SNPbin.R glHandle.R glPlot.R glFunctions.R zzz.R
License: GPL (>=2)
LazyLoad: yes
Modified: pkg/man/dapc.Rd
===================================================================
--- pkg/man/dapc.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/dapc.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -52,7 +52,7 @@
\method{summary}{dapc}(object, \dots)
-\method{scatter}{dapc}(x, xax=1, yax=2, col=rainbow(length(levels(x$grp))), pch=20,
+\method{scatter}{dapc}(x, xax=1, yax=2, grp=NULL, col=rainbow(length(levels(x$grp))), pch=20,
posi="bottomleft", bg="grey", ratio=0.3, cstar = 1,
cellipse = 1.5, axesell = TRUE, label = levels(x$grp),
clabel = 1, xlim = NULL, ylim = NULL, grid = TRUE, addaxes =
@@ -66,7 +66,8 @@
\item{x}{\code{a data.frame}, \code{matrix}, or \code{\linkS4class{genind}}
object. For the \code{data.frame} and \code{matrix} arguments, only
quantitative variables should be provided.}
- \item{grp,pop}{a \code{factor} indicating the group membership of individuals}
+ \item{grp,pop}{a \code{factor} indicating the group membership of
+ individuals; for \code{scatter}, an optional grouping of individuals.}
\item{n.pca}{an \code{integer} indicating the number of axes retained in the
Principal Component Analysis (PCA) step. If \code{NULL}, interactive selection is triggered.}
\item{n.da}{an \code{integer} indicating the number of axes retained in the
Modified: pkg/man/genlight.Rd
===================================================================
--- pkg/man/genlight.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/genlight.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -23,6 +23,8 @@
\alias{pop<-,genlight-method}
\alias{NA.posi}
\alias{NA.posi,genlight-method}
+\alias{other,genlight-method}
+\alias{other<-,genlight-method}
\alias{as,genlight,matrix-method}
\alias{coerce,genlight,matrix-method}
\alias{as.matrix.genlight}
@@ -149,7 +151,11 @@
indicating the population of each individual, if provided when the
object was contructed.}
\item{pop<-}{\code{signature(x = "genlight")}: sets the population
- of each individual using a factor of length \code{nInd(x)}.}
+ of each individual using a factor of length \code{nInd(x)}.}
+ \item{pop}{\code{signature(x = "genlight")}: returns the content of
+ the slot \code{@other}.}
+ \item{pop<-}{\code{signature(x = "genlight")}: sets the content of
+ the slot \code{@other}.}
\item{as.matrix}{\code{signature(x = "genlight")}: converts a
\code{genlight} object into a matrix of integers, with individuals
in rows and SNPs in columns. The S4 method 'as' can be used as
Modified: pkg/man/glAux.Rd
===================================================================
--- pkg/man/glAux.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/glAux.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -4,6 +4,7 @@
\alias{glNA}
\alias{glMean}
\alias{glVar}
+\alias{glDotProd}
\title{Auxiliary functions for genlight objects}
\description{
These functions provide facilities for usual computations using
@@ -20,12 +21,17 @@
- \code{glMean}: computes the mean number of second allele in each SNP.
- \code{glVar}: computes the variance of the number of second allele in each SNP.
+
+ - \code{glDotProd}: computes dot products between (possibly
+ centred/scaled) vectors of individuals - uses compiled C code - used
+ by glPca.
}
\usage{
glSum(x, alleleAsUnit = TRUE, useC = FALSE)
glNA(x, alleleAsUnit = TRUE)
glMean(x, alleleAsUnit = TRUE)
glVar(x, alleleAsUnit = TRUE)
+glDotProd(x, center = FALSE, scale = FALSE, alleleAsUnit = FALSE)
}
\arguments{
\item{x}{a \linkS4class{genlight} object}
@@ -33,6 +39,10 @@
considered as units (i.e., a diploid genotype equals two samples, a
triploid, three, etc.) or whether individuals are considered as
units of information.}
+ \item{center}{a logical indicating whether SNPs should be centred to
+ mean zero.}
+ \item{scale}{a logical indicating whether SNPs should be scaled to
+ unit variance.}
\item{useC}{a logical indicating whether compiled C code should be
used (TRUE) or not (FALSE, default). Pure-R code is more efficient
for small number of individuals; C-code is expected to be more
@@ -70,6 +80,12 @@
- \code{\link{dapc}}: Discriminant Analysis of Principal Components.
+ - \code{\link{glPca}}: PCA for \linkS4class{genlight} objects.
+
+ - \code{\link{glSim}}: a simple simulator for \linkS4class{genlight} objects.
+
+ - \code{\link{glPlot}}: plotting \linkS4class{genlight} objects.
+
}
\author{ Thibaut Jombart \email{t.jombart at imperial.ac.uk} }
\examples{
Modified: pkg/man/glPca.Rd
===================================================================
--- pkg/man/glPca.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/glPca.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -27,7 +27,7 @@
}
\usage{
glPca(x, center = TRUE, scale = FALSE, nf = NULL, loadings = TRUE,
- multicore = require("multicore"), n.cores = NULL)
+ alleleAsUnit = FALSE, useC = TRUE, multicore = require("multicore"), n.cores = NULL)
\method{print}{glPca}(x, \dots)
@@ -58,9 +58,17 @@
should be computed (TRUE, default), or not (FALSE). Vectors of
loadings are not always useful, and can take a large amount of
RAM when millions of SNPs are considered.}
- \item{multicore}{a logical indicating whether multiple cores -if available- should be
- used for the computations (TRUE, default), or not (FALSE); requires
- the package \code{multicore} to be installed (see details).}
+ \item{alleleAsUnit}{a logical indicating whether alleles are
+ considered as units (i.e., a diploid genotype equals two samples, a
+ triploid, three, etc.) or whether individuals are considered as
+ units of information.}
+ \item{useC}{a logical indicating whether compiled C code should be
+ used for faster computations; this option cannot be used alongside
+ multicore option.}
+ \item{multicore}{a logical indicating whether multiple cores -if
+ available- should be used for the computations (TRUE, default), or
+ not (FALSE); requires the package \code{multicore} to be installed
+ (see details); this option cannot be used alongside useCoption.}
\item{n.cores}{if \code{multicore} is TRUE, the number of cores to be
used in the computations; if NULL, then the maximum number of cores
available on the computer is used.}
@@ -109,6 +117,10 @@
install.packages("multicore",,"http://rforge.net/",type="source")
DO NOT use the version on CRAN, which is slightly outdated.
+
+ Lastly, note that using compiled C code (\code{useC=TRUE})is an
+ alternative for speeding up computations, but cannot be used together
+ with the multicore option.
}
\value{
=== glPca objects ===\cr
@@ -132,7 +144,11 @@
\seealso{
- \code{\link{genlight}}: class of object for storing massive binary
SNP data.
-
+
+ - \code{\link{glSim}}: a simple simulator for \linkS4class{genlight} objects.
+
+ - \code{\link{glPlot}}: plotting \linkS4class{genlight} objects.
+
- \code{\link{dapc}}: Discriminant Analysis of Principal Components.
}
Modified: pkg/man/glSim.Rd
===================================================================
--- pkg/man/glSim.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/glSim.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -54,20 +54,28 @@
\seealso{
- \code{\link{genlight}}: class of object for storing massive binary
SNP data.
+
+ - \code{\link{glPlot}}: plotting \linkS4class{genlight} objects.
+
+ - \code{\link{glPca}}: PCA for \linkS4class{genlight} objects.
}
\author{ Thibaut Jombart \email{t.jombart at imperial.ac.uk} }
\examples{
## no structure
x <- glSim(100, 1e3, ploid=2)
-image(t(as.matrix(x)), xlab="SNPs", ylab="Individuals", xaxt="n", yaxt="n")
+plot(x)
## 1,000 non structured SNPs, 100 structured SNPs
x <- glSim(100, 1e3, n.snp.struc=100, ploid=2)
-image(t(as.matrix(x)), xlab="SNPs", ylab="Individuals", xaxt="n", yaxt="n")
+plot(x)
+## 1,000 non structured SNPs, 100 structured SNPs, ploidy=4
+x <- glSim(100, 1e3, n.snp.struc=100, ploid=4)
+plot(x)
+
## same thing, stronger differences between groups
x <- glSim(100, 1e3, n.snp.struc=100, ploid=2, alpha=0.4)
-image(t(as.matrix(x)), xlab="SNPs", ylab="Individuals", xaxt="n", yaxt="n")
+plot(x)
}
\keyword{multivariate}
\ No newline at end of file
Modified: pkg/man/seppop.Rd
===================================================================
--- pkg/man/seppop.Rd 2011-03-01 11:57:12 UTC (rev 830)
+++ pkg/man/seppop.Rd 2011-03-01 16:05:41 UTC (rev 831)
@@ -20,7 +20,7 @@
\S4method{seppop}{genind}(x,pop=NULL,truenames=TRUE,res.type=c("genind","matrix"),
drop=FALSE, treatOther=TRUE, quiet=TRUE)
-\S4method{seppop}{genind}(x,pop=NULL, treatOther=TRUE, quiet=TRUE)
+\S4method{seppop}{genlight}(x,pop=NULL, treatOther=TRUE, quiet=TRUE)
}
\arguments{
\item{x}{a \linkS4class{genind} object}
More information about the adegenet-commits
mailing list