Description Usage Arguments Details Value Author(s) Examples
Estimate relationship matrix based on pedigree or genomic data. This function can use either Plink files as input (for both pedigree-based and genomic relationship matrix calculation), or genetic data in GenABEL format (for genomic relationships).
1 2 3 |
datatype |
character, |
plinkbasefile |
character, path to files in plink format. E.g.
if you have files |
is.binary |
logical, indicate whether the plink files are in
binary format ( |
transpose |
logical, indicate whether the plink text files are
transposed or not ( |
header |
logical, indicate whether the input text files have header or not |
path2Plink |
character, path to the binary (executable file) of plink_1.90 or later (the Plink_1.90 binary is used for efficient computation of the relationship matrix). More details are also given in the vignette. |
weight |
character, either |
gwaa.data |
object, name of object gwaa.data-class, which is GenABEL genotype/phenotype data format |
pedigreefile |
reserved for future development |
Note that, with respect to the input parameters it is important to
distinguish the two options of datatype
. If
datatype
is equal to "pedigree"
the user should
specify the options plinkbasefile
, is.binary
,
transpose
, header
and path2Plink
. In that
case, the kinship will be estimated based on the pedigree data
in the Plink files. If, however, datatype
is equal to
"genomic"
, there are two options: either one uses the
parameter gwaa.data
to tell this function to compute the
genomics relationship matrix from a previously stored GenABEL
data object. Or, if gwaa.data
is empty, the
Plink-related parameters have to be specified and the genomics
relationship matrix will be computed based on the genetic data
in the Plink file.
matrix object which contains the estimated relationship matrix
Sodbo Sharapov
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | system.file("extdata", "2012.csv", package = "testdat")
## Not run:
pedRel <- GetRelMatrix(datatype="pedigree",
plinkbasefile=system.file("extdata",
"data",
package="RVPedigree"),
transpose=FALSE)
pedRel <- GetRelMatrix(datatype="pedigree",
plinkbasefile=system.file("extdata",
"dataT",
package="RVPedigree"),
transpose=TRUE)
pedRel <- GetRelMatrix(datatype="pedigree",
plinkbasefile=system.file("extdata",
"dataB",
package="RVPedigree"),
is.binary=TRUE)
pedRel <- GetRelMatrix(datatype="pedigree",
plinkbasefile=system.file("extdata",
"OneFamilyExample",
package="RVPedigree"),
transpose=FALSE, header=TRUE)
pedRel <- GetRelMatrix(datatype="pedigree",
plinkbasefile=system.file("extdata",
"TwoFamilyExample",
package="RVPedigree"),
transpose=FALSE, header=TRUE)
load(system.file("extdata", "gwaa.data.RData")
genRel <- GetRelMatrix(datatype="genomic", gwaa.data=data1, weight="no")
genRel <- GetRelMatrix(datatype="genomic", gwaa.data=data1, weight="freq")
genRelError <- GetRelMatrix(datatype="genomic", gwaa.data=pedRel, weight="freq")
genPlinkRel <- GetRelMatrix(data="genomic",
path2Plink="plink_1.90",
system.file("extdata",
"data",
package="RVPedigree"),
genPlinkRel[1:10, 1:10]
genPlinkRel <- GetRelMatrix(data="genomic",
path2Plink="plink_1.90",
system.file("extdata",
"dataT",
package="RVPedigree"),
transpose=TRUE)
genPlinkRel[1:10, 1:10]
genPlinkRel <- GetRelMatrix(data="genomic",
path2Plink="plink_1.90",
system.file("extdata",
"dataB",
package="RVPedigree"),
is.binary=TRUE)
genPlinkRel[1:10, 1:10]
# GetRelMatrix(file="OneFamilyExample.ped", datatype="genomic")
# GetRelMatrix(file="OneFamilyExample.ped", datatype="pedasdfa")
# GetRelMatrix(file="OneFamilyExaample", datatype="pedigree")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.