freq.range: Frequency computation for ranges

Description Usage Arguments Details Value Author(s)

View source: R/freq.range.R

Description

The frequency is defined as the number of input ranges overlapping a particular bp/region. In practice, all the ranges defined by columns 'chr', 'start' and 'end' in the input data.frame are overlapped and used to define sub-ranges. Then the number of input ranges overlapping each sub-ranges is computed and return in a data.frame.

Usage

1
2
freq.range(range.df, plot = FALSE, annotate.only = FALSE, nb.samp = NA,
  min.rol = 0, chunk.size = 1e+05)

Arguments

range.df

a data.frame with columns 'chr', 'start' and 'end'.

plot

should a graph with the frequency distribution be displayed. Default is FALSE.

annotate.only

If TRUE, the input ranges are annotated with the number of other overlapping ranges. If FALSE (Default), the input ranges are fragmented and the frequency computed for each sub-range.

nb.samp

the total number of sample. Used if not NA. Default is NA.

min.rol

minimum reciprocal overlap when 'annotate.only=TRUE'. If 0 (default) any overlap counts.

chunk.size

the number or regions in each chunk when 'annotate.only=TRUE'. Default is 1e5. Decrease if memory problems.

Details

If 'annotate.only=TRUE' however, the frequency of an input range is computed as the number of ranges overlapping it. It is less-suited to describe the frequency distribution, but more convenient to filter out frequent variants.

Value

a data.frame with the frequency of each sub-range

Author(s)

Jean Monlong


jmonlong/PopSV documentation built on Sept. 15, 2019, 9:29 p.m.