Manhattan plot in VisualBasic
A Manhattan plot is a type of scatter plot, usually used to display data with a large number of data-points - many of non-zero amplitude, and with a distribution of higher-magnitude values, for instance in genome-wide association studies (GWAS). In GWAS Manhattan plots, genomic coordinates are displayed along the X-axis, with the negative logarithm of the association P-value for each single nucleotide polymorphism (SNP) displayed on the Y-axis, meaning that each dot on the Manhattan plot signifies a SNP. Because the strongest associations have the smallest P-values (e.g., 10−15), their negative logarithms will be the greatest (e.g., 15).
It gains its name from the similarity of such a plot to the Manhattan skyline: a profile of skyscrapers towering above the lower level “buildings” which vary around a lower height.
- Gibson, Greg (2010). “Hints of hidden heritability in GWAS”. Nature Genetics. 42 (7): 558–560. doi:10.1038/ng0710-558. PMID 20581876.
First, peeks of the test data. By using
sampleTest.R script for generates the test data set.
df <- read.csv("./manhattan_plot_test.csv")
And then load data into memory by using code
Canvas drawing of the
Manhattan Plot is super easy by using just one function:
Canvas.Plot(System.Collections.Generic.IEnumerable(Of ManhattanPlot.SNP), Integer, Integer, System.Collections.Generic.Dictionary(Of String, String), System.Drawing.Size, Integer, Boolean, Boolean, Boolean, String, String) As System.Drawing.Bitmap
Dim image As Bitmap = data.Plot(colorPattern:="chr")
Dim image As Bitmap = data.Plot(colorPattern:="sampleName")
Dim image As Bitmap = data.Plot(colorPattern:="interval")