snp-class {chopsticks} | R Documentation

## Class "snp"

### Description

Compact representation of data concerning single nucleotide polymorphisms (SNPs)

### Objects from the Class

Objects can be created by calls of the form `new("snp", ...)` or by subset selection from an object of class `"snp.matrix"`. Holds one row or column of an object of class `"snp.matrix"`

### Slots

`.Data`:

  The genotype data coded as 0, 1, 2, or 3

### Methods

coerce

  `signature(from = "snp", to = "character")`: map to codes "A/A", "A/B", "B/B", or ""

coerce

  `signature(from = "snp", to = "numeric")`: map to codes 0, 1, 2, or NA

coerce

  `signature(from = "snp", to = "genotype")`: maps a single SNP to an object of class `"genotype"`. See the `"genetics"` package

.

show

  `signature(object = "snp")`: shows character representation of the object

is.na

  `signature(x = "snp")`: returns a logical vector of missing call indicators

### Author(s)

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

### References

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

### See Also

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

### Examples

    ## data(testdata)
    ## s <- autosomes[,1]
    ## class(s)
    ## s

[Package chopsticks version 1.54.0 Index]