ranges-interweave: Interweave a pair of Ranges objects together

Description Usage Arguments Details Value Examples

Description

Interweave a pair of Ranges objects together

Usage

1
interweave(left, right, .id = NULL)

Arguments

left, right

Ranges objects.

.id

When supplied a new column that represents the origin column and is linked to each row of the resulting Ranges object.

Details

The output of interweave() takes pairs of Ranges objects and combines them into a single Ranges object. If an .id argument is supplied, an origin column with name .id is created indicated which side the resulting Range comes from (eit)

Value

a Ranges object

Examples

1
2
3
4
5
6
gr <- as_granges(data.frame(start = 10:15,
                            width = 5,
                            seqnames = "seq1",
                            strand = c("+", "+", "-", "-", "+", "*")))
interweave(flank_left(gr, width = 5L), flank_right(gr, width = 5L))
interweave(flank_left(gr, width = 5L), flank_right(gr, width = 5L), .id = "origin")

plyranges documentation built on Nov. 8, 2020, 7:36 p.m.