View source: R/match_kinship2pheno.R
match.kinship2pheno | R Documentation |
Assesses a given kinship matrix against the provided phenotypic data to determine
if all genotypes are in the kinship matrix or not. It also reports which individuals
match or are missing from one set or another.
If requested, a reduced kinship matrix is generated that has only the matched individuals.
The input kinship matrix can be a pedigree-based relationship matrix \boldsymbol{A}
,
a genomic-based relationship matrix \boldsymbol{G}
, or a hybrid
relationship matrix \boldsymbol{H}
.
Individual names should be assigned to rownames
and colnames
of input matrix.
match.kinship2pheno(
K = NULL,
pheno.data = NULL,
indiv = NULL,
clean = FALSE,
ord = TRUE,
mism = FALSE,
message = TRUE
)
K |
Input of a kinship matrix in full form ( |
pheno.data |
A data fame with the phenotypic data to assess (for |
indiv |
The string for the column name for genotypes/individuals in the phenotypic data (default = |
clean |
If |
ord |
If |
mism |
If |
message |
If |
A list with the following elements:
mismatchesK
: a vector containing the names of the individuals from the provided kinship matrix
that mismatch with the phenotypic data.
matchesK
: a vector containing the names of the individuals from the provided kinship matrix
that match with the phenotypic data.
mismatchesP
: a vector containing the names of phenotyped individuals
that mismatch with those from the kinship matrix.
matchesP
: a vector containing the names of phenotyped individuals
that match with those from the kinship matrix.
Kclean
: a clean kinship matrix containing only the matched phenotyped individuals.
## Not run:
# Get G matrix.
G <- G.matrix(M = geno.pine655, method = "VanRaden", na.string = "-9", sparseform = FALSE)$G
dim(G)
# Match G and the phenotype.
check <-
match.kinship2pheno(
K = G, pheno.data = pheno.pine,
indiv = "Genotype",
clean = TRUE, mism = TRUE)
ls(check)
length(check$matchesK)
length(check$mismatchesK)
length(check$matchesP)
length(check$mismatchesP)
dim(check$Kclean)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.