| callGenotypes {mlgt} | R Documentation |
Apply a genotype call method to a table or list of tables
of variant data such as the markerSampleList table
of an mlgtResult.
callGenotypes(resultObject,
method = "callGenotypes.default",
markerList = names(resultObject@markers),
sampleList = resultObject@samples, mapAlleles = FALSE,
alleleDb = NULL, approxMatching = FALSE, ...)
resultObject |
An object of class
|
alleleDb |
A list of |
method |
How to call genotypes. Currently only "callGenotypes.default" is implemented. Users can define their own methods as R functions (see the vignette). |
markerList |
For which of the markers do you want to call genotypes (default is all)? |
sampleList |
For which of the samples do you want to call genotypes (default is all)? |
mapAlleles |
FALSE/TRUE. Whether to map variants to db alleleDb of known alleles. |
approxMatching |
If TRUE, a BLAST search is also performed to find matches (slower). Additional columns are added to the genoytpeTable |
... |
Other parameter values will be passed to
custom methods such as
|
After mlgt has generated tables of the most
common variants assigned in each marker/sample pair, an
attempt can be made to call genotypes. This is kept
separate because users might want to try different
calling methods and have the option to map to a known set
of alleles. Currently, only one method is implemented
(‘custom’). See
callGenotypes.default. This function also
includes the option to map variants to a list of known
alleles created using
createKnownAlleleList. The basic method
makes only perfect matches but a secondary method can be
triggered (approxMatching=TRUE) to find the allele with
the greatest similarity using a local BLAST search.
list of call results including the call parameters and a
table of calls (class genotypeCall). If an
mlgtResult object was supplied then a list of
genotypeCall objects will be returned, each
named by marker.
## Not run:
data("mlgtResult", package="mlgt")
my.mlgt.Result
# the default method
my.genoytpes <- callGenotypes(my.mlgt.Result)
# using a custom method
callGenotypes.custom <- function(table, maxPropUniqueVars=0.5) {
table$status <- "notCalled"
table$propUniqueVars <- table$numbVar/table$numbSeq
table$status <- ifelse(table$propUniqueVars <= maxPropUniqueVars,"good", "bad")
return(table)
}
my.custom.Genotypes <- callGenotypes(my.mlgt.Result, method="callGenotypes.custom")
## End(Not run)