You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/notebooks/manhattan-plot-with-matplotlib.ipynb
+20-13Lines changed: 20 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,7 @@
4
4
"cell_type": "markdown",
5
5
"metadata": {},
6
6
"source": [
7
-
"## Manhattan Plot with Matplotlib"
8
-
]
9
-
},
10
-
{
11
-
"cell_type": "markdown",
12
-
"metadata": {},
13
-
"source": [
14
-
"**Manhattan plot** is a type of scatterplot which is mostly used in genome-wide association studies (GWAS). Each point represents a genetic variant. X axis value represents its position on the chromosome and the value on the y-axis represents the −log10 of the P value.\n",
7
+
"A [Manhattan plot](https://en.wikipedia.org/wiki/Manhattan_plot#:~:text=A%20Manhattan%20plot%20is%20a,GWAS)%20to%20display%20significant%20SNPs.) is a variation of a [scatterplot](https://www.python-graph-gallery.com/scatter-plot/). It is used in genome-wide association studies (GWAS). Each point represents a genetic variant. Its X axis value represents its position on the chromosome and the value on the y-axis represents the `−log10` of its P value.\n",
15
8
"\n",
16
9
"[Elad Joseph](https://stackoverflow.com/users/2807860/elad-joseph) suggested this nice solution on [stackoverflow](https://stackoverflow.com/questions/37463184/how-to-create-a-manhattan-plot-with-matplotlib-in-python) to build a manhattan plot with matplotlib and pandas:"
17
10
]
@@ -80,18 +73,32 @@
80
73
"# show the graph\n",
81
74
"plt.show()"
82
75
]
76
+
},
77
+
{
78
+
"source": [
79
+
"Et voila! A nice Manhattan plot allowing to check for phenotype - genotype associations!"
80
+
],
81
+
"cell_type": "markdown",
82
+
"metadata": {}
83
+
},
84
+
{
85
+
"source": [
86
+
"> Note: if you're willing to build a manhattan plot with R, [this blogpost](https://www.r-graph-gallery.com/101_Manhattan_plot.html) should interest you"
87
+
],
88
+
"cell_type": "markdown",
89
+
"metadata": {}
83
90
}
84
91
],
85
92
"metadata": {
86
93
"chartType": "scatter",
87
-
"description": "This post explains how to build a <b>manhattan plot</b> in python and provides a reproducible code.",
94
+
"description": "This post explains how to build a <b>manhattan plot</b> using <code>python</code> and <code>matplotlib</code>. A manhattan plot is commonly used by geneticians for genome-wide association study.",
0 commit comments