gr.merge: merge GRanges by using coordinates as primary key

gr.mergeR Documentation

merge GRanges by using coordinates as primary key

Description

Uses gr.findoverlaps() to enable internal and external joins of GRanges using syntax similar to "merge" where merging is done using coordinates +/- "by" fields

Uses gr.findoverlaps() / GRanges::findOverlaps for heavy lifting, but returns outputs with metadata populated as well as query and subject ids. For external joins, overlaps x with gaps(y) and gaps(x) with y.

Usage

gr.merge(
  query,
  subject,
  by = NULL,
  all = FALSE,
  all.query = all,
  all.subject = all,
  ignore.strand = TRUE,
  verbose = FALSE,
  ...
)

Arguments

query

GRanges Set of GRanges to query. Refer to gr.findoverlaps() and GenomicRanges::findOverlaps()

subject

GRanges Set of GRanges as 'subject' in query. Refer to gr.findoverlaps() and GenomicRanges::findOverlaps()

by

vector Additional metadata fields to join on

all

boolean Flag whether to include left and right joins

all.query

boolean Flag whether to do a left join (default = all)

all.subject

boolean Flag whether to do a right join (default = all)

ignore.strand

boolean Strand information ignored (default = TRUE)

verbose

boolean

Value

GRanges merged on 'by' vector


mskilab/gUtils documentation built on June 6, 2023, 12:08 a.m.