View source: R/feature_helpers.R
codonSumsPerGroup | R Documentation |
Helper for entropy function, normally not used directly Seperate each group into tuples (abstract codons) Gives sum for each tuple within each group
codonSumsPerGroup(grl, reads, weight = "score", is.sorted = FALSE)
grl |
a |
reads |
a |
weight |
(default: 'score'), if defined a character name of valid meta column in subject. GRanges("chr1", 1, "+", score = 5), would mean score column tells that this alignment region was found 5 times. Formats which loads a score column like this: Bigwig, wig, ORFik ofst, collapsed bam, bedoc and .bedo. As do CAGEr CAGE files and many other package formats. You can also assign a score column manually. |
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) |
Example: counts c(1,0,0,1), with reg_len = 2, gives c(1,0) and c(0,1), these are summed and returned as data.table 10 bases, will give 3 codons, 1 base codons does not exist.
a data.table with codon sums
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.