Creates an object of class geno containing a matrix of one-column-per-marker formated genotype data, the type of kernel, and the weights to be used to create the kernel matrix. This function is used to simplify the input structure of the call to KITdesign.
Design matrix for genotype data in either
one- or two-column-per-marker format. Object can be a
vector, matrix, or data.frame. Missing values
can be coded as either 9 or NA.
kernel
Character object indicating type of kernel.
Must be one of 'ibs', 'linear', 'quadratic'.
For linear kernel, the constant is taken to
be zero; for quadratic kernel, it is one.
weights
Weights, if any, to be used in generating kernel.
Object can be a vector or matrix. If vector and
kernel is not ibs, weights are converted to a
diagonal matrix.
inheritMode
For two-column-per-marker format, the
inheritance mode to be used to convert to
one-column-per-marker format. Must be one of
'add', 'dom', 'rec' indicating additive,
dominant, or recessive, respectively.
Details
There are two conventions for genotype data: one- and two-column-per-marker formats. Either format can be used. If genotype data is in one-column format, inheritMode = NA. If genotype data is in two-column format, inheritMode = add/dom/rec.
Non-integer imputed values can be provided. If it is determined that non-integer values are provided and that the kernel was specified as ‘ibs,’ the kernel will be reset to ‘linear.’ In addition, if provided in the two-column format, inheritMode will be set to ‘add.’
Value
Returns an object of class geno containing the one-column-per-marker genotype data, the weights to be used in generating the kernel, and the type of kernel to be generated.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(FastKM)
Loading required package: rARPACK
FastKM was developed in support of IMPACT, a comprehensive research
program that aims to improve the health and longevity of people by
improving the clinical trial process. To learn more about our
research and available software visit www.impact.unc.edu.
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FastKM/geno.Rd_%03d_medium.png", width=480, height=480)
> ### Name: geno
> ### Title: Create a geno Object.
> ### Aliases: geno
>
> ### ** Examples
>
> gdata <- matrix(sample(0:1,40,replace=TRUE,prob=c(0.9,0.1)),ncol=4L)
>
> geno(mat = gdata, kernel = "ibs",
+ weights = NULL, inheritMode="add")
An object of class "geno"
Slot "mat":
[,1] [,2]
[1,] 0 0
[2,] 0 0
[3,] 0 0
[4,] 0 0
[5,] 0 0
[6,] 0 0
[7,] 0 0
[8,] 0 0
[9,] 0 0
[10,] 0 0
Slot "kernel":
[1] "ibs"
Slot "weights":
[,1]
[1,] 1
[2,] 1
>
>
>
>
>
>
> dev.off()
null device
1
>