snp.matrix-class
to
deal with SNPs on the X chromosome.new("X.snp.matrix", x,
Female)
.
Such objects have an additional slot
to objects of class
"snp.matrix"
consisting of a logical array of the same length as the number of
rows. This array indicates whether the sample corresponding to that row
came from a female (TRUE
) or a male (FALSE
)..Data
:"matrix"
and storage mode
"raw"
Female
:"logical"
indicating
sex of samples"snp.matrix"
, directly, with explicit coerce.
Class "matrix"
, by class "snp.matrix"
.
Class "structure"
, by class "snp.matrix"
.
Class "array"
, by class "snp.matrix"
.
Class "vector"
, by class "snp.matrix", with explicit coerce.
Class "vector"
, by class "snp.matrix", with explicit coerce.signature(x = "X.snp.matrix")
: subset
operations. Currently rather slow owing to excessive copyingsignature(x = "X.snp.matrix")
: subset
assignment operation to replace part of an objectsignature(from = "X.snp.matrix", to =
"character")
: map to codes 0, 1, 2, or NAsignature(from = "snp.matrix", to =
"X.snp.matrix")
:
maps a snp.matrix to an X.snp.matrix. Sex is inferred from the
genotype data since males should not be heterozygous at any locus.
After inferring sex, heterozygous calls for males are set to
NA
signature(object = "X.snp.matrix")
: map to codes
"A/A", "A/B", "B/B", "A/Y", "B/Y" or ""signature(object = "X.snp.matrix")
: calculate
call rates, allele frequencies, genotype frequencies,
and chi-square tests for
Hardy-Weinberg equilibrium. Genotype frequencies are calculated for
males and females separately and Hardy-Weinberg equilibrium tests
use only the female data. Allele frequencies are calculated using
data from both males and females. Results are returned as a
dataframe with
column names Calls
, Call.rate
, MAF
, P.AA
,
P.AB
, P.BB
, P.AY
, P.BY
, and
z.HWE
X.snp-class
, snp.matrix-class
,
snp-class
data(testdata)
summary(summary(Xchromosome))
Run the code above in your browser using DataLab