View source: R/foldChangeArrow2.R
foldChangeArrow2 | R Documentation |
NOTE : This function is deprecated, please use foldChangeArrow
instead !!
This function was made for adding an arrow indicating a fold-change to MA- or Volcano-plots.
When comparing mutiple concentratios of standards in benchmark-tests it may be useful to indicate the expected ratio in a pair-wise comparison.
In case of main input as list or MArrayLM-object (as generated from limma), the colum-names of multiple pairwise comparisons can be used
for extracting a numeric content (supposed as concentrations in sample-names) which will be used to determine the expected ratio used for plotting.
Optionally the ratio used for plotting can be returned as numeric value.
foldChangeArrow2(
FC,
useComp = 1,
isLin = TRUE,
asX = TRUE,
col = 1,
arr = c(0.005, 0.15),
lwd = NULL,
addText = c(line = -0.9, cex = 0.7, txt = "expected", loc = "toright"),
returnRatio = FALSE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
FC |
(numeric, list or MArrayLM-object) main information for drawing arrow : either numeric value for fold-change/log2-ratio of object to search for colnames of statistical testing for extracting numeric part |
useComp |
(integer) only used in case FC is list or MArrayLM-object an has multiple pairwise-comparisons |
isLin |
(logical) inidicate if |
asX |
(logical) indicate if arrow should be on x-axis |
col |
(integer or character) custom color |
arr |
(numeric, length=2) start- and end-points of arrow (as relative to entire plot) |
lwd |
(numeric) line-width of arrow |
addText |
(logical or named vector) indicate if text explaining arrow should be displayed, use |
returnRatio |
(logical) return ratio |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of message(s) produced |
The argument addText
also allows specifying a fixed position when using addText=c(loc="bottomleft")
, also bottomright, topleft, topright, toleft and toright may be used.
In this case the elemts side
and adjust
will be redefined to accomodate the text in the corner specified.
Ultimately this function will be integated to the package wrGraph.
plots arrow only (and explicative text), if returnRatio=TRUE
also returns numeric value for extracted ratio
new version : foldChangeArrow
; used with MAplotW
, VolcanoPlotW
plot(rnorm(20,1.5,0.1),1:20)
#deprecated# foldChangeArrow2(FC=1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.