AssociateWithGenes        package:AffyTiling        R Documentation

_A_s_s_o_c_i_a_t_e_s _a _v_e_c_t_o_r _o_f _p_r_o_b_e _p_o_s_i_t_i_o_n_s _w_i_t_h _t_h_e _n_e_a_r_e_s_t _i_n_p_u_t _t_r_a_n_s_c_r_i_p_t_i_o_n _s_t_a_r_t _s_i_t_e.

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

     Associates a vector of probes, with known genomic positions, to
     the nearest transcription start site (TSS).

     If argument D is specified, returns ALL genes with a TSS < D bp
     from pID.  Otherwise, the nearest gene is returned for each probe.

     Returns vector composed of the following columns:  ProbeID    -
     Unique probe ID. GeneID     - Gene/ transcript ID. pgDistance -
     Distance between ProbeID and GeneID TSS;  Positive values indicate
     upstream of the TSS. Negative values indicate downstream.

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

     AssociateWithGenes(kgID, kgCHR, kgSTR, kgSTART, kgEND, pID, pCHR, pMID, D=NULL)

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

    kgID: Vector of gene IDs, one for each transcription start site. 

   kgCHR: Vector of gene chromosomes, in the format "chr1", "chr2",
          ..., "chrX", "chrY". 

   kgSTR: Vector of strand: "+" for a gene on the "+1" strand, "-" for
          the "-1" strand. 

 kgSTART: Vector of start positions for each the transcript relative to
          the chromosome, NOT the start of transcription. 

   kgEND: Vector of end positions for each the transcript relative to
          the chromosome.  

     pID: Vector of UniqueIDs for each probe being evaluated.  

    pCHR: Vector of chromosomes, in the format "chr1", "chr2", ...,
          "chrX", "chrY".  

    pMID: Vector of start positions, one for each of the probes being
          annotated.  

       D: Threshold distance: if specified, returns all genes with a
          TSS < D bp from pID.  Otherwise the nearest gene is returned
          for each probe. 

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

     Charles Danko

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

     data(KnownGenes)

     ## Calculate the gene nearest to each probe in Einter data frame.
     NearestGenes <- AssociateWithGenes(KG[,1], KG[,2], KG[,3], KG[,4], KG[,5], 
         Einter[,1], Einter[,3], (as.integer(Einter[,2])+13))

     ## Returns all genes within 1 Kb of each probe in Einter.
     ## Probes that do not have a gene within 1 Kb are not returned.
     NearestGenes <- AssociateWithGenes(KG[,1], KG[,2], KG[,3], KG[,4], KG[,5], 
         Einter[,1], Einter[,3], (as.integer(Einter[,2])+13), D=1000)

