Description Usage Arguments Details Value Examples
The PWM function from Biostrings without unit scaling
1 2 3 4 5 6 7 8 9 10 |
x |
the integer count matrix representing the motif, rows as nucleotides |
id |
a systematic ID given to this PWM, could include the source, version, etc |
name |
the name of the transcription factor (TF) to which the PWM corresponds to |
type |
the type of PWM calculation, either as log2-odds, or posterior probability (frequency matrix) |
prior.params |
the pseudocounts for each of the nucleotides |
pseudo.count |
the pseudo-count values if different from priors |
unit.scale |
if to unit.scale the pwm (default is no unit scaling) |
seq.count |
if x is a normalised PFM (i.e. with probabilities instead of sequence counts), then this sequence count
will be used to convert |
By default the Biostrings package scales the log-odds score so it is within 0 and 1. In this function we take a more traditional approach with no unit scaling and offer unit scaling as an additional parameter.
See ?PWM from Biostrings for more information on input arguments.
a new PWM object representing the PWM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | if(requireNamespace("PWMEnrich.Dmelanogaster.background")){
data(MotifDb.Dmel.PFM, package = "PWMEnrich.Dmelanogaster.background")
ttk = MotifDb.Dmel.PFM[["ttk"]]
# make a PWM with uniform background
PWMUnscaled(ttk, id="ttk-JASPAR", name="ttk")
# custom background
PWMUnscaled(ttk, id="ttk-JASPAR", name="ttk",
prior.params=c("A"= 0.2, "C" = 0.3, "G" = 0.3, "T" = 0.2))
# get background for drosophila (quick mode on a reduced dataset)
prior = getBackgroundFrequencies("dm3", quick=TRUE)
# convert using genomic background
PWMUnscaled(ttk, id="ttk-JASPAR", name="ttk", prior.params=prior)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.