# dash_bioManhattanPlot Examples and Reference

see ManhattanPlot in action.

## ManhattanPlot

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

Threshold value
1 2 3 4 5 6 7 8 9

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(dashBio)
    library(data.table)

    app <- Dash$new()

    data = read.table("https://git.io/manhattan_data.csv",
                      header = TRUE, sep = ",")

    genMark <- function(n){
        l <- list(sprintf('%s', n))
        names(l) <- 'label'
        return(l)
    }

    genMarks <- function(min, max, by){
        s <- seq(from=min, to=max, by)
        l <- lapply(s, genMark)
        names(l) <- s
        return(l)
    }

    app$layout(htmlDiv(list(
        'Threshold Value',
        dccSlider(
            id = 'default-manhattanplot-input',
            min = 1,
            max = 10,
            step = 1,
            value = 6,
            marks = genMarks(1,10,1)
        ),
        htmlBr(),
        htmlDiv(
            dccGraph(
                id = 'default-manhattanplot',
                figure = dashbioManhattan(
                    dataframe = data
                )
            )
        )
    )))

    app$callback(
        output(id = "default-manhattanplot", property = "figure"),
        params = list(
            input(id = 'default-manhattanplot-input', property = 'value')
        ),
        update_manhattanplot <- function(threshold){
            return(
                dashbioManhattan(
                    dataframe = data,
                    genomewideline_value = threshold
                )
            )
        }
    )

## Customization

### Line Colors

Change the colors of the suggestive line and the genome-wide line.

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(dashBio)

    data = read.table("https://git.io/manhattan_data.csv",
                      header = TRUE, sep = ",")

    dccGraph(
        figure = dashbioManhattan(
            dataframe = data,
            suggestiveline_color = "#AA00AA",
            genomewideline_color = "#AA5500"
        )
    )

### Highlighted Points Color

Change the color of the points that are considered significant.

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(dashBio)

    data = read.table("https://git.io/manhattan_data.csv",
                      header = TRUE, sep = ",")

    dccGraph(
        figure = dashbioManhattan(
            dataframe = data,
            highlight_color = "#00FFAA"
        )
    )

`dash_bio.ManhattanPlot` 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/clustergram_brain_cancer.csv
- GWAS Catalog