cherByThreshold            package:Ringo            R Documentation

_F_u_n_c_t_i_o_n _t_o _i_d_e_n_t_i_f_y _c_h_e_r_s _b_a_s_e_d _o_n _t_h_r_e_s_h_o_l_d_s

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

     Given a vector of probe positions on the chromosome, a vector of
     smoothed intensities on these positions, and a threshold for
     intensities to indicated enrichment, this function identifies
     _Cher_s (ChIP-enriched regions) on this chromosome.

     This function is called by the function 'findChersOnSmoothed'.

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

     cherByThreshold(positions, scores, threshold, distCutOff,
       minProbesInRow = 3)

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

positions: numeric vector of genomic positions of probes

  scores: scores (intensities) of probes on those positions

threshold: threshold for scores to be called a cher

distCutOff: maximal positional distance between two probes to be part
          of the same cher

minProbesInRow: integer; minimum number of enriched probes required for
          a cher; see 'details' for further explanation.

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

     Specifying a minimum number of probes for a cher (argument
     'minProbesInRow')  guarantees that a cher is supported by a
     reasonable number of measurements in probe-sparse regions. For
     example, if there's only one enriched probe within a certain
     genomic 1kb region and no other probes can been mapped to that
     region, this single probe does arguably not provide enough
     evidence for calling this genomic region enriched.

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

     A LIST with n components, where the first n components are the
     cher clusters, each one holding the scores and, as their names,
     the genomic positions of probes in that cluster.

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

     Joern Toedling toedling@ebi.ac.uk

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

     'findChersOnSmoothed'

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

      ## example with random generated data:
      rpos <- cumsum(round(runif(200)*5))
      rsco <- rnorm(200)+0.2
      plot(rpos, rsco, type="l", col="seagreen3", lwd=2)
      rug(rpos, side=1, lwd=2); abline(h=0, lty=2)              
      rchers <- cherByThreshold(rpos, rsco, threshold=0, distCutOff=2)
      sapply(rchers[-length(rchers)], function(thisClust){
       points(x=as.numeric(names(thisClust)), y=thisClust, type="h", lwd=2,
      col="gold")})

