get_codon_occs | R Documentation |
Uses sampled RPF coverage gr object, offsets data frame, and an annotation object to get estimates of per-codon occupancy (which are proportional to dwell times)
get_codon_occs(
psites,
offsets_df,
anno,
n_genes = 1000,
covthresh = 10,
method = "linear"
)
psites |
|
offsets_df |
|
anno |
|
n_genes |
|
covthresh |
|
method |
|
a data frame with columns codon,position,estimate,upper,lower, p.value
Dermot Harnett, dermot.p.harnett@gmail.com
data(chr22_anno)
data(rpfs)
data(offsets_df)
fafile <- here::here('chr22.fa')
library(BSgenome.Hsapiens.UCSC.hg38)
if(!file.exists(fafile)){
seq <- Biostrings::DNAStringSet(BSgenome.Hsapiens.UCSC.hg38[['chr22']])
names(seq) <- 'chr22'
Biostrings::writeXStringSet(
seq, fafile)}
Rsamtools::indexFa(fafile)
psites <- get_psite_gr(rpfs, offsets_df, chr22_anno)
rust_codon_occ_df <- get_codon_occs(psites, offsets_df, chr22_anno,
n_genes = 200, method = "RUST"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.