IPI-class             package:AnnBuilder             R Documentation

_C_l_a_s_s "_I_P_I" _a _s_u_b-_c_l_a_s_s _o_f _p_u_b_R_e_p_o _t_o _h_a_n_d_l_e _d_a_t_a _f_r_o_m
_I_n_t_e_r_n_a_t_i_o_n_a_l _P_r_o_t_e_i_n _I_n_d_e_x (_I_P_I)

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

     This class is a sub-class of pubRepo that is implemented
     specifically to parse data from IPI (ipi.*.dat.gz)

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("IPI", ...)'. A
     constructor (IPI) is available and should be used to instatiate
     objects of 'IPI'

_S_l_o_t_s:


     '_s_r_c_U_r_l': Object of class '"character", from class "pubRepo"' a
          character string for the surce url where data will be
          downloaded/processed

     '_p_a_r_s_e_r': Object of class '"character", from class "pubRepo"'  a
          character string for the name of the file containing a
          segment of perl code with instructions on how the source data
          will be processed and output be generated

     '_b_a_s_e_F_i_l_e': Object of class '"character", from class "pubRepo"' a
          character string for the name of the gzipped file that
          contains data from IPI ftp site.  For example,
          ipi.HUMAN.dat.gz is the file for human, and ipi.MOUSE.dat.gz
          is for mouse, etc.

_E_x_t_e_n_d_s:

     Class '"pubRepo"', directly.

_M_e_t_h_o_d_s:


     _p_a_r_s_e_D_a_t_a 'signature(object = "IPI")': A method to parse a source
          file using a specified parser

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

     Ting-Yuan Liu

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

     <URL: http://www.ebi.ac.uk/IPI/IPIhelp.html>

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

     'pubRepo-class'

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

     ## Not run: 
     ## create IPI class
     ipi <- IPI(srcUrl="ftp://ftp.ebi.ac.uk/pub/databases/IPI/current/",
                organism = "human")

     ## Parse ipi.HUMAN.dat.gz from IPI ftp site
     tmpFile <- loadFromUrl(paste(srcUrls(ipi),baseFile(ipi)), sep="")
     system("grep "//" ")
     con <- file(tmpFile, "r")

     tmpRead <- readLines(con, n=200)
     endSymbol <- grep("//", tmpRead)
     tmpRead <- tmpRead[1:endSymbol[length(endSymbol)]]
     file <- tempfile()
     writeLines(tmpRead, file)

     system(paste("mv ", file, " ", tempdir(), "/ipi.tiny.dat", sep=""))
     system(paste("gzip ", tempdir(), "/ipi.tiny.dat", sep=""))
     ipiParser(ipiData=paste(tempdir(), "/ipi.tiny.dat.gz", sep=""), fromWeb=FALSE)

     ## End(Not run)

