locus                package:genetics                R Documentation

_C_r_e_a_t_e _a_n_d _M_a_n_i_p_u_l_a_t_e _L_o_c_u_s, _G_e_n_e, _a_n_d _M_a_r_k_e_r _O_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     '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.

_U_s_a_g_e:

       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)

       as.character.locus(x, ...)

       as.character.gene(x, ...)

       as.character.marker(x, ...)

       getlocus(x, ...)

       locus(x) <- value

       marker(x) <- value

       gene(x) <- value

_A_r_g_u_m_e_n_t_s:

    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

_V_a_l_u_e:

     Object of class 'locus' and 'gene'are 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.  

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. 

_A_u_t_h_o_r(_s):

     Gregory R. Warnes Gregory_R_Warnes@groton.pfizer.com

_S_e_e _A_l_s_o:

     'genotype',

_E_x_a_m_p_l_e_s:

     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)

