calcSpmCollection          package:KCsmart          R Documentation

_K_C_s_m_a_r_t _C_o_m_p_a_r_a_t_i_v_e _w_r_a_p_p_e_r

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

     Wrapper function that calculates the sample point matrix
     collection from the aCGH data. The sample point matrix collection
     is used in the comparative version of KCsmart.

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

     calcSpmCollection(data, mirrorLocs, cl=NULL, data2=NULL, sigma=1000000, sampleDensity=50000, maxmem=1000, verbose=F, doChecks=T)

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

    data: The aCGH data. Can either be in DNAcopy format or as a
          data.frame described in the details section 

mirrorLocs: List containing the chromosome start, centromere and end
          positions 

      cl: A class vector indicating which samples belong to which class

   data2: Instead of a class vector a second data set can be provided
          which will be combined with the first data set into one
          sample point matrix collection

   sigma: The kernel width 

sampleDensity: The sample point matrix resolution 

  maxmem: This parameter controls memory usage, set to lower value to
          lower memory consumption 

 verbose: If set to false, no progress information is displayed 

doChecks: If set to false, the data will not be checked for consistency 

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

     The input can either consist of a single data set and a class
     vector or two separate datasets. In the latter case a class vector
     will be created assigning each data set to its own class. 'data'
     can be in cghRaw (CGHbase), DNAcopy or in data.frame format. When
     using the latter, the data.frame must have the following two
     columns: 'chrom' stating the chromosome the probe is located on,
     'maploc' describing the position on the chromosome of the probe.
     The remainder of the data.frame will be interpreted as sample data
     points. The row names of that data will be used as probe names
     (when available). Important note: the data can not contain any
     missing values. If your data includes missing values you will need
     to preprocess (for example impute) it using other software
     solutions.

     The mirror locations for Homo Sapiens and Mus Musculus are
     provided in the package. These can be loaded using
     data(hsMirrorLocs) and data(mmMirrorLocs)  respectively. The
     'mirrorLocs' object is a list with vectors containing the start,
     centromere (optional) and end of each chromosome as the list
     elements. Additionally it should  contain an attribute
     'chromNames' listing the chromosome names of each respective list
     element.

     'sigma' defines the kernel width of the kernel used to convolute
     the data.

     'sampleDensity' defines the resolution of the sample point matrix
     to be calculated. A sampleDensity of 50000 would correspond to a
     sample point every 50k base pairs.

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

     Returns a sample point matrix collection object. The object has
     several slots of which the 'data' slot contains a matrix with the
     kernel smoothed estimates of all samples. The sample point matrix
     collection contains the following additional slots: cl: A class
     vector indicating which samples belong to which class. 
     annotation: The annotation (containing the chromosome and position
     on the chromosome) for the sample points in the 'data' slot

     The other slots just represent the parameters used to calculate
     the sample point matrix collection.

     Use 'compareSpmCollection' to get a 'compKc' object for which the
     significant regions can be calculated using 'getSigRegionsCompKC'.

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

     Jorma de Ronde

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

     'compareSpmCollection',  'getSigRegionsCompKC'

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

     data(hsSampleData)
     data(hsMirrorLocs)

     spmc1mb <- calcSpmCollection(hsSampleData, hsMirrorLocs, cl=c(rep(0,10),rep(1,10)))
     spmcc1mb <- compareSpmCollection(spmc1mb, nperms=3)
     spmcc1mbSigRegions <- getSigRegionsCompKC(spmcc1mb)

     plot(spmcc1mb, sigRegions=spmcc1mbSigRegions)

