accessors: Accessors

allelesR Documentation

Accessors

Description

get/set variables in an annotSnpStats object

Usage

alleles(x)

alleles(x) <- value

phenotype(x)

phenotype(x) <- value

snps(x)

snps(x) <- value

samples(x)

samples(x) <- value

Arguments

x

object of class annotSnpStats

value

replacement value

Details

alleles() gets the two element character vector which names the columns in the snps slot which records the ordering of base alleles for that SNP.

For alleles<-, value is a character vector of length 2, giving the columns names of the data.frame in the snps slot corresponding to alelles 1 and 2.

phenotype gets/sets the column name of the data.frame in the samples slots which encodes the phenotype.

snps() extracts the snps data.frame from an object of class aSnpMatrix

samples() extracts the samples data.frame from an object of class aSnpMatrix

samples() extracts the samples data.frame from an object of class aSnpMatrix

Value

the column names requested

Author(s)

Chris Wallace

Examples

X <- example.data(10,5)
phenotype(X)
phenotype(X) <- "cc"
alleles(X)
snps(X)
samples(X)

chr1swallace/annotSnpStats documentation built on April 18, 2023, 11:22 a.m.