X.snp.matrix-class {snpMatrix} | R Documentation

## Class "X.snp.matrix"

### Description

This class extends the `snp.matrix-class` to deal with SNPs on the X chromosome.

### Objects from the Class

Objects can be created by calls of the form `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`).

### Slots

`.Data`:
  Object of class `"matrix"` and storage mode `"raw"`
`Female`:
  Object of class `"logical"` indicating sex of samples

### Extends

Class `"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.

### Methods

[
  `signature(x = "X.snp.matrix")`: subset operations
[<-
  `signature(x = "X.snp.matrix")`: subset assignment operation to replace part of an object
coerce
  `signature(from = "X.snp.matrix", to = "character")`: map to codes 0, 1, 2, or NA
coerce
  `signature(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`
show
  `signature(object = "X.snp.matrix")`: map to codes "A/A", "A/B", "B/B", "A/Y", "B/Y" or ""
summary
  `signature(object = "X.snp.matrix")`: returns the sex distribution, together with summaries of the data frames returned by `row.summary` and `col.summary`

### Author(s)

David Clayton david.clayton@cimr.cam.ac.uk

### References

http://www-gene.cimr.cam.ac.uk/clayton

### See Also

`X.snp-class`, `snp.matrix-class`, `snp-class`

### Examples

    data(testdata)
    summary(Xchromosome)

[Package snpMatrix version 1.8.0 Index]