reproducibilityFilter: Replicate reproducibility filter function

View source: R/Functions.R

reproducibilityFilterR Documentation

Replicate reproducibility filter function

Description

For each replicate the number of binding sites with a certain number of crosslinks is calculated. A quantile based threshold (cutoff) is applied to each replicate. This indicates how many of the merged binding sites are supported by crosslinks from the respective replicate. Next, one can specify how many replicates need to pass the defined threshold for a binding site to be considered reproducible.

Usage

reproducibilityFilter(
  object,
  cutoff = NULL,
  nReps = NULL,
  minCrosslinks = 1,
  returnType = c("BSFDataSet", "data.frame"),
  n.reps = lifecycle::deprecated(),
  min.crosslinks = lifecycle::deprecated(),
  quiet = FALSE
)

Arguments

object

a BSFDataSet object

cutoff

numeric; percentage cutoff to be used for the reproducibility quantile filtering

nReps

numeric; number of replicates that must meet the cutoff defined in cutoff for a binding site to be called reproducible. Defaults to N-1.

minCrosslinks

numeric; minimal number of crosslinks a binding site needs to have to be called reproducible. Acts as a lower boundary for cutoff. Defaults to 1.

returnType

one of "BSFDataSet" or "data.frame". "BSFDataSet" is the default and "matrix" can be used for easy plotting.

n.reps

deprecated -> use nReps instead

min.crosslinks

deprecated -> use minCrosslinks instead

quiet

logical; whether to print messages

Details

If cutoff is a single number then the indicated cutoff will be applied to all replicates. If it is a vector then each element in the vector is applied to all replicates of the respective condition. The order is hereby given by the levels of the condition column of the meta data (see BSFDataSet,getMeta). If the condition specific filter is applied, a meta column is added to the GRanges of the BSFDataSet object, indicating the support for each condition.

If nReps is a single number then this number is used as treshold for all binding sites. If it is a vector then it is applied to the replicates of the respective condition (like in cutoff). This allows the application of different thresholds for experiments of different experimental conditions. If the condition specific filter is applied, a meta column is added to the GRanges of the BSFDataSet object, indicating the support for each condition.

The function is part of the standard workflow performed by BSFind.

Value

an object of type BSFDataSet

See Also

BSFind, reproducibilityFilterPlot, reproducibilitySamplesPlot, reproducibilityScatterPlot

Examples

# load data
files <- system.file("extdata", package="BindingSiteFinder")
load(list.files(files, pattern = ".rda$", full.names = TRUE))

# merge binding sites
bds <- makeBindingSites(object = bds, bsSize = 9)

# use default return with condition specific threshold
bds = reproducibilityFilter(bds, cutoff = 0.1, nReps = 1)


ZarnackGroup/BindingSiteFinder documentation built on May 31, 2024, 3:29 a.m.