Flag ranges that start a quadruplet that would be colinear if the two central
pairs were aligned to the opposite strand. This implies breakpoint reuse.
The four ranges must be on the same target sequence, and their strand must
be known (not *).
Arguments
- gb
A
GBreaks()object.- details
Returns more metadata columns if
TRUE.
Details
Here is a trivial example of a twin inversion.
┌──────────────┬──────────────┬──────────────┐──────────────┐
│ chrA:101-200 │ chrA:201-300 │ chrA:301-400 │ chrA:401-500 │ (Target genome)
└──────────────┴──────────────┴──────────────┘──────────────┘
+ - - + (Alignment direction)
┌──────────────┬──────────────┬──────────────┐──────────────┐
│ chrB:101-200 │ chrB:201-300 │ chrB:301-400 │ chrB:401-500 │ (Query genome)
└──────────────┴──────────────┴──────────────┘──────────────┘See also
Other Flagging functions:
flagAll(),
flagColinearAlignments(),
flagDoubleInversions(),
flagInversions(),
flagLongShort(),
flagPairs(),
flagTranslocations()
Other Inversion functions:
filterDoubleInversions(),
filterInversions(),
flagDoubleInversions(),
flagInversions(),
flagPairs(),
flipInversions(),
leftInversionGaps(),
removeDoubleInversions(),
removeInversions(),
showInversions()
Other Structural variants:
StructuralVariants,
flagDoubleInversions(),
flagInversions(),
flagPairs(),
flagTranslocations(),
plotApairOfChrs()
Examples
flagTwinInversions(exampleTwinInversions)
#> GBreaks object with 4 ranges and 2 metadata columns:
#> seqnames ranges strand | query twi
#> <Rle> <IRanges> <Rle> | <GRanges> <logical>
#> [1] chrA 100-190 + | chrB:100-190 TRUE
#> [2] chrA 200-290 - | chrB:200-290 FALSE
#> [3] chrA 300-390 - | chrB:300-390 FALSE
#> [4] chrA 400-490 + | chrB:400-490 FALSE
#> -------
#> seqinfo: 1 sequence from an unspecified genome
plotApairOfChrs(exampleTwinInversions)
flagTwinInversions(exampleTwinInversions |> reverse() |> sort(ignore.strand = TRUE))
#> GBreaks object with 4 ranges and 2 metadata columns:
#> seqnames ranges strand | query twi
#> <Rle> <IRanges> <Rle> | <GRanges> <logical>
#> [1] chrA 111-201 - | chrB:400-490 TRUE
#> [2] chrA 211-301 + | chrB:300-390 FALSE
#> [3] chrA 311-401 + | chrB:200-290 FALSE
#> [4] chrA 411-501 - | chrB:100-190 FALSE
#> -------
#> seqinfo: 1 sequence from an unspecified genome
plotApairOfChrs(exampleTwinInversions |> reverse())