Description Usage Arguments Details Value Examples
View source: R/general_plots.R
Given sequences, DNA or RNA. And some score, ribo-seq fpkm, TE etc. Create a heatmap divided per letter in seqs, by how strong the score is.
1 2 3 4 5 6 7 8 9 10 11 |
seqs |
the sequences (character vector, DNAStringSet) |
rate |
a scoring vector (equal size to seqs) |
start |
position in seqs to start at (first is 1), default 1. |
stop |
position in seqs to stop at (first is 1), default max(nchar(seqs)), that is the longest sequence length |
center |
position in seqs to center at (first is 1), center will be +1 in heatmap |
min.observations |
How many observations per position per letter to accept? numeric or quantile, default (">q1", bigger than quartile 1 (25 percentile)). You can do (10), to get all with more than 10 observations. |
skip.startCodon |
startCodon is defined as after centering (position 1, 2 and 3). Should they be skipped ? default (FALSE). Not relevant if you are not doing Translation initiation sites (TIS). |
xlab |
Region you are checking, default (TIS) |
type |
What type is the rate scoring ? default (ribo-seq) |
It will create blocks around the highest rate per position
a ggplot of the heatmap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
if (requireNamespace("BSgenome.Hsapiens.UCSC.hg19")) {
txdbFile <- system.file("extdata", "hg19_knownGene_sample.sqlite",
package = "GenomicFeatures")
#Extract sequences of Coding sequences.
cds <- loadRegion(txdbFile, "cds")
tx <- loadRegion(txdbFile, "mrna")
# Get region to check
kozakRegions <- startRegionString(cds, tx, BSgenome.Hsapiens.UCSC.hg19::Hsapiens
, upstream = 4, 5)
# Some toy ribo-seq fpkm scores on cds
set.seed(3)
fpkm <- sample(1:115, length(cds), replace = TRUE)
kozakHeatmap(kozakRegions, fpkm, 1, 9, skip.startCodon = F)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.