combineGRcoverage: Combine GRanges coverage replicates

combineGRcoverageR Documentation

Combine GRanges coverage replicates

Description

Combine GRanges coverage replicates

Usage

combineGRcoverage(
  gr,
  covNames = NULL,
  covName = NULL,
  strands = NULL,
  scaleFactors = 1,
  verbose = FALSE,
  ...
)

Arguments

gr

GRanges object containing coverage data in columns containing NumericList class data.

covNames

character vector of colnames(values(gr)) representing columns in gr that contain coverage data in NumericList format, for example data prepared with getGRcoverageFromBw().

covName

character vector with length equal to length(covNames) representing the sample_id for each covNames entry.

strands

character vector, or NULL, indicating the strand for which the coverage data was obtained. When NULL the strand is inferred by the presence of any negative values.

scaleFactors

numeric vector length equal to length(covNames) or expanded to that length. Values are multiplied by each coverage data result, intended to apply a normalization to each coverage value. A -1 value 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

logical indicating whether to print verbose output.

...

additional arguments are ignored.

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.

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.

See Also

Other jam GRanges functions: addGRLgaps(), addGRgaps(), annotateGRLfromGRL(), annotateGRfromGR(), assignGRLexonNames(), closestExonToJunctions(), exoncov2polygon(), findOverlapsGRL(), flattenExonsBy(), getFirstStrandedFromGRL(), getGRLgaps(), getGRcoverageFromBw(), getGRgaps(), grl2df(), jam_isDisjoint(), make_ref2compressed(), sortGRL(), spliceGR2junctionDF(), stackJunctions()

Other jam RNA-seq functions: assignGRLexonNames(), closestExonToJunctions(), defineDetectedTx(), detectedTxInfo(), exoncov2polygon(), flattenExonsBy(), getGRcoverageFromBw(), groups2contrasts(), internal_junc_score(), makeTx2geneFromGtf(), make_ref2compressed(), prepareSashimi(), runDiffSplice(), sortSamples(), spliceGR2junctionDF()


jmw86069/splicejam documentation built on Dec. 9, 2022, midnight