interval_union        package:genomeIntervals        R Documentation

_G_e_n_o_m_e _i_n_t_e_r_v_a_l _s_e_t _o_p_e_r_a_t_i_o_n_s

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

     Compute interval set operations on '"Genome_intervals"' or
     '"Genome_intervals_stranded"' objects.

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

     ## S4 method for signature 'Genome_intervals':
     interval_union(x, ...)
     ## S4 method for signature 'Genome_intervals_stranded':
     interval_union(x, ...)

     ## S4 method for signature 'Genome_intervals':
     interval_complement(x)
     ## S4 method for signature 'Genome_intervals_stranded':
     interval_complement(x)

     ## S4 method for signature 'Genome_intervals':
     interval_intersection(x,...)
     ## S4 method for signature 'Genome_intervals_stranded':
     interval_intersection(x,...)

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

       x: A '"Genome_intervals"' or '"Genome_intervals_stranded"'
          object.

     ...: Optionally, additional objects of the same class as 'x'.

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

     Wrappers calling the corresponding functions of the package
     'intervals' by  same 'seq_name', 'inter_base' and if needed
     'strand'. Note that the    union of single input object 'x'
     returns the reduced form of 'x', i.e. the interval representation
     of the covered set.

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

     A single object of appropriate class, representing the union,
     complement or intersection of intervals computed over entries with
     same 'seq_name', 'inter_base' and  also 'strand' if all passed
     objects are of the class '"Genome_intervals_stranded"'.

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

     'interval_union', 'interval_complement', 'interval_intersection'
     and 'reduce' from the package 'intervals'.

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

     ## load toy examples
     data(gen_ints)
     ## content of i object
     i
              
     ## complement
     interval_complement(i)
      
     ## reduced form (non-overlapping interval representation of the covered set)
     interval_union(i)

     ## union
     interval_union(i[1:2,], i[1:4,])
      
     # map to genome intervals and union again
     i.nostrand = as(i,"Genome_intervals")
     interval_union(i.nostrand)
      
     ## intersection with a second object
     # print i and j in closed interval notation
     close_intervals(i)
     close_intervals(j)

     # interval_intersection
     interval_intersection(i,j)

     #interval intersection non-stranded
     interval_intersection(i.nostrand, as(j, "Genome_intervals"))

