prefilter                package:xps                R Documentation

_F_u_n_c_t_i_o_n _f_o_r _A_p_p_l_y_i_n_g _a _P_r_e_F_i_l_t_e_r _t_o _a_n _E_x_p_r_T_r_e_e_S_e_t

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

     This function applies a 'PreFilter' to an 'ExprTreeSet'.

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

     prefilter(xps.expr,
               filename   = character(0),
               filedir    = getwd(),
               filter     = NULL,
               minfilters = 999,
               logbase    = "log2",
               treename   = "PreFilter",
               xps.call   = NULL,
               verbose    = TRUE)

     xpsPreFilter(object, ...)

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

xps.expr: object of class 'ExprTreeSet'.

filename: file name of ROOT filter file.

 filedir: system directory where ROOT filter file should be stored.

  filter: object of class 'PreFilter'.

minfilters: minimum number of initialized filter methods to satisfy
          (default is all filters).

 logbase: convert data to logarithm of base: '"0"', '"log"', '"log2"'
          (default), '"log10"'

treename: tree name to be used in ROOT filter file.

xps.call: optional object of class 'CallTreeSet'.

 verbose: logical, if 'TRUE' print status information.

  object: object of class 'ExprTreeSet'.

     ...: same arguments as function 'prefilter'.

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

     This function applies the different filters initialized with
     constructor 'PreFilter' to the 'ExprTreeSet' 'xps.expr'.

     Slot 'minfilters' determines the minimum number of initialized
     filters, which must be satisfied so that the mask is set to
     'flag=1'. For 'minfilters=1' at least one filter must be 
     satisfied, equivalent to logical OR; for 'minfilters=999' all
     filters must be  satisfied, equivalent to logical AND.

     If method 'callFilter' was initialized with constructor
     'PreFilter' then 'CallTreeSet' 'xps.call' must be supplied,
     usually created with function 'mas5.call'.

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

     A 'FilterTreeSet'

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

     Christian Stratowa

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

     'PreFilter', 'unifilter'

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

     ## Not run: 
     ## first, load ROOT scheme file and ROOT data file
     scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
     data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

     ## second, create an ExprTreeSet
     data.rma <- rma(data.test3,"tmp_TestRMA",tmpdir="",background="pmonly",normalize=TRUE,verbose=FALSE)
     ## note: do not copy/paste this code, it is necessary only because R CMD check fails since it does not find tmp_TestRMA.root:
     data.rma@rootfile <- paste(.path.package("xps"),"rootdata/tmp_Test3RMA.root",sep="/")
     data.rma@filedir  <- paste(.path.package("xps"),"rootdata",sep="/")

     ## third, construct a PreFilter
     prefltr <- PreFilter(mad=c(0.5,0.01),lothreshold=c(6.0,0.02,"mean"),hithreshold=c(10.5,80.0,"percent"))

     ## finally, create a FilterTreeSet
     rma.pfr <- prefilter(data.rma,"tmp_Test3Prefilter",getwd(),prefltr,2,verbose=FALSE)
     str(rma.pfr)
     ## End(Not run)

