DrawLogoPosNegAxes | R Documentation |
Return a plot describing the sequence motif associated to the sequences provided. Two panels are plotted: if cYunit option is used with "ic_hide_bg", data from the lower panel should correspond to the depleted signal by comparison with upper panel that should described the enriched signal.
DrawLogoPosNegAxes( pwmUp, pwmDown, nGenomicBgACGT = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25), cYunit = "ic_hide_bg", lPlotNegYAxis = TRUE, cColorsACGT = c(A = "#4daf4a", C = "#377eb8", G = "#ffd92f", T = "#e41a1c"), nPositionsToAnnotate = NULL, cAnnotationText = NULL, nTagTextFontSize = 20, lXAxis = TRUE, lYAxis = TRUE, nXFontSize = 15, nYFontSize = 15 )
pwmUp |
A seqLogo PWM (position weight matrix) object to be used for the upper panel. |
pwmDown |
A seqLogo PWM (position weight matrix) object to be used for the lower panel. Should correspond to the depleted signal (by comparison to the data provided with the pwmUp option). |
nGenomicBgACGT |
A numeric vector giving the background to be corrected with the genomic composition in Adenine (A) then Cytosine (C) then Guanine (G) then Thymine (T). Defaults to c(A=0.25, C=0.25, G=0.25, T=0.25). |
cYunit |
Units to be used for the y axis. Can be "ic" (information content), "ic_hide_bg" (information content + hide low signal) or "prob" (probability). "ic_hide_bg" will hide the letters on the upper panel (OR the lower panel) if these letters have probabilities above (OR below) the background signal based on the genomic composition. Defaults to "ic_hide_bg". |
lPlotNegYAxis |
If TRUE, allow plotting the lower panel to show depletion among the sequences provided. Defaults to TRUE. |
cColorsACGT |
A character vector giving the color for the Adenine (A) then Cytosine (C) then Guanine (G) then Thymine (T) letters on the plot. Defaults to c(A="red2", C="blue2", G="orange2", T="green3"). |
nPositionsToAnnotate |
A numeric vector giving the positions to highlight on the logo using small triangular tags (e.g. DNA modifications on a fixed position). Defaults to NULL. |
cAnnotationText |
A character vector. If nPositionsToAnnotate is not NULL, this option can provide labels to be associated to each annotation tag. If the vector's length is 1, it will be used for all tags to be displayed. Defaults to NULL. |
nTagTextFontSize |
Font size for the text associated to the annotation tags. Defaults to 20. |
lXAxis |
If TRUE, the x-axis is plotted. Defaults to TRUE. |
lYAxis |
If TRUE, the y-axis is plotted. Defaults to TRUE. |
nXFontSize |
Font size for the text associated to the x axis. Defaults to 15. |
nYFontSize |
Font size for the text associated to the y axis. Defaults to 15. |
It is also possible to tag some positions (+/- labels) in the logo.
pwm1 <- matrix(c( 0.25, 0.25, 0.25, 0.25, 0.8, 0.05, 0.05, 0.1, 0.33, 0.33, 0.33, 0.01 ), nrow = 4, byrow = FALSE) row.names(pwm1) <- c("A", "C", "G", "T") pwm2 <- t(t(1 / pwm1) / colSums((1 / pwm1))) pwm1 <- seqLogo::makePWM(pwm1) pwm2 <- seqLogo::makePWM(pwm2) DrawLogoPosNegAxes( pwmUp = pwm1, pwmDown = pwm2, nPositionsToAnnotate = c(1, 3), cAnnotationText = c("Text?", "Depletion of T") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.