Objects from the Class
Objects can be created by calls of the form new("XSnpMatrix", x,
diploid)
.
Such objects have an additional slot
to objects of class
"SnpMatrix"
consisting of a logical array of the same length as the number of
rows. This array indicates whether genotypes in that row are diploid
(TRUE
) or haploid (FALSE
as, for example, SNPs on the X
chromosome for males).Slots
.Data
:- Object of class
"matrix"
and storage mode
"raw"
diploid
:- Object of class
"logical"
indicating
sex of samples
Extends
Class "SnpMatrix"
, directly, with explicit coerce.
Class "matrix"
, by class "SnpMatrix"
.
Class "structure"
, by class "SnpMatrix"
.
Class "array"
, by class "SnpMatrix"
.
Class "vector"
, by class "SnpMatrix", with explicit coerce.
Class "vector"
, by class "SnpMatrix", with explicit coerce.Methods
- []
signature(x = "XSnpMatrix", i = "ANY", j = "ANY",
drop = "missing")
: subset extraction - [<-
signature(x = "XSnpMatrix", i = "ANY", j = "ANY", "XSnpMatrix")
: subset
assignment operation to replace part of an object - coerce
signature(from = "XSnpMatrix", to =
"character")
: map to codes 0, 1, 2, or NA - coerce
signature(from = "SnpMatrix", to =
"XSnpMatrix")
:
maps a SnpMatrix to an XSnpMatrix. Ploidy is inferred from the
genotype data since haploid genotypes should always be coded as
homozygous. After inferring ploidy, heterozygous calls for haploid
genotpes are set to NA
- show
signature(object = "XSnpMatrix")
: map to codes
"A/A", "A/B", "B/B", "A", "B" or "" - summary
signature(object = "XSnpMatrix")
: returns
the distribution of ploidy, together with
summaries of the data frames returned by
row.summary
and col.summary