Skip to contents

Flips positive (+) stranded intervals to negative (-) strands, and vice-versa. Facilitates comparisons among intervals on opposing strands.

Usage

flip_strands(x)

Arguments

x

ivl_df

See also

Examples

x <- tibble::tribble(
  ~chrom, ~start, ~end, ~strand,
  "chr1", 1,      100,  "+",
  "chr2", 1,      100,  "-"
)

flip_strands(x)
#> # A tibble: 2 × 4
#>   chrom start   end strand
#>   <chr> <dbl> <dbl> <chr> 
#> 1 chr1      1   100 -     
#> 2 chr2      1   100 +