writeChrLength          package:AnnBuilder          R Documentation

_F_u_n_c_t_i_o_n_s _t_h_a_t _c_r_e_a_t_e_s _b_i_n_a_r_y _f_i_l_e_s _f_o_r _c_h_r_o_m_o_s_o_m_e _l_e_n_g_t_h _a_n_d _o_r_g_a_n_i_s_m

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

     These functions figure out the chromosome length and write the
     length and organism binary files to the data directory of the
     pacakge

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

     writeChrLength(pkgName, pkgPath, chrLengths)
     findChrLength(organism, srcUrl = getSrcUrl("GP", organism))
     writeOrganism(pkgName, pkgPath, organism)

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

 pkgName: 'pkgName' a character string for the name of a data package
          or R library

 pkgPath: 'pkgPath' a character string for the path where pkgname
          resides

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

  srcUrl: 'srcUrl' a character string for the url of the data source
          used to create the binary file for chromosome length

chrLengths: 'chrLengths' a named vector of integers with the names
          being the chromosome numbers and the values of the vector
          being the total lengths of chromosomes

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

     'findChrLength' extracts data from the source and figures out the
     total length for each chromosome. The total length for a
     chromosome is determined as the maximum chromosome location plus
     1000.

     'writeChrLength' writes the chromosome length data to the data
     directory as a binary file.

     'writeOrganism' writes the name of the organism to the data
     directory as a binary file.

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

     'findChrLength' returns a named vector of integers.

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

     Jianhua Zhang

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

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

     'ABPkgBuilder'

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

     ## Not run: 
         path <- file.path(.path.package("AnnBuilder", "temp"))
         dir.create(file.path(path, "test"))
         dir.create(file.path(path, "test", "data"))
         chrLength <- findChrLength("human")
         writeChrLength("test", path, chrLength)
         writeOrganism("test", path, "human")
         list.files(file.path(path, "test", "data"))
         unlink(file.path(path, "test"), TRUE)
     ## End(Not run)

