addCon                 package:cosmo                 R Documentation

_A_d_d _c_o_n_s_t_r_a_i_n_t_s _t_o _a_n _a_l_r_e_a_d_y _e_x_i_s_t_i_n_g _c_o_n_s_t_r_a_i_n_t _s_e_t

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

     Given a constraint set, the addCon command allows to add either
     interval-specific or global constraints to the constraintSet
     object. The possible interval-specific constraints are: boundCon
     (for information content bounding constraints), posFreqCon (for
     position frequency constraints), and shapeCon (for shape
     constraints). The possible global constraints are: subMotifCon
     (when part of the motif is known), palCon (for palindromic
     constraints) and shapeDiffCon (for information content differences
     between interval extremities). Each constraint can be built with
     its associated make-command: makeBoundCon, makePosFreqCon,
     makeShapeCon, makeSubMotifCon, makePalCon and makeShapeDiffCon.

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

       addCon(conSet, constraint, int=1) 

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

  conSet: an object of class '"constraint set"'

constraint: list of constraints constructed with one of the 6 make
          constraint commands. The length of the list should be the
          same as that of the 'int' argument. Instead of a list, this
          may also be a single constraint.

     int: vector of the intervals to which the constraints given in the
          constraint argument should be applied. There should be a
          one-to-one correspondance between the elements of the list
          and the interval argument. For global constraints, the value
          of the interval is of no importance but should be present and
          numeric.

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

     The output will be an object of class '"constraintSet"' resulting
     of the addition of the constraints to the original constraint set
     passed as first argument.

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

     Fabian Gallusser, fgallusser@berkeley.edu

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

     'boundCon', 'posFreqCon', 'shapeCon', 'subMotifCon',
     'shapeDiffCon', 'palCon' 'makeBoundCon', 'makePosFreqCon',
     'makeShapeCon', 'makeSubMotifCon', 'makeShapeDiffCon',
     'makePalCon'

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

     set=makeConSet(4,c("B","P","V","B"),c(4,50,NA,4))
     con1=makeBoundCon(1,2)
     con2=makePalCon(1,4,0.5)
     con3=makeSubMotifCon("TATA",0.6)
     con4=makePosFreqCon("2","A",0.5)
     con5=makePosFreqCon("All","G",0.4)
     conSet=addCon(set,list(con1,con2,con3,con4,con5),c(2,NA,NA,1,3))
     #Because of the palindromic constraint on intervals 1 and 4, the fourth
     #interval will inherit the nucleotide position frequency constraint
     #assigned to the first interval.

