predict_pmol | R Documentation |
FIXME: this could be made MUCH faster by precomputing CpG/GC stats per bin
predict_pmol( fit, genomic_gr, bsgenome = NULL, ret = c("gr", "df"), slide = FALSE )
fit |
result of model_glm_pmol |
genomic_gr |
the genomic data / new data |
bsgenome |
BSgenome name (if null, will guess from genomic_gr) |
ret |
return a data.frame ("df") or GRanges ("gr")? ("gr") |
slide |
compute a sliding window estimate for GCfrac (1/3 width)? |
Using GRanges as the return value is (perhaps counterintuitively) much faster than the data.frame, since the sequence of the bins gets converted from a BSgenome representation to characters in the latter (it is implied by the bin start, stop, and genome when left as a GRanges).
object with read count, fraglen, GC%, CpG**(1/3), and concentration
data(spike_res) data(genomic_res) data(spike, package="spiky") fit <- model_glm_pmol(covg_to_df(spike_res, spike=spike),spike=spike) preddf <- predict_pmol(fit, genomic_res, ret="df") pred <- predict_pmol(fit, genomic_res, ret="gr") bin_pmol(pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.