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"))

