convert.output            package:snapCGH            R Documentation

_C_o_n_v_e_r_t_s _t_h_e _o_u_t_p_u_t _f_r_o_m _t_h_e _s_i_m_u_l_a_t_i_o_n _t_o _a _f_o_r_m_a_t _w_h_i_c_h _c_a_n _b_e _u_s_e_d _b_y _s_e_g_m_e_n_t_a_t_i_o_n _s_c_h_e_m_e_s _a_v_a_i_l_a_b_l_e _w_i_t_h_i_n _R

_D_e_s_c_r_i_p_t_i_o_n:

     This function converts the output obtained by applying our
     simulation scheme into a format that can be used (either directly
     or indirectly) as the input to various segmentation schemes
     available within R. Additionally, we are in the process of
     submitting a library to CRAN which will enable the user to apply a
     number of the segmentation schemes available within R to datasets
     which have the same structure as that generated by this function.

_U_s_a_g_e:

     convert.output(input)

_A_r_g_u_m_e_n_t_s:

   input: The output obtained upon applying the sim.structure function 

_D_e_t_a_i_l_s:

     This function outputs an object which is similar in
     structure/format to an RG or MA object used in Limma.

_V_a_l_u_e:

     This function outputs a list with entries 

      M : A matrix continaing the $\mbox{log}_2$ ratios

  genes : A matrix containing the simulated midpoints and the
          chromosome which forms the template upon which the simulation
          is based.

_A_u_t_h_o_r(_s):

     Michael Smith, John Marioni

_E_x_a_m_p_l_e_s:

     ## The function is currently defined as
     function(input){
       holder <- list()
       for (i in 1:length(input)){
       holder[[i]] <- list()}
       for(i in 1:length(input)){
         holder[[i]]$genes <- matrix(NA, nrow = length(input[[i]]$clones$mid.point),
                                     ncol = 2)
       }
       for(i in 1:length(input)){
         holder[[i]]$M <- as.matrix(input[[i]]$datamatrix)
         holder[[i]]$genes[,1] <- input[[i]]$clones$mid.point
         holder[[i]]$genes[,2] <- rep(input[[i]]$chrom,length(input[[i]]$clones$mid.point))
         colnames(holder[[i]]$genes) <- c("kb", "Chrom")
         holder[[i]] <- new("aCGHList", holder[[i]])
       }
       holder
       }

