Genome_intervals-class    package:genomeIntervals    R Documentation

_C_l_a_s_s "_G_e_n_o_m_e__i_n_t_e_r_v_a_l_s"

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

     A set of genomic intervals without specified strand. Genomic
     intervals are intervals over the integers with two further
     annotations: 'seq_name' (a chromosome or more generally a sequence
     of origin) and 'inter_base' ('logical') that states whether the
     interval is to be understood as an interval over bases  (such as
     coding-sequence) or inter-bases (such as restriction sites or
     insertion positions).

_S_l_o_t_s:


     '._D_a_t_a': See 'Intervals_full' 

     '_a_n_n_o_t_a_t_i_o_n': A '"data.frame"' with the same number of rows as
          '.Data'. It has a column named 'seq_name' that is a factor
          and does not contain missing values. 'seq_name' is used to
          represent the chromosome or more generally the sequence of
          origin of the intervals. 'annotation' has a column named
          'inter_base' that is logical and does not contain missing
          values. 'inter_base' is 'FALSE' if the interval is to be
          understood as an interval over bases  (such as
          coding-sequence) and 'TRUE' if it is over inter-bases (such
          as restriction site or an insertion position). Like base
          intervals, inter-base interval are encoded over the integers.
          An inter-base at position 'n' indicates the space between
          base 'n' and 'n+1'. 

     '_c_l_o_s_e_d': See 'Intervals_full' 

     '_t_y_p_e': See 'Intervals_full ' 

_E_x_t_e_n_d_s:

     Class '"Intervals_full"', directly. Class '"Intervals_virtual"',
     by class "Intervals_full", distance 2. Class '"matrix"', by class
     "Intervals_full", distance 3. Class '"array"', by class
     "Intervals_full", distance 4. Class '"structure"', by class
     "Intervals_full", distance 5. Class '"vector"', by class
     "Intervals_full", distance 6, with explicit coerce.

_M_e_t_h_o_d_s:


     [ 'signature(x = "Genome_intervals")': ... 

     [[ 'signature(x = "Genome_intervals")': ... 

     [[<- 'signature(x = "Genome_intervals")': ... 

     $ 'signature(x = "Genome_intervals")': ... 

     $<- 'signature(x = "Genome_intervals")': ... 

     _a_n_n_o_t_a_t_i_o_n 'signature(object = "Genome_intervals")': ... 

     _a_n_n_o_t_a_t_i_o_n<- 'signature(object = "Genome_intervals")': ... 

     _c_o_e_r_c_e 'signature(from = "Genome_intervals", to =
          "Intervals_full")': ... 

     _c_o_e_r_c_e 'signature(from = "Genome_intervals", to = "character")':
          ... 

     _d_i_s_t_a_n_c_e__t_o__n_e_a_r_e_s_t 'signature(from = "Genome_intervals", to =
          "Genome_intervals")': ... 

     _i_n_t_e_r__b_a_s_e 'signature(x = "Genome_intervals")': ... 

     _i_n_t_e_r__b_a_s_e<- 'signature(x = "Genome_intervals")': ... 

     _i_n_t_e_r_v_a_l__c_o_m_p_l_e_m_e_n_t 'signature(x = "Genome_intervals")': ... 

     _i_n_t_e_r_v_a_l__i_n_t_e_r_s_e_c_t_i_o_n 'signature(x = "Genome_intervals")': ... 

     _i_n_t_e_r_v_a_l__o_v_e_r_l_a_p 'signature(from = "Genome_intervals", to =
          "Genome_intervals")': ... 

     _i_n_t_e_r_v_a_l__u_n_i_o_n 'signature(x = "Genome_intervals")': ... 

     _s_e_q__n_a_m_e 'signature(x = "Genome_intervals")': ... 

     _s_e_q__n_a_m_e<- 'signature(x = "Genome_intervals")': ... 

     _s_i_z_e 'signature(x = "Genome_intervals")': ... 

     _t_y_p_e<- 'signature(x = "Genome_intervals")': ... 

_N_o_t_e:

     A 'Genome_intervals' is a '"Intervals_full"' of type Z (i.e. a set
     of intervals over the integers). The 'annotation' slot can carry
     further columns that can serve as annotations.

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

     'Genome_intervals_stranded' for a derived class that allows
     stranded genomic intervals.

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

     # The "Genome_intervals" class

     i <- new(
              "Genome_intervals",
              matrix(
                     c(1,2,  
                       3,5,
                       4,6,
                       8,9
                       ),
                     byrow = TRUE,
                     ncol = 2
              ),
              closed = matrix(
                                     c(
                                             TRUE, FALSE,
                                             TRUE, FALSE,
                                             TRUE, TRUE,
                                             TRUE, FALSE
                                      ),
                                     byrow = TRUE,
                             ncol = 2
                             ),
              annotation = data.frame(
                                             seq_name = factor(c("chr01","chr01", "chr02","chr02")),
                                             inter_base = c(FALSE, FALSE, TRUE, TRUE)
                                             )
              )
              
     colnames(i) <- c( "start", "end" )

     # print 
     print(i)

     # size (number of bases per interval)
     size(i)

