Description Usage Arguments Value See Also Examples
View source: R/riboseq_features.R
Calculates entropy of the 'reads' coverage over each 'grl' group. The entropy value per group is a real number in the interval (0:1), where 0 indicates no variance in reads over group. For example c(0,0,0,0) has 0 entropy, since no reads overlap.
1 |
grl |
a |
reads |
a |
weight |
a vector (default: 1L, if 1L it is identical to countOverlaps()), if single number (!= 1), it applies for all, if more than one must be equal size of 'reads'. else it must be the string name of a defined meta column in subject "reads", that gives number of times a read was found. GRanges("chr1", 1, "+", score = 5), would mean "score" column tells that this alignment region was found 5 times. |
is.sorted |
logical (FALSE), is grl sorted. That is + strand groups in increasing ranges (1,2,3), and - strand groups in decreasing ranges (3,2,1) |
overlapGrl |
an integer, (default: NULL), if defined must be countOverlaps(grl, RFP), added for speed if you already have it |
A numeric vector containing one entropy value per element in 'grl'
Other features:
computeFeaturesCage()
,
computeFeatures()
,
countOverlapsW()
,
disengagementScore()
,
distToCds()
,
distToTSS()
,
floss()
,
fpkm_calc()
,
fpkm()
,
fractionLength()
,
initiationScore()
,
insideOutsideORF()
,
isInFrame()
,
isOverlapping()
,
kozakSequenceScore()
,
orfScore()
,
rankOrder()
,
ribosomeReleaseScore()
,
ribosomeStallingScore()
,
startRegionCoverage()
,
startRegion()
,
stopRegion()
,
subsetCoverage()
,
translationalEff()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # a toy example with ribo-seq p-shifted reads
ORF <- GRanges("1", ranges = IRanges(start = c(1, 12, 22),
end = c(10, 20, 32)),
strand = "+",
names = rep("tx1_1", 3))
names(ORF) <- rep("tx1", 3)
grl <- GRangesList(tx1_1 = ORF)
reads <- GRanges("1", IRanges(c(25, 35), c(25, 35)), "+")
# grl must have same names as cds + _1 etc, so that they can be matched.
entropy(grl, reads)
# or on cds
cdsORF <- GRanges("1", IRanges(35, 44), "+", names = "tx1")
names(cdsORF) <- "tx1"
cds <- GRangesList(tx1 = cdsORF)
entropy(cds, reads)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.