createWiggle              package:HELP              R Documentation

_C_r_e_a_t_e _w_i_g_g_l_e _t_r_a_c_k

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

     Create and write a wiggle track (UCSC Genome Browser format) to
     flat file

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

     createWiggle(x, y, ...)

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

       x: matrix of numerical data, where each column represents data
          for an individual wiggle track. 'x' can also be of class
          '"ExpressionSet"'.  

       y: an additional matrix of numerical data with columns
          corresponding to chr, start, and end, respectively. 

     ...: Arguments to be passed to methods (see
          'createWiggle-methods'):

     '_e_l_e_m_e_n_t' which element of 'AssayData' to use for a given
          'ExpressionSet' input (default is '"exprs"') 

     '_f_e_a_t_u_r_e._c_h_r' which element of 'featureData' to use as chromosomal
          information (default is '"CHR"'). Can be a character matching
          'varLabel' or simply an integer indicating which feature to
          choose. 

     '_f_e_a_t_u_r_e._s_t_a_r_t' which element of 'featureData' to use as start
          positions (default is '"START"'). Can be a character matching
          'varLabel' or simply an integer indicating which feature to
          choose. 

     '_f_e_a_t_u_r_e._s_t_o_p' which element of 'featureData' to use as end
          positions (default is '"STOP"'). Can be a character matching
          'varLabel' or simply an integer indicating which feature to
          choose. 

     '_s_a_m_p_l_e_s' which sample(s) to use as data. Can be a vector of
          characters matching sample names, integers indicating which
          samples to choose, or a mixture of the two. If 'NULL'
          (default), all samples will be used. 

     '_c_o_l_o_r_s' vector of colors, indicates which colors to use for which
          wiggle track 

     '_f_i_l_e' location of file to write wiggle track information; if
          '""', wiggle track prints to the standard output connection:
          see 'cat'. 

     '_a_p_p_e_n_d' logical; if 'TRUE', the output is appended to an existent
          wiggle track file. If 'FALSE' (default), a new file with a
          new header is created and any existing file of the same name
          is destroyed. 

     '_n_a._r_m' logical; if 'TRUE' (default), missing values are removed
          from data. If 'FALSE' any missing values cause an error 

     '_s_e_p' a string used to separate columns. Using 'sep = "\t"'
          (default) gives tab-delimited output. 

     '...' other arguments to be passed to 'cat'. See 'cat'. 

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

     Reid F. Thompson (rthompso@aecom.yu.edu)

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

     UCSC Genome Browser, <URL:
     http://genome.ucsc.edu/goldenPath/help/customTrack.html>: Kent,
     W.J., Sugnet, C. W., Furey, T. S., Roskin, K.M., Pringle, T. H.,
     Zahler, A. M., and Haussler, D. The Human Genome Browser at UCSC.
     _Genome Res_. *12*(6), 996-1006 (2002).

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

     'write', 'cat'

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

     #demo(pipeline,package="HELP")

     chr <- rep("chr1", 500)
     start <- (1:500)*200
     end <- start+199
     data <- sample(5*(1:10000/10000)-2, size=500)
     data <- cbind(data, abs(data), -1*data)
     colnames(data) <- c("data", "abs", "opposite")
     createWiggle(data, cbind(chr, start, end))

     #rm(chr, start, end, data)

