diffAnaVolcanoplot_rCharts {DAPAR} | R Documentation

## Volcanoplot of the differential analysis

### Description

Plots an interactive volcanoplot after the differential analysis. Typically, the log of Fold Change is represented on the X-axis and the log10 of the p-value is drawn on the Y-axis. When the `threshold_pVal` and the `threshold_logFC` are set, two lines are drawn respectively on the y-axis and the X-axis to visually distinguish between differential and non differential data. With the use of the package Highcharter, a customizable tooltip appears when the user put the mouse's pointer over a point of the scatter plot.

### Usage

    diffAnaVolcanoplot_rCharts(df, threshold_pVal = 1e-60, threshold_logFC = 0,
      conditions = NULL, clickFunction = NULL)

### Arguments

`df` | A dataframe which contains the following slots : x : a vector of the log(fold change) values of the differential analysis, y : a vector of the p-value values returned by the differential analysis. index : a vector of the rowanmes of the data. This dataframe must has been built with the option stringsAsFactors set to FALSE. There may be additional slots which will be used to show informations in the tooltip. The name of these slots must begin with the prefix "tooltip_". It will be automatically removed in the plot.
`threshold_pVal` | A floating number which represents the p-value that separates differential and non-differential data.
`threshold_logFC` | A floating number which represents the log of the Fold Change that separates differential and non-differential data.
`conditions` | A list of the names of condition 1 and 2 used for the differential analysis.
`clickFunction` | A string that contains a JavaScript function used to show info from slots in df. The variable this.index refers to the slot named index and allows to retrieve the right row to show in the tooltip

### Value

An interactive volcanoplot

### Author(s)

Samuel Wieczorek

### Examples

    library(highcharter)
    library(tidyverse)
    require(DAPARdata)
    data(Exp1_R25_pept)
    obj <- Exp1_R25_pept[1:1000]
    keepThat <- mvFilterGetIndices(obj, 'wholeMatrix', ncol(obj))
    obj <- mvFilterFromIndices(obj, keepThat)
    qData <- Biobase::exprs(obj)
    sTab <- Biobase::pData(obj)
    data <- limmaCompleteTest(qData,sTab)
    df <- data.frame(x=data$FC, y = -log10(data$P_Value),index = as.character(rownames(obj)))
    colnames(df) <- c("x", "y", "index")
    tooltipSlot <- c("Sequence", "Score")
    df <- cbind(df,Biobase::fData(obj)[tooltipSlot])
    colnames(df) <- gsub(".", "_", colnames(df), fixed=TRUE)
    if (ncol(df) > 3){
        colnames(df)[4:ncol(df)] <-
        paste("tooltip_", colnames(df)[4:ncol(df)], sep="")}
    hc_clickFunction <- JS("function(event) {
    Shiny.onInputChange('eventPointClicked', [this.index]);}")
    cond <- c("25fmol", "10fmol")
    diffAnaVolcanoplot_rCharts(df, 2.5, 1, cond,hc_clickFunction)

[Package DAPAR version 1.12.11 Index]