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
Bar plot的使用上滿普遍的,本篇沒什麼其特點,用任何工具甚至是excel都可以達成,因人喜好而已。但就自己的經驗其實Bar plot是一個最為直觀的圖,讓人能夠一眼清楚的知道想要表達的數量,有時候會比各種花俏的圖來的更簡單有力的說服讀者。最近正好需要處理到Mutation Gene的profile,通常以binary的形式去紀錄gene的突變狀況,需要粗略的統計到有多少手邊的樣本產生突變,因此以一個表格統計gene以及mutation人數的話會像下面這張表:
In genetic profiling, we use clustergram to present the gene expression frequently.
Besides gene expression value, the distance between samples and genes were also concerned.
So, here I list few common packages in our lab to analyze gene(gene set) expression values.
Following packages were recommended, and few of them were shown in examples.
pheatmap : R-package
heatmap.2: R-package # Lastest version of heatmap.3
ggplot2 : R-package # Base package
seaborn : Python module
Example data set were genetic profiling with 31 genes and 600 samples approximately.
importseabornassbimportpandasaspdimportmatplotlib.pyplotasplt# Please import your data as pandas dataframe first.# The default clustering parameters in R were (complete and euclidean)fig=sb.clustermap(data,standard_scale=0,method='complete', metric='euclidean')
plt.setp(fig.ax_heatmap.get_yticklabels(), rotation=0)
plt.setp(fig.ax_heatmap.set_xticklabels([])) # X labels ommitedfig.savefig("heatmap_result.png")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters