Combine GRanges coverage replicates
Usage
combineGRcoverage(
gr,
covNames = NULL,
covName = NULL,
strands = NULL,
scaleFactors = 1,
verbose = FALSE,
...
)Arguments
- gr
GRangesobject containing coverage data in columns containing NumericList class data.- covNames
charactervector ofcolnames(GenomicRanges::values(gr))representing columns ingrthat contain coverage data in NumericList format, for example data prepared withgetGRcoverageFromBw().- covName
charactervector with length equal tolength(covNames)representing thesample_idfor eachcovNamesentry.- strands
charactervector, or NULL, indicating the strand for which the coverage data was obtained. WhenNULLthe strand is inferred by the presence of any negative values.- scaleFactors
numericvector length equal tolength(covNames)or expanded to that length. Values are multiplied by each coverage data result, intended to apply a normalization to each coverage value. A-1value can also be used to flip the score of negative strand data, in the event the source coverage data is scored only using positive values.- verbose
logicalindicating whether to print verbose output.- ...
additional arguments are ignored.
Value
GRanges object whose colnames contain the
covName (sample_id) for each observed strand,
with coverage combined taking the sum of individual
coverages after multiplying each by scaleFactors.
Details
This function takes a GRanges object as output from
getGRcoverageFromBw() and combines the coverages into
one coverage per strand for each covName (equivalent
to sample_id). Each coverage value is multiplied by
its scaleFactors value, then the sum is returned for
each strand, for each covName (sample_id).
The strand is inferred by the presence of negative values, where any negative value indicates the column is negative strand.
See also
Other Internal utility functions:
compressPolygonM(),
df2colorSub(),
dfWide2segments(),
escapeWhitespaceRegexp(),
factor2label(),
geomean(),
intercalate(),
internal_junc_score(),
jamGeomean(),
list2im(),
shrinkMatrix(),
simplifyXY(),
stackJunctions(),
strsplitOrdered()