gainLoss                package:aCGH                R Documentation

_F_u_n_c_t_i_o_n _t_o _c_o_m_p_u_t_e _p_r_o_p_o_r_t_i_o_n _o_f _g_a_i_n_s _a_n_d _l_o_s_s_e_s _f_o_r _e_a_c_h _c_l_o_n_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     This function outputs lists containing proportion of gains and
     losses for each clone.

_U_s_a_g_e:

     gainLoss(dat, cols, thres=0.25)

_A_r_g_u_m_e_n_t_s:

     dat: log2ratios of the relevant array CGH object

    cols: indeces of the samples to use

   thres: global or tumor-specific threshold. defaults to 0.25

_V_a_l_u_e:

   gainP: Vector of proportion gained for each clones

   lossP: Vector of proportion lost for each clones

_A_u_t_h_o_r(_s):

     Jane Fridlyand

_S_e_e _A_l_s_o:

     'plotFreqStat'

_E_x_a_m_p_l_e_s:

     data(colorectal)

     ## Use mt.maxT function from multtest package to test
     ## differences in group means for each clone grouped by sex
     ##use only clones with show gain or loss in at least 10% of the samples
     colnames(phenotype(colorectal))
     sex <- phenotype(colorectal)$sex
     sex.na <- !is.na(sex)
     colorectal.na <- colorectal[ ,sex.na, keep = TRUE ]
     factor <- 2.5
     minChanged <- 0.1
     gainloss <- gainLoss(log2.ratios(colorectal.na), cols=1:ncol(colorectal.na), thres=factor*sd.samples(colorectal.na)$madGenome)
     ind.clones.use <- which(gainloss$gainP >= minChanged | gainloss$lossP>= minChanged)
     #create filtered dataset
     colorectal.na <- colorectal.na[ind.clones.use,keep=TRUE]
     dat <- log2.ratios.imputed(colorectal.na)
     resT.sex <- mt.maxT(dat, sex[sex.na],test = "t.equalvar", B = 1000)

     ## Plot the result along the genome
     plotFreqStat(colorectal.na, resT.sex, sex[sex.na],factor=factor,titles = c("Male", "Female"))

