regionPerReadLength {ORFik} | R Documentation |
This is defined as: Given some transcript region (like CDS), get coverage per position.
regionPerReadLength( grl, reads, acceptedLengths = NULL, withFrames = TRUE, scoring = "transcriptNormalized", weight = "score", BPPARAM = bpparam() )
grl |
a |
reads |
a |
acceptedLengths |
an integer vector (NULL), the read lengths accepted. Default NULL, means all lengths accepted. |
withFrames |
logical TRUE, add ORF frame (frame 0, 1, 2), starting on first position of every grl. |
scoring |
a character (transcriptNormalized), which meta coverage scoring ? one of (zscore, transcriptNormalized, mean, median, sum, sumLength, fracPos), see ?coverageScorings for more info. Use to decide a scoring of hits per position for metacoverage etc. Set to NULL if you do not want meta coverage, but instead want per gene per position raw counts. |
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. ORFik .bedo files, contains a score column like this. As do CAGEr CAGE files and many other package formats. You can also assign a score column manually. |
BPPARAM |
how many cores/threads to use? default: bpparam() |
a data.table with lengths by coverage.
Other coverage:
coverageScorings()
,
metaWindow()
,
scaledWindowPositions()
,
windowPerReadLength()
# Raw counts per gene per position cds <- GRangesList(tx1 = GRanges("1", 100:129, "+")) reads <- GRanges("1", seq(79,129, 3), "+") reads$size <- 28 # <- Set read length of reads regionPerReadLength(cds, reads, scoring = NULL) ## Sum up reads in each frame per read length per gene regionPerReadLength(cds, reads, scoring = "frameSumPerLG")