gps-methods             package:Rtreemix             R Documentation

_M_e_t_h_o_d_s _f_o_r _p_r_e_d_i_c_t_i_n_g _t_h_e _G_P_S _o_f _g_i_v_e_n _d_a_t_a_s_e_t _b_y
_u_s_i_n_g _a _g_i_v_e_n _m_u_t_a_g_e_n_e_t_i_c _t_r_e_e_s _m_i_x_t_u_r_e _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     These functions compute the genetic progression score (GPS) of
     each sample in the given 'data' by performing a waiting time
     simulation along the branchings of the mixture model 'model'. The
     model has to be specified. If a dataset is missing a GPS for all
     possible patterns is calculated. The number of events of the
     samples in 'data' equals the number of genetic events in the
     'model'.

_U_s_a_g_e:

     ## S4 method for signature 'RtreemixModel, RtreemixData':
     gps(model, data, ...)
     ## S4 method for signature 'RtreemixModel, matrix':
     gps(model, data, ...)
     ## S4 method for signature 'RtreemixModel, missing':
     gps(model, data, ...)

_A_r_g_u_m_e_n_t_s:

   model: An object of the class 'RtreemixModel' specifying the
          mutagenetic trees mixture model used for deriving the GPS
          values.  The model should NOT have more than 20 genetic
          events.

    data: An 'RtreemixData' object or a 0-1 'matrix' containing the
          samples (patterns of genetic events) for which the GPS values
          are to be calculated. The length of each of them has to be
          equal to the number of genetic events in the 'model'.

     ...: 'sampling.mode' is a 'character' that specifies the sampling
          mode ("constant" or "exponential") used in the waiting time
          simulations. Its default value is "exponential".
          'sampling.param' is a 'numeric' that specifies the sampling
          parameter corresponding to the sampling mode given by
          'sampling.mode'. Its default value is 1. 'no.sim' is an
          'integer' larger than 0 giving the number of iterations for
          the waiting time simulations. Its default value is 10. 'seed'
          is a positive 'integer' specifying the random generator seed.
          Its default value is (-1) and then the time is used as a
          random generator. 

_V_a_l_u_e:

     The function returns an object from the 'RtreemixGPS' class that
     containes the calculated GPS values, the model used for the
     computation, the data, and so on (see 'RtreemixGPS-class'). The
     GPS values are represented as a 'numeric' vector with length equal
     to the number of samples in 'data'.

_M_e_t_h_o_d_s:


     _m_o_d_e_l = "_R_t_r_e_e_m_i_x_M_o_d_e_l", _d_a_t_a = "_R_t_r_e_e_m_i_x_D_a_t_a", ... A method for
          calculating the GPS values of the data given as
          'RtreemixData' object.

     _m_o_d_e_l = "_R_t_r_e_e_m_i_x_M_o_d_e_l", _d_a_t_a = "_m_a_t_r_i_x", ... A method for
          calculating the GPS values of the data given as 0-1 'matrix'.

     _m_o_d_e_l = "_R_t_r_e_e_m_i_x_M_o_d_e_l", _d_a_t_a = "_m_i_s_s_i_n_g", ... A method for
          calculating the GPS values of the set of all possible
          patterns.    

_N_o_t_e:

     The mixture model used for deriving the GPS values should not have
     more than  20 genetic events. The reason for this is that the
     number of all possible patterns  for which the GPS values are
     calculated during a computationally intensive simulations  is in
     this case $2^20$. This demands too much memory. The GPS examples
     are time consuming. They are commented out because of the time
     restrictions of the check of the package. For trying out the code
     please copy it and uncomment it.

_A_u_t_h_o_r(_s):

     Jasmina Bogojeska

_R_e_f_e_r_e_n_c_e_s:

     Estimating cancer survival and clinical outcome based on genetic
     tumor progression scores, J. Rahnenf\"urer et al.

_S_e_e _A_l_s_o:

     'RtreemixGPS-class', 'RtreemixData-class', 'RtreemixModel-class',
     'fit-methods', 'confIntGPS-methods'

_E_x_a_m_p_l_e_s:

     ## Create an RtreemixData object from a randomly generated RtreemixModel object.
     #rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8))
     #data <- sim(model = rand.mod, no.draws = 400)

     ## Create an RtreemixModel object by fitting model to the given data.
     #mod <- fit(data = data, K = 2, equal.edgeweights = TRUE, noise = TRUE)
     #show(mod)

     ## Create an RtreemixGPS object by calculating the GPS for all possible patterns.
     #modGPS.all <- gps(model = mod, no.sim = 1000) ## time consuming copmutations
     #show(modGPS.all)

     ## See the GPS values for all possible data.
     #GPS(modGPS.all) ## time consuming copmutations

     ## Create an RtreemixGPS object by calculating the GPS for the data based on the model mod.
     #modGPS <- gps(model = mod, data = data, no.sim = 1000)
     #show(modGPS) ## time consuming copmutations

     ## See the GPS values for data.
     #GPS(modGPS) ## time consuming copmutations

