# dash_bioVolcanoPlot Examples and Reference

See VolcanoPlot in action.

## VolcanoPlot

An example of a default VolcanoPlot component without any extra properties.

Effect sizes
-3-2-1 0 1 2

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

    library(dash)
    library(dashBio)
    library(dashHtmlComponents)
    library(dashCoreComponents)

    app <- Dash$new()

    df <- read.csv(
      file ='https://git.io/volcano_data1.csv',
      stringsAsFactors = FALSE
    )

    app$layout(
        htmlDiv(
            list(
                'Effect sizes',
                dccRangeSlider(
                    id = 'default-volcanoplot-input',
                    min = -3,
                    max = 3,
                    step = 0.05,
                    marks = setNames(
                        lapply(-3:3,
                            function(i){
                                list(label = as.character(i))
                            }),
                            -3:3
                    ),
                    value = c(-0.5, 1)
                ),
                htmlBr(),
                htmlDiv(
                    dccGraph(
                        id = 'dashbio-default-volcanoplot',
                        figure = dashbioVolcano(
                            dataframe = df
                        )
                    )
                )
            )
        )
    )
    app$callback(
        output = list(id = 'dashbio-default-volcanoplot', property = 'figure'),
        params = list(input(id = 'default-volcanoplot-input', property = 'value')),
        function(effects) {
            dashbioVolcano(
                dataframe = df,
                genomewideline_value = 2.5,
                effect_size_line = unlist(effects)
            )
        }
    )

    app$run_server()

## Customization

### Colors

Choose the colors of the scatter plot points, the highlighted points, the genome-wide line, and the effect size lines.

> This example has not been ported to R yet - showing the Python version instead.

> Visit the old docs site for R at: https://community.plotly.com/c/dash/r/21

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

    import pandas as pd
    from dash import dcc
    import dash_bio as dashbio

    df = pd.read_csv('https://git.io/volcano_data1.csv')

    volcanoplot = dashbio.VolcanoPlot(
        dataframe=df,
        effect_size_line_color='#AB63FA',
        genomewideline_color='#EF553B',
        highlight_color='#119DFF',
        col='#2A3F5F'
    )

    dcc.Graph(figure=volcanoplot)

### Point Sizes And Line Widths

Change the size of the points on the scatter plot, and the widths of the effect lines and genome-wide line.

> This example has not been ported to R yet - showing the Python version instead.

> Visit the old docs site for R at: https://community.plotly.com/c/dash/r/21

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

WebGL is not supported by your browser - visit https://get.webgl.org for more info

    import pandas as pd
    from dash import dcc
    import dash_bio as dashbio

    df = pd.read_csv('https://git.io/volcano_data1.csv')

    volcanoplot = dashbio.VolcanoPlot(
        dataframe=df,
        point_size=10,
        effect_size_line_width=4,
        genomewideline_width=2
    )

    dcc.Graph(figure=volcanoplot)

`dash_bio.VolcanoPlot` is a Python-based component, and may not be available in other languages.

## Example Data

- https://github.com/plotly/datasets/blob/master/Dash_Bio/Chromosomal/volcano_data1.csv
- Differential gene expression analysis for microbiome skin treatment
- Differentially expressed genes between animals resistant and susceptible to amoebic gill disease in Atlantic salmon
- Stratified gene expression analysis comparing estrogen-receptor-positive (ER+) premenopausal (preM) and Normal groups in The Cancer Genome Atlas (TCGA)
- Identification of potential biomarkers to differentially diagnose solid pseudopapillary tumors and pancreatic malignancies via a gene regulatory network