久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

更新:?jiǎn)渭?xì)胞基因熱圖多重注釋函數(shù)-可標(biāo)記基因及添加富集分析結(jié)果

 TS的美夢(mèng) 2025-01-22
大家都打烊了嗎,?,??

在寫NMF帖子的時(shí)候,,需要plot基因熱圖,,然后想到了我們之前的函數(shù)(高分SCI單細(xì)胞圖表:多層注釋熱圖函數(shù))。然后對(duì)其功能進(jìn)行了增強(qiáng),,當(dāng)然了,,還是那句話,框架我們提供了,,你需要做其他任何個(gè)性化或者增添功能,,直接修改即可,,一個(gè)函數(shù)也不可能完成所有事。更新的內(nèi)容主要在于,,可以標(biāo)記需要的基因,,避免了基因過(guò)多的問(wèn)題。第二個(gè)是可以添加文字注釋,,及每種celltype添加富集注釋結(jié)果,。

使用解說(shuō)視頻見(jiàn)B站:
https://www.bilibili.com/video/BV1wuwbe7EfX/?spm_id_from=333.1387.homepage.video_card.click

函數(shù)參數(shù)如下:增加的參數(shù)首先第一個(gè)rownames_anno,傳入一個(gè)向量,,是需要標(biāo)記的基因,,如果基因過(guò)多的時(shí)候,不適宜全部展示,,show_row_names選擇F,。第二個(gè)就是anno_enrich,默認(rèn)F,,如果需要添加富集結(jié)果的注釋,,選擇T,需要注意,,函數(shù)并未提供富集,,富集結(jié)果需要手動(dòng)展示。對(duì)應(yīng)的注釋傳入enrich_terms,,是一個(gè)list,,此外,添加富集注釋,,一定要設(shè)置cluster_order,,而且cluster_gene_length要與cluster_order一致。

具體看看效果:
library(Seurat)library(ComplexHeatmap)library(dplyr)library(circlize)library(rlang)library(grDevices)source('./ks_single_gene_heatmap.R')Epi_cells$cluster <- as.character(Epi_cells$cluster)
#heatmappdf('./nmf_heat1.pdf', height = 8,width = 8)ks_single_gene_heatmap(object=Epi_cells,assay = 'RNA', genes = cluster_gene$gene, bar = c("cluster"), show_rownames = F, heat_cols = colorRampPalette(c('#FFF7F3', '#FDE0DD', '#FCC5C0', '#FA9FB5', '#F768A1', '#DD3497', '#AE017E', '#7A0177', '#49006A'))(100), rownames_anno = c("NME2","GLIS3","DNAI1","PTPRC", "GABARAP","PARD3","CDHR3","SRGN", "PRDX2","MECOM","CFAP299","FYN", "HINT1","CFAP157","CCL5"))dev.off()

#標(biāo)注富集結(jié)果text2 = list("1"=c("labyrinthine layer morphogenesis",                   "neural tube closure",                   "epithelial tube morphogenesis"),             "2" =c("positive regulation of cell adhesion",                    "Cell adhesion molecules",                    "Inflammatory response pathway"),             "3"=c("Signaling by MET",                   "PI3K-Akt signaling pathway"),             "4"=c("cellular response to abiotic stimulus",                   "cellular response to environmental stimulus"))
pdf('./nmf_heat2.pdf', height = 8,width = 12)ks_single_gene_heatmap(object=Epi_cells,assay = 'RNA', genes = cluster_gene$gene, bar = c("cluster"), show_rownames = F, rownames_anno = c("NME2","GLIS3","DNAI1","PTPRC", "GABARAP","PARD3","CDHR3","SRGN", "PRDX2","MECOM","CFAP299","FYN", "HINT1","CFAP157","CCL5"), heat_cols = colorRampPalette(c('#FFF7F3', '#FDE0DD', '#FCC5C0', '#FA9FB5', '#F768A1', '#DD3497', '#AE017E', '#7A0177', '#49006A'))(100), anno_enrich=T,cluster_gene_length=c(50,50,50,50), enrich_terms = text2,cluster_order = c("1","2","3","4"))
dev.off()

    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多