Description Usage Arguments Details Value Note Author(s) See Also Examples
This function combines all raw data sources in a single, unified data object of class gpData. This is a list with elements for phenotypic, genotypic, marker map, pedigree and further covariate data. All elements are optional.
1 2 3 |
pheno |
|
geno |
|
map |
|
pedigree |
Object of class |
family |
|
covar |
|
reorderMap |
|
map.unit |
|
repeated |
This column is used to identify the replications of the phenotypic values. The unique values become the names of the third dimension of the pheno object in the |
modCovar |
|
na.string |
|
cores |
|
The class gpData is designed to provide a unified framework for data related to genomic prediction analysis. Every data source can be omitted. In this case, the corresponding argument must be NULL. By default (argument reorderMap), markers in geno are ordered by their position in map. Individuals are ordered in alphabetical order.
An object of class gpData can contain different subsets of individuals or markers in the elements pheno, geno and pedigree. In this case the id in covar comprises all individuals that either appear in pheno, geno and pedigree. Two additional columns in covar named phenotyped and genotyped are automatically generated to identify individuals that appear in the corresponding gpData object.
Object of class gpData which is a list with the following elements
covar |
|
pheno |
|
geno |
|
pedigree |
object of class |
map |
|
phenoCovars |
|
info |
|
In case of missing row names or column names in one item, information is substituted from other elements (assuming the same order of individuals/markers) and a warning specifying the assumptions is returned. Please check them carefully.
Valentin Wimmer and Hans-Juergen Auinger with contributions be Peter VandeHaar
codeGeno, summary.gpData, gpData2data.frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | set.seed(123)
# 9 plants with 2 traits
n <- 9 # only for n > 6
pheno <- data.frame(Yield = rnorm(n,200,5), Height=rnorm(n,100,1))
rownames(pheno) <- letters[1:n]
# marker matrix
geno <- matrix(sample(c("AA","AB","BB",NA),size=n*12,replace=TRUE,
prob=c(0.6,0.2,0.1,0.1)),nrow=n)
rownames(geno) <- letters[n:1]
colnames(geno) <- paste("M",1:12,sep="")
# genetic map
# one SNP is not mapped (M5) and will therefore be removed
map <- data.frame(chr=rep(1:3,each=4),pos=rep(1:12))
map <- map[-5,]
rownames(map) <- paste("M",c(1:4,6:12),sep="")
# simulate pedigree
ped <- simul.pedigree(3,c(3,3,n-6))
# combine in one object
gp <- create.gpData(pheno,geno,map,ped)
summary(gp)
# 9 plants with 2 traits , 3 replcations
n <- 9 #
pheno <- data.frame(ID = rep(letters[1:n],3), rep = rep(1:3,each=n),
Yield = rnorm(3*n,200,5), Height=rnorm(3*n,100,1))
# combine in one object
gp2 <- create.gpData(pheno,geno,map,repeated="rep")
summary(gp2)
|
Warning message:
In create.gpData(pheno, geno, map, ped) :
not all markers in 'geno' mapped in 'map'. gaps filled with 'NA'
object of class 'gpData'
covar
No. of individuals 9
phenotyped 0
genotyped 0
pheno
No. of traits: 2
Yield Height
Min. :193.7 Min. : 98.03
1st Qu.:197.2 1st Qu.: 99.55
Median :200.4 Median :100.36
Mean :200.7 Mean :100.16
3rd Qu.:202.3 3rd Qu.:100.50
Max. :208.6 Max. :101.79
geno
No. of markers 12
genotypes AA AB BB
frequencies 0.6203704 0.212963 0.09259259
NA's 7.407 %
map
No. of mapped markers 11
No. of chromosomes 3
markers per chromosome
1 2 3
4 3 4
pedigree
Number of
individuals 9
males : NA , females : NA
Par 1 (sire) 4
Par 2 (dam) 4
generations 3
Warning message:
In create.gpData(pheno, geno, map, repeated = "rep") :
not all markers in 'geno' mapped in 'map'. gaps filled with 'NA'
object of class 'gpData'
covar
No. of individuals 9
phenotyped 9
genotyped 9
pheno
No. of traits: 2
No. of repeated measures: 3
Yield Height
Min. :194.9 Min. : 98.33
1st Qu.:198.3 1st Qu.: 99.28
Median :200.9 Median : 99.93
Mean :201.0 Mean : 99.84
3rd Qu.:203.0 3rd Qu.:100.27
Max. :210.9 Max. :101.84
geno
No. of markers 12
genotypes AA AB BB
frequencies 0.6203704 0.212963 0.09259259
NA's 7.407 %
map
No. of mapped markers 11
No. of chromosomes 3
markers per chromosome
1 2 3
4 3 4
pedigree
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.