snp.data-class {GenABEL}R Documentation

Class "snp.data"

Description

This class contains objects holding large arrays of single nucleotide polymorphism (SNP) genotypes

Slots

nbytes:

number of bytes used to store data on a SNP

nids:

number of people

male:

male code

idnames:

ID names

nsnps:

number of SNPs

snpnames:

list of SNP names

chromosome:

list chromosomes corresponding to SNPs

coding:

list of nucleotide coding for the SNPs

strand:

strands of the SNPs

map:

list SNPs' positions

gtps:

snp.mx-class object used to store genotypes

Methods

[

signature(x = "snp.data", i = "ANY", j = "ANY", drop = "ANY"): subset operations. x[i,j] will select people listed in i and SNPs listed in j.

coerce

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

coerce

signature(from = "snp.data", to = "character"): map to actual nucleotide codes, e.g. "A/A", "A/G", "G/G", ""

coerce

signature(from = "snp.data", to = "genotype"): map to data frame with genotype-class data, for later use with package genetics

coerce

signature(from = "snp.data", to = "hsgeno"): map to data frame with allelic data frame, for later use with package haplo.stats

show

signature(object = "snp.data"): shows the object. Take care that the objects are usually very large!

summary

signature(object = "snp.data"): calculate allele frequencies, genotype frequencies, and chi-square tests for Hardy-Weinberg equilibrium. Results are returned as a dataframe

annotation

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts annotation

idnames

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts id names

snpnames

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts snp names

nids

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts number of ids

nsnps

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts number of snps

map

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts map

chromosome

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts chromosome

strand

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts strand

strand<-

signature(object = "gwaa.data"), signature(object = "snp.data"): assign strand

coding

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts coding

coding<-

signature(object = "gwaa.data"), signature(object = "snp.data"): assign coding

refallele

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts reference allele

effallele

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts effective allele

male

signature(object = "gwaa.data"), signature(object = "snp.data"): extracts male indicator

Author(s)

Yurii Aulchenko

See Also

gwaa.data-class, snp.data, snp.mx-class

Examples

require(GenABEL.data)
data(srdta)
class(srdta)
x <- srdta@gtdata
class(x)
nids(x)
nsnps(x)
idnames(x)[1:12]
male(x)[1:12]
male(x)[c("p1","p2","p3","p4")]
snpnames(x)[1:4]
chromosome(x)[1:4]
map(x)[1:4]
n4 <- c("rs18","rs655")
n4
map(x)[n4]
n4 <- c("rs18","rs65")
n4
map(x)[n4]
chromosome(x)[n4]
x[1:12,1:4]
summary(x[,1:10])
as.numeric(x[1:12,1:4])
as.numeric(x[c("p1","p3","p4"),c("rs18","rs65")])
as.character(x[c("p1","p3","p4"),c("rs18","rs65")])
as.genotype(x[c("p1","p3","p4"),c("rs18","rs65")])
as.hsgeno(x[c("p1","p3","p4"),c("rs18","rs65")])

[Package GenABEL version 1.8-0 Index]