[Genabel-commits] r956 - pkg/GenABEL/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 17 12:45:56 CEST 2012
Author: yurii
Date: 2012-09-17 12:45:56 +0200 (Mon, 17 Sep 2012)
New Revision: 956
Modified:
pkg/GenABEL/man/GC.Rd
pkg/GenABEL/man/GC_ovdom.Rd
pkg/GenABEL/man/findRelatives.Rd
pkg/GenABEL/man/grammar.Rd
pkg/GenABEL/man/ibs.Rd
pkg/GenABEL/man/polygenic_hglm.Rd
pkg/GenABEL/man/reconstructNPs.Rd
Log:
trying to cut the time spent in examples
Modified: pkg/GenABEL/man/GC.Rd
===================================================================
--- pkg/GenABEL/man/GC.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/GC.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -49,6 +49,8 @@
}
\examples{
data(ge03d2)
+set.seed(1)
+ge03d2 <- ge03d2[sample(1:nids(ge03d2),200),1:1000]
qts=mlreg(phdata(ge03d2)$dm2~1,data=ge03d2,gtmode = "dominant")
chi2.1df=results(qts)$chi2.1df
s=summary(ge03d2)
Modified: pkg/GenABEL/man/GC_ovdom.Rd
===================================================================
--- pkg/GenABEL/man/GC_ovdom.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/GC_ovdom.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -39,6 +39,8 @@
}
\examples{
data(ge03d2)
+set.seed(1)
+ge03d2 <- ge03d2[sample(1:nids(ge03d2),200),1:1000]
qts=mlreg(phdata(ge03d2)$dm2~1,data=ge03d2,gtmode = "overdominant")
chi2.1df=results(qts)$chi2.1df
s=summary(ge03d2)
Modified: pkg/GenABEL/man/findRelatives.Rd
===================================================================
--- pkg/GenABEL/man/findRelatives.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/findRelatives.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -113,6 +113,7 @@
df <- ge03d2.clean[,autosomal(ge03d2.clean)]
df <- df[,sort(sample(1:nsnps(df),1000))]
eaf <- summary(gtdata(df))$"Q.2"
+\\donotrun{
relInfo <- findRelatives(df[27:30,],q=eaf)
relInfo
# look only for 1st and 2nd degree relatives
@@ -121,5 +122,6 @@
relInfoVS <- findRelatives(df[27:30,],q=eaf,nmeivec=c(1:6),vsIDs=idnames(df[27:30,])[1:2])
relInfoVS
}
+}
\keyword{htest}
Modified: pkg/GenABEL/man/grammar.Rd
===================================================================
--- pkg/GenABEL/man/grammar.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/grammar.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -51,10 +51,10 @@
\examples{
# Using clean ge03d2 data
data(ge03d2.clean)
-#take half for speed
-ge03d2.clean <- ge03d2.clean[1:300,]
+#take small piece for speed
+ge03d2.clean <- ge03d2.clean[1:200,]
# estimate genomic kinship
-gkin <- ibs(ge03d2.clean,w="freq")
+gkin <- ibs(ge03d2.clean[,sample(autosomal(ge03d2.clean),1000)],w="freq")
# perform polygneic analysis
h2ht <- polygenic(height ~ sex + age,kin=gkin,ge03d2.clean)
h2ht$est
@@ -91,8 +91,7 @@
related individuals. PLoS One. 2007 Dec 5;2(12):e1274.
GRAMMAR-Gamma: Svisheva GR, Axenovich TI, Belonogova MN,
- van Duijn CM, Aulchenko YS. Rapid variance componentsÐbased
- method for whole-genome association analysis
+ van Duijn CM, Aulchenko YS.
(\link{http://dx.doi.org/10.1038/ng.2410})
}
\seealso{
Modified: pkg/GenABEL/man/ibs.Rd
===================================================================
--- pkg/GenABEL/man/ibs.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/ibs.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -71,7 +71,7 @@
}
\examples{
data(ge03d2c)
-
+set.seed(1)
# compute IBS based on a random sample of 1000 autosomal marker
selectedSnps <- sample(autosomal(ge03d2c),1000,replace=FALSE)
a <- ibs(ge03d2c,snps=selectedSnps)
@@ -87,7 +87,7 @@
# PAINT THE OUTLIERS IN RED
points(mds[cl1,],pch=19,col="red")
# compute genomic kinship matrix to be used with e.g. polygenic, mmscore, etc
-a <- ibs(ge03d2c,snps=sample(autosomal(ge03d2c),1000,replace=FALSE),weight="freq")
+a <- ibs(ge03d2c,snps=selectedSnps,weight="freq")
a[1:5,1:5]
# now replace diagonal with EIGENSTRAT-type of diaganal to be used for egscore
diag(a) <- hom(ge03d2c[,autosomal(ge03d2c)])$Var
@@ -95,8 +95,8 @@
##############################
# compare 'freq' with 'eVar'
##############################
-ibsFreq <- ibs(ge03d2c[,autosomal(ge03d2c)], weight="freq")
-ibsEvar <- ibs(ge03d2c[,autosomal(ge03d2c)], weight="eVar")
+ibsFreq <- ibs(ge03d2c,snps=selectedSnps, weight="freq")
+ibsEvar <- ibs(ge03d2c,snps=selectedSnps, weight="eVar")
mdsEvar <- cmdscale( as.dist( 0.5 - ibsEvar ) )
plot(mdsEvar)
outliers <- (mdsEvar[,1]>0.1)
Modified: pkg/GenABEL/man/polygenic_hglm.Rd
===================================================================
--- pkg/GenABEL/man/polygenic_hglm.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/polygenic_hglm.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -50,7 +50,8 @@
}
\examples{
data(ge03d2ex.clean)
-df <- ge03d2ex.clean[,autosomal(ge03d2ex.clean)]
+set.seed(1)
+df <- ge03d2ex.clean[sample(1:nids(ge03d2ex.clean),200),autosomal(ge03d2ex.clean)]
gkin <- ibs(df,w="freq")
# ----- for quantitative traits
Modified: pkg/GenABEL/man/reconstructNPs.Rd
===================================================================
--- pkg/GenABEL/man/reconstructNPs.Rd 2012-09-17 10:36:45 UTC (rev 955)
+++ pkg/GenABEL/man/reconstructNPs.Rd 2012-09-17 10:45:56 UTC (rev 956)
@@ -27,7 +27,7 @@
two parents is >2 (coded as 'NA').
}
\examples{
-nloci <- 1000
+nloci <- 100
q <- runif(nloci,min=0.05,max=0.95)
# g7---g8
# _|_
More information about the Genabel-commits
mailing list