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 _L_o_c_u_s_L_i_n_k _i_d

_D_e_s_c_r_i_p_t_i_o_n:

     Give a data package with mappings between LocsuLink ids and their
     locations on chromosomes, this function locates genes that are
     within a defined range on a given chromosome. If a LocusLink id is
     passed as one of the arguments, genes located will be neighbors to
     the gene represented by the LocusLink 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 LocusLink ids and their
          locations on chromosomes. For each chromosome, there assumed
          to be mappings for the start and end locations of genes
          represented by LocusLink ids. The data package needs to be
          built using chrLocPkgBuilder of AnnBuilder

    llID: 'llID' a character string for the LocusLink id representing a
          gene whose nighbors 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 sourght, 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 locat
          gene. If neighbors of a given gene is sourght, 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 LocusLink 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 LocusLink ids

_D_e_t_a_i_l_s:

     A chrLoc data package can be created using function
     chrLocPkgBuilder of AnnBuilder, in which locusLink 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 rwgion are sought but varies
     depending on whether a given gene can be mapped to one or more
     chromosomes when neighoring 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.

_N_o_t_e:

     This function is part of the Bioconductor project at Dana-Farber
     Cancer Institute to provide bioinformatics functionalities through
     R

_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", "10228", upBase = 600000, downBase = 600000)
     }else{
        print("Can not find neighbors without the required data package")
     }

