locus {genetics}R Documentation

Create and Manipulate Locus, Gene, and Marker Objects

Description

locus, gene, and marker create objects to store information, respectively, about genetic loci, genes, and markers.

is.locus, is.gene, and ismarker test whether an object is a member of the respective class.

as.character.locus, as.character.gene, as.character.marker return a character string containing a compact encoding the object.

getlocus, getgene, getmarker extract locus data (if present) from another object.

locus<-, marker<-, and gene<- adds locus data to an object.

Usage

  locus(name, chromosome, arm=c("p", "q", "long", "short", NA),
        index.start, index.end=NULL)

  gene(name, chromosome, arm=c("p", "q", "long", "short"),
       index.start, index.end=NULL)

  marker(name, type, locus.name, bp.start, bp.end = NULL,
         relative.to = NULL, ...)

  is.locus(x)

  is.gene(x)

  is.marker(x)

  ## S3 method for class 'locus'
as.character(x, ...)

  ## S3 method for class 'gene'
as.character(x, ...)

  ## S3 method for class 'marker'
as.character(x, ...)

  getlocus(x, ...)

  locus(x) <- value

  marker(x) <- value

  gene(x) <- value

Arguments

name

character string giving locus, gene, or marker name

chromosome

integer specifying chromosome number (1:23 for humans).

arm

character indicating long or short arm of the chromosome. Long is be specified by "long" or "p". Short is specified by "short" or "q".

index.start

integer specifying location of start of locus or gene on the chromosome.

index.end

optional integer specifying location of end of locus or gene on the chromosome.

type

character string indicating marker type, e.g. "SNP"

locus.name

either a character string giving the name of the locus or gene (other details may be specified using ...) or a locus or gene object.

bp.start

start location of marker, in base pairs

bp.end

end location of marker, in base pairs (optional)

relative.to

location (optional) from which bp.start and bp.end are calculated.

...

parameters for locus used to fill in additional details on the locus or gene within which the marker is located.

x

an object of class locus, gene, or marker, or (for getlocus, locus<-, marker<-, and gene<-) an object that may contain a locus attribute or field, notably a genotype object.

value

locus, marker, or gene object

Value

Object of class locus and geneare lists with the elements:

name

character string giving locus, gene, or marker name

chromosome

integer specifying chromosome number (1:23 for humans).

arm

character indicating long or short arm of the chromosome. Long is be specified by "long" or "p". Short is specified by "short" or "q".

index.start

integer specifying location of start of locus or gene on the chromosome.

index.end

optional integer specifying location of end of locus or gene on the chromosome.

Objects of class marker add the additional fields:

marker.name

character string giving the name of the marker

bp.start

start location of marker, in base pairs

bp.end

end location of marker, in base pairs (optional)

relative.to

location (optional) from which bp.start and bp.end are calculated.

Author(s)

Gregory R. Warnes greg@warnes.net

See Also

genotype,

Examples

ar2  <- gene("AR2",chromosome=7,arm="q",index.start=35)
ar2

par  <- locus(name="AR2 Psedogene",
              chromosome=1,
              arm="q",
              index.start=32,
              index.end=42)
par

c109t  <- marker(name="C-109T",
                 type="SNP",
                 locus.name="AR2",
                 chromosome=7,
                 arm="q",
                 index.start=35,
                 bp.start=-109,
                 relative.to="start of coding region")
c109t

c109t  <- marker(name="C-109T",
                 type="SNP",
                 locus=ar2,
                 bp.start=-109,
                 relative.to="start of coding region")
c109t




example.data   <- c("D/D","D/I","D/D","I/I","D/D",
                    "D/D","D/D","D/D","I/I","")
g1  <- genotype(example.data, locus=ar2)
g1

getlocus(g1)

summary(g1)
HWE.test(g1)

g2  <- genotype(example.data, locus=c109t)
summary(g2)

getlocus(g2)

heterozygote(g2)
homozygote(g1)

allele(g1,1)

carrier(g1,"I")

heterozygote(g2)

[Package genetics version 1.3.8.1.3 Index]