reproducibilityFilter {BindingSiteFinder} | R Documentation |
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.
reproducibilityFilter( object, cutoff = 0.05, n.reps = 1, min.crosslinks = 1, returnType = c("BSFDataSet", "data.frame") )
object |
a BSFDataSet object |
cutoff |
a vector of length = 1, or of length = levels(getMeta(object)$conditions) with a single number (between 0-1) indicating the quantile cutoff |
n.reps |
a vector of length = 1, or of length = l evels(getMeta(object)$conditions) indicating how many replicates need to meet their threshold for a binding site to be called reproducible. |
min.crosslinks |
numeric of length = 1, defines the lower boundary for the minimum number of crosslinks a binding site has to be supported by all replicates, regardless of the replicate specific quantile threshold |
returnType |
one of "BSFDataSet" or "data.frame". "BSFDataSet" is the default and "matrix" can be used for easy plotting. |
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 n.reps
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.
an object of type BSFDataSet
# 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, minWidth = 2, minCrosslinks = 2, minClSites = 1) # use default return with single threshold s = reproducibilityFilter(bds, cutoff = c(0.05), n.reps = c(3)) # use default return with condition specific threshold s = reproducibilityFilter(bds, cutoff = c(0.1, 0.05), n.reps = c(1, 2)) # use data.frame return type for plotting s = reproducibilityFilter(bds, cutoff = c(0.1, 0.05), n.reps = c(1, 2), returnType = "data.frame") library(ComplexHeatmap) m = make_comb_mat(s) UpSet(m)