getWeights: Get weights from a subject GenomicRanges object

View source: R/gr_helpers.R

getWeightsR Documentation

Get weights from a subject GenomicRanges object

Description

Get weights from a subject GenomicRanges object

Usage

getWeights(subject, weight = 1L)

Arguments

subject

a GRanges, IRanges, GAlignment, GAlignmentPairs or covRle object

weight

a numeric/integer vector or metacolumn name. (default: 1L, no differential weighting). If weight is name of defined meta column in reads object, it gives the number of times a read was found at that position. GRanges("chr1", 1, "+", score = 5), would mean "score" column tells that this alignment region was found 5 times. if 1L it means each read is weighted equal as 1, this is what among others countOverlaps() presumes, if single number (!= 1), it repeats for all ranges, if vector with length > 1, it must be equal size of the reads object.

Value

a numeric vector of weights of equal size to subject


Roleren/ORFik documentation built on Dec. 18, 2024, 11:39 p.m.