論文
Microbiome differential abundance methods produce different results across 38 datasets
數(shù)據(jù)鏈接
https://figshare.com/articles/dataset/16S_rRNA_Microbiome_Datasets/14531724
代碼鏈接
https://github.com/nearinj/Comparison_of_DA_microbiome_methods
這個(gè)人的github主頁(yè)還有其他論文的數(shù)據(jù)和代碼
https://github.com/jnmacdonald/differential-abundance-analysis 這個(gè)鏈接有很多關(guān)于差異豐度分析的代碼
今天的推文我們重復(fù)一下論文中的Figure1b
首先是讀取數(shù)據(jù)集
熱圖數(shù)據(jù)集
order_raw_count_df<-read.csv(file = "20220424/Figure1_filt_sig_counts.csv",
row.names = 1,
check.names = FALSE)
order_raw_count_df
他這里的處理方式是把數(shù)據(jù)集標(biāo)準(zhǔn)化以后映射顏色,然后添加數(shù)字標(biāo)簽展示真實(shí)的數(shù)據(jù)
熱圖數(shù)據(jù)標(biāo)準(zhǔn)化
Alpha_order_filt<-scale(order_raw_count_df,
center = TRUE,
scale = TRUE)
讀取注釋數(shù)據(jù)
fixed_hackathon_metadata_filt<-read.csv(file = "20220424/Figure1_filt_dataset_char.csv",
row.names = 1,
check.names = FALSE)
fixed_hackathon_metadata_filt
作圖代碼
library(pheatmap)
pheatmap(t(Alpha_order_filt),
clustering_method = "complete",
legend=TRUE,
display_numbers=t(order_raw_count_df),
annotation_row=fixed_hackathon_metadata_filt[, c("log(Sample size)", "log(Aitch. dist. effect size)",
"Sparsity", "Richness", "Read depth variation",
"log(Read depth range)"), drop=FALSE],
annotation_legend=FALSE,
legend_labels = "% sig. features",
treeheight_col = 0,
cluster_cols = FALSE,
cluster_rows = TRUE,
main="Filtered",
angle_col=315)
今天推文的示例數(shù)據(jù)和代碼可以在公眾號(hào)后臺(tái)回復(fù)
20220424
獲取
歡迎大家關(guān)注我的公眾號(hào)
小明的數(shù)據(jù)分析筆記本
小明的數(shù)據(jù)分析筆記本 公眾號(hào) 主要分享:1践盼、R語(yǔ)言和python做數(shù)據(jù)分析和數(shù)據(jù)可視化的簡(jiǎn)單小例子步藕;2谱轨、園藝植物相關(guān)轉(zhuǎn)錄組學(xué)、基因組學(xué)孽拷、群體遺傳學(xué)文獻(xiàn)閱讀筆記偎球;3瞳秽、生物信息學(xué)入門學(xué)習(xí)資料及自己的學(xué)習(xí)筆記联予!