kernelize               package:macat               R Documentation

_S_m_o_o_t_h _e_x_p_r_e_s_s_i_o_n _v_a_l_u_e_s _o_r _s_c_o_r_e_s

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

     'kernelize' uses a kernel to smooth the data given in
     geneLocations by computing a weighted sum of the values vector.
     The weights for each position are given in the kernelweights
     matrix. A kernelweights matrix can be obtained by using the
     kernelmatrix function.

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

     getsteps(geneLocations, step.width)
     kernelmatrix(steps, geneLocations, kernel, kernelparams)
     kernelize(values, kernelweights)

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

geneLocations: a list of gene locations (length n)

step.width: the width of steps in basepairs 

   steps: a list of locations where the kernelization shall be computed 

  kernel: kernel function one of rbf, kNN or basePairDistance (or your
          own) 

kernelparams: a list of named parameters for the kernel (default is
          fitted to the data) 

  values: vector of length n or matrix (m x n) of values that are to be
          smoothed

kernelweights: a matrix of (n x steps) where n is the length of the
          values vector and steps is the number of points where you
          wish to interpolate 

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

getsteps: a list of locations starting at min(genLocations) going to
          max(geneLocations) with steps of size step.width

kernelmatrix: a matrix of (n x steps) containing the kernel weights for
          each location in steps

kernelize: a vector of length steps or a matrix (m x steps) containing
          the smoothed values

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

     MACAT Development team

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

     'compute.sliding', 'evalScoring'

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

       data(stjd)
       genes = seq(100)
       geneLocations = abs(stjd$geneLocation[genes])
       geneExpression = stjd$expr[genes,]
       step.width = 100000
       steps = getsteps(geneLocations, step.width)
       weights = kernelmatrix(steps, geneLocations, rbf, list(gamma=1/10^13))
       kernelized = kernelize(geneExpression, weights)
       plot(steps, kernelized[1,])

