findNeighbors            package:annotate            R Documentation

_A _f_u_n_c_t_i_o_n _t_o _l_o_c_a_t_e _n_e_i_g_h_b_o_r_i_n_g _g_e_n_e_s _w_i_t_h_i_n _a _d_e_f_i_n_e_d _r_a_n_g_e
_a_r_o_u_n_d _a _t_a_r_g_e_t _g_e_n_e _r_e_p_r_e_s_e_n_t_e_d _b_y _a _E_n_t_r_e_z _G_e_n_e _I_D

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

     Give a data package with mappings between Entrez Gene IDs and
     their locations on chromosomes, this function locates genes that
     are within a defined range on a given chromosome. If a Entrez Gene
     ID is passed as one of the arguments, genes located will be
     neighbors to the gene represented by the Entrez Gene ID within a
     defined range on the chromosome the target gene resides

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

     findNeighbors(chrLoc, llID, chromosome, upBase, downBase, mergeOrNot = TRUE)
     checkArgs(llID, chromosome, upBase, downBase)
     findChr4LL(llID, chrEnv, organism)
     getValidChr(organism)
     getBoundary(loc, base, lower = TRUE)
     weightByConfi(foundLLs)

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

  chrLoc: 'chrLoc' a character string for the name of the data package
          that contains mappings between Entrez Gene IDs and their
          locations on chromosomes. For each chromosome, there assumed
          to be mappings for the start and end locations of genes
          represented by Entrez Gene IDs. The data package needs to be
          built using chrLocPkgBuilder of AnnBuilder

    llID: 'llID' a character string for the Entrez Gene ID representing
          a gene whose neighbors are sought. llID can be missing

chromosome: 'chromosome' a character string for the number of the
          chromosome of interest. chromosome is only required for
          locating genes within a range on the chromosome

  upBase: 'upBase' a numeric or character string for the number of base
          pairs that defines the upper limit of the range to locate
          genes. If neighbors of a given gene is sought, the value will
          be the distance in number of base pairs from the target gene
          upstream, to which search for genes will be conducted.
          Otherwise, the value will be the upper limit in number of
          base pairs from the p arm, to which search for genes will be
          conducted

downBase: 'downBase' a numeric or character string for the number of
          base pairs that defines the lower limit of the range to
          locate gene. If neighbors of a given gene is sought, the
          value will be the distance in number of base pairs from the
          target gene downstream, to which search for genes will be
          conducted. Otherwise, the value will be the lower limit in
          number of base pairs from the p arm, to which search for
          genes will be conducted

organism: 'organism' a character string for the name of the organism of
          interest

  chrEnv: 'chrEnv' an environment object with keys for Entrez Gene IDs
          and values for the chromosomes where genes reside

     loc: 'loc' a numeric of character string for the chromosomal
          location of gene of interest

    base: 'base' either a 'downBase' or 'upBase'

   lower: 'lower' a boolean indicating whether the lower or upper
          boundary of search limit is sought

mergeOrNot: 'mergeOrNot' a boolean to indicate whether gene found up
          and down streams will be merged (TRUE)

foundLLs: 'foundLLs' a vector of character strings for Entrez Gene IDs

_D_e_t_a_i_l_s:

     A chrLoc data package can be created using function
     chrLocPkgBuilder of AnnBuilder, in which Entrez Gene IDs are
     mapped to location data on individual chromosomes.

     Genes are considered to be neighbors to a given target gene or
     within a given range when the transcription of genes start and end
     within the given range.

     findNeighbors, checkArgs, findChr4LL, getValidChr, and getBoundary
     are accessory functions called by findNeighbors and may not have
     real values outside.

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

     The function returns a list of named vectors. The length of the
     list is one when genes in a given region are sought but varies
     depending on whether a given gene can be mapped to one or more
     chromosomes when neighboring genes of a target gene are sought.
     Names of vector can be "Confident" when a gene can be confidently
     placed on a chromosome or "Unconfident" when a gene can be placed
     on a chromosome but its exact location can not be determined with
     great confidence.

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

     Jianhua Zhang

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.genome.ucsc.edu/goldenPath/>

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

     if(require("humanCHRLOC")){
        findNeighbors("humanCHRLOC", "51806", 10, upBase = 600000, downBase = 600000)
     }else{
        print("Can not find neighbors without the required data package")
     }

