most_similar_n_regions: Identify similar genomic regions based on genomic features

View source: R/MethylDriver.R

most_similar_n_regionsR Documentation

Identify similar genomic regions based on genomic features

Description

Uses a table with numerical features of genomic regions of interest to identify the row indices for the n most similar other regions for each region. Similarity is measured using Euclidean distance calculated using all features. A GRanges object with the genomic coordiantes of the regions can also be supplied and if so, overlapping regions will be excluded from being considered neighbours.

Usage

most_similar_n_regions(feature_table, ranges = NULL, n = 100)

Arguments

feature_table

A data.frame or matrix with genomic features for a set of genomic regions, where features are columns and region names are row names.

ranges

An optional GRanges object containing the genomic coordinates of the regions in the feature table. Row names of feature table should match names of ranges. If supplied, regions which overlap will be excluded from being considered similar to each other.

n

Number of closest neighbours to identify (default is 100).

Value

A list with the indices of the most similar n other regions for each region


rheery/MethylDriver documentation built on Dec. 10, 2022, 7:28 a.m.