reportGaps: Report gaps between a set of target and query ranges.

View source: R/pafToGaps.R

reportGapsR Documentation

Report gaps between a set of target and query ranges.

Description

This function takes set of target and query ranges and reports all gaps in target ranges (Default behavior) and their corresponding query ranges. This behavior is reversed using 'invert' parameter. Note that target and query ranges are expected to be 1-to-1 alignments as reported in a PAF format.

Usage

reportGaps(t.ranges = NULL, q.ranges = NULL, invert = FALSE)

Arguments

t.ranges

A GRanges-class object of target ranges where gaps are searched for by default.

q.ranges

A GRanges-class object of query ranges.

invert

If set to TRUE 'q.ranges' are used to search for gaps instead of 't.ranges'.

Value

A GRanges-class object reporting gaps as well as upstream (up) and downstream (down) alignments around each gap.

Author(s)

David Porubsky

Examples

## Define target and query ranges to process
target.ranges <- GenomicRanges::GRanges(
    seqnames = "target",
    IRanges::IRanges(
        start = c(1, 111, 150),
        end = c(100, 150, 200)
    )
)
query.ranges <- GenomicRanges::GRanges(
    seqnames = "query",
    IRanges::IRanges(
        start = c(1000, 1100, 1301),
        end = c(1100, 1200, 1500)
    )
)
## Report gaps within target ranges
reportGaps(t.ranges = target.ranges, q.ranges = query.ranges)
## Report gaps within query ranges
reportGaps(t.ranges = target.ranges, q.ranges = query.ranges, invert = TRUE)


daewoooo/SVbyEye documentation built on March 31, 2024, 8:58 a.m.