entropy {ORFik}R Documentation

Calucalte entropy value of overlapping input reads.

Description

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.

Usage

entropy(grl, reads)

Arguments

grl

a GRangesList that the reads will be overlapped with

reads

a GAlignment object or GRanges or GRangesList, usualy data from RiboSeq or RnaSeq

Value

A numeric vector containing one entropy value per element in 'grl'

See Also

Other features: computeFeaturesCage, computeFeatures, disengagementScore, distToCds, distToTSS, floss, fpkm_calc, fpkm, fractionLength, initiationScore, insideOutsideORF, isInFrame, isOverlapping, kozakSequenceScore, orfScore, rankOrder, ribosomeReleaseScore, ribosomeStallingScore, subsetCoverage, translationalEff

Examples

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)
RFP <- 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, RFP)
# or on cds
cdsORF <- GRanges("1", IRanges(35, 44), "+", names = "tx1")
names(cdsORF) <- "tx1"
cds <-  GRangesList(tx1 = cdsORF)
entropy(cds, RFP)


[Package ORFik version 1.2.1 Index]