Flip strand of inversions
Arguments
- gb
A
GBreaks
object processed withflagInversions
.
Value
Returns the GBreaks
object in which all ranges that are the
central part of an inversion triplet have their strand orientation flipped.
The inv
metadata column is then discarded as it is not valid anymore. As
the former inversion triplets are now collinear, new inversions may possibly
found after the object is coalesced again.
See also
Other Inversion functions:
filterDoubleInversions()
,
filterInversions()
,
flagDoubleInversions()
,
flagInversions()
,
flagPairs()
,
leftInversionGaps()
,
showInversions()
Other modifier functions:
bridgeRegions()
,
coalesce_contigs()
,
forceSeqLengths()
,
guessSeqLengths()
,
keepLongestPair()
,
mergeSeqLevels()
,
reverse()
,
splitSeqLevel()
,
swap()
Examples
exampleNestedInversions |> flagInversions()
#> GBreaks object with 5 ranges and 2 metadata columns:
#> seqnames ranges strand | query inv
#> <Rle> <IRanges> <Rle> | <GRanges> <Rle>
#> [1] chrA 100-190 + | chrA:100-190 FALSE
#> [2] chrA 200-290 - | chrA:400-490 TRUE
#> [3] chrA 300-390 + | chrA:300-390 FALSE
#> [4] chrA 400-490 - | chrA:200-290 FALSE
#> [5] chrA 500-590 + | chrA:500-590 FALSE
#> -------
#> seqinfo: 1 sequence from an unspecified genome
flipInversions(exampleNestedInversions |> flagInversions())
#> GBreaks object with 5 ranges and 1 metadata column:
#> seqnames ranges strand | query
#> <Rle> <IRanges> <Rle> | <GRanges>
#> [1] chrA 100-190 + | chrA:100-190
#> [2] chrA 200-290 - | chrA:400-490
#> [3] chrA 300-390 - | chrA:300-390
#> [4] chrA 400-490 - | chrA:200-290
#> [5] chrA 500-590 + | chrA:500-590
#> -------
#> seqinfo: 1 sequence from an unspecified genome