Skip to contents

This feature is useful when analysing genomes comprising a main chromosomes and extra plasmids or smaller chromosomes. Assuming that the main chroomosome can be detected only by its length, this function extracts the alignment between the pair of main chromosomes only.

Usage

keepLongestPair(gb, drop = FALSE)

Arguments

gb

A GBreaks object

drop

Drop unused sequence levels.

Value

A GBreaks object with only one sequence feature in use per genome.

Author

Charles Plessy

Examples

exampleTranslocation
#> GBreaks object with 3 ranges and 1 metadata column:
#>       seqnames    ranges strand |        query
#>          <Rle> <IRanges>  <Rle> |    <GRanges>
#>   [1]     chrA   100-200      + | chrB:100-200
#>   [2]     chrA   201-300      + | chrC:201-300
#>   [3]     chrA   301-400      + | chrB:301-400
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome
exampleTranslocation |> keepLongestPair()
#> GBreaks object with 2 ranges and 1 metadata column:
#>       seqnames    ranges strand |        query
#>          <Rle> <IRanges>  <Rle> |    <GRanges>
#>   [1]     chrA   100-200      + | chrB:100-200
#>   [2]     chrA   301-400      + | chrB:301-400
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome