filter_calls: Filter CNV calls according to various criteria

View source: R/filter_calls.R

filter_callsR Documentation

Filter CNV calls according to various criteria

Description

This function takes a data.frame representing a set of calls such as generated by function getdels and filters them according to different criteria. The function allows filtering based on the number of data points supporting the events, the individuals in which the events are found, or the genomic regions in which the events are located.

Usage

filter_calls(calls, overall_minlength, hetdel_minlength, dup_minlength,
  individuals = NULL, het_sites = NULL, min_overlap = 0)

Arguments

calls

a data.frame of events such as generated by function getdels

overall_minlength

a single integer or numeric value. The minimum number of supporting data points for a CNV of any type (homozygous deletion, hemizygous deletion, duplication) to be kept.

hetdel_minlength

a single integer or numeric value. The minimum number of supporting data points for a hemizygous deletion to be kept.

dup_minlength

a single integer or numeric value. The minimum number of supporting data points for a duplication to be kept.

individuals

an optional character vector of samples for which to extract the CNV calls.

het_sites

a data.frame of genomic ranges to be used for filtering out events located in these regions.

min_overlap

a single numeric value between 0 and 1. The minimal proportion of the length of the event that must overlap with a region listed in het_sites for this event to be filtered out. A value of 0 results in an overlap of even a single nucleotide to be removed, whereas a value of 1 results in only CNVs entirely located in a specified region to be removed.

Value

a data.frame of read counts similar to that given as input, but with events removed according to the specified filters.

Examples

NULL

malemay/delgbs documentation built on Feb. 1, 2024, 8:38 a.m.