distanceToFeature: Determines the distance to a genomic feature

Description Usage Arguments Details Examples

View source: R/somatic_features.R

Description

Determines the distance to a genomic feature

Usage

1
distanceToFeature(query, feature, feature.name, boundary, average)

Arguments

query

A GRanges object containing breakpoint 1 with a GRanges for breakpoint 2 in a metadata column caled linked.to

feature

A GRanges object containing the features to compute the distance from

feature.name

A character vector of length 1 indicating the name of the feature being evaluated. This value is only used to create the output table.

boundary

A logical(TRUE/FALSE) indicating whether or not to return the distance to the feature boundary. If TRUE, then the absolute distance to the nearest feature boundary will be returned. If FALSE, then if a breakpoint in query is within a feature, a negative value corresponding to the number of bases inside the feature will be returned. For example, when boundary = TRUE, if a breakpoint is 100 bases into a LAD then -100 will be returned, and if boundary = FALSE, then 100 will be returned.

average

A logical (TRUE/FALSE) indicating whether or not to return the average distance of the two breakpoints for each structural variant to the feature

Details

Computes the distance (in megabases) that each breakpoint in query is away from the nearest range in feature. If a breakpoint is inside a feature, then the distance will be negative. If there is a seqname in query that it not in feature, then the value returned for that element of query will be NA.

Examples

1
2
3
4
Example 1: Determining the distance of each breakpoint in test_sv to LADs
data(test_sv)
data(lad)
distanceToFeature(query = test_sv, feature = lad, feature.name = 'lad', boundary = FALSE, average = TRUE)

cancer-genomics/plasmasv documentation built on May 15, 2020, 11:35 a.m.