Skip to contents

Convert GBreaks object to a comparison object

Usage

gb2comp(gb, color = NULL, ignore.strand = FALSE)

Arguments

gb

A GBreaks object.

color

(optional) A vector of colors, of same length as gb.

ignore.strand

Ignore strand information?

Value

Returns a genoPlotR::comparison object.

Note

Note that the comparison objects assume that the ranges are on the same sequence feature. It is your responsibility that the input GBreaks object also conforms to this assumption.

See also

Other genoPlotR functions: gb2dna_seg(), gb2xlim(), gr2dna_seg(), plotApairOfChrs()

Other Converter functions: GBreaksToMatrix(), gb2dna_seg(), gb2xlim(), gr2dna_seg()

Author

Charles Plessy

Examples

gb2comp(exampleInversion)
#>   start1 end1 start2 end2 direction      color            col
#> 1    100  190    100  190         1 darksalmon     darksalmon
#> 2    210  291    291  210        -1 darksalmon cornflowerblue
#> 3    301  400    301  400         1 darksalmon     darksalmon