美文网首页
Y叔的书 笔记记录

Y叔的书 笔记记录

作者: 煎饼果子再来一套 | 来源:发表于2019-12-16 11:04 被阅读0次

Y叔的书 - 笔记

chapter 3 - universal enrichment analysis

input data

for gene set enrichment analysis - a ranked list of genes

note : no duplicated gene ID allowed

example

# 使用‘DOSE’包中的示例数据
data(geneList, package="DOSE")
head(geneList)

#设定fold change 大于2倍的为差异表达基因
gene <- names(geneList)[abs(geneList) > 2]
head(gene)

wikipathways analysis

​ a continuously updated pathway database by a community of researchers

monthly releases of gmt files

Download the appropriate gmt file & generate TERM2GENE & TERM2NAME to use enricher & GSEA functions

library(magrittr)
suppressPackageStartupMessages(library(clusterProfiler))

data(geneList, package="DOSE")
str(geneList)
gene <- names(geneList)[abs(geneList) > 2]
head(gene)

wpgmtfile <- system.file("extdata/wikipathways-20180810-gmt-Homo_sapiens.gmt", package="clusterProfiler")
wp2gene <- read.gmt(wpgmtfile)
wp2gene <- wp2gene %>% tidyr::separate(ont, c("name","version","wpid","org"), "%")
wpid2gene <- wp2gene %>% dplyr::select(wpid, gene) #TERM2GENE
wpid2name <- wp2gene %>% dplyr::select(wpid, name) #TERM2NAME
# 真得学好tidyr / dplyr这几个包

ewp <- enricher(gene, TERM2GENE = wpid2gene, TERM2NAME = wpid2name) 
head(ewp)

also, you can install the rWikiPathways package to manually download gmt file

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("rWikiPathways")
# use downloadPathwayArchive function to download the latest gmt files

cell marker

cell_markers <- vroom::vroom('http://bio-bigdata.hrbmu.edu.cn/CellMarker/download/Human_cell_markers.txt') %>%
  tidyr::unite("cellMarker", tissueType, cancerType, cellName, sep=", ") %>% 
  dplyr::select(cellMarker, geneID) %>%
  dplyr::mutate(geneID = strsplit(geneID, ', '))
cell_markers

y <- enricher(gene, TERM2GENE=cell_markers, minGSSize=1)
DT::datatable(as.data.frame(y))

MSigDb analysis

​ Molecular Signatures Database - 8 major collections

download gmt files from Broad Institute

H: hallmark gene sets

C1: positional gene sets

C2: curated gene sets

C3: motif gene sets

C4: computational gene sets

C5: GO gene sets

C6: oncogenic signatures

C7: immunologic signatures

package msigdbr - recommend by uncle Y

library(msigdbr)
msigdbr_show_species()

# retrieve all human gene sets
m_df <- msigdbr(species = "Homo sapiens")
head(m_df, 2) %>% as.data.frame

# or specific collection
m_t2g <- msigdbr(species = "Homo sapiens", category = "C6") %>% 
  dplyr::select(gs_name, entrez_gene)
head(m_t2g)

question:

​ as mentioned by uncle Y:

​ "using C3 to test whether the genes are up/down-regulated by sharing specific motif"

​ background knowledge - C3

相关文章

  • Y叔的书 笔记记录

    Y叔的书 - 笔记 chapter 3 - universal enrichment analysis input...

  • 眼馋Y叔的可视化函数却还想使用DAVID结果肿么办

    昨天宣传了Y叔的clusterProfiler包之让人眼花缭乱的可视化炫技,见:为R包写一本书(向Y叔致敬) 。有...

  • R语言与医学统计学

    统计学笔记参考:孙振球 徐勇勇. 医学统计学【第四版】.Y叔统计学笔记也很给力。

  • 学员分享-Chip-seq 实战分析流程

    Chip-seq 实战分析流程 本次实践是根据Jimmy 和洲更两位大神的笔记,还有Y叔的Chipseeker包,...

  • 记录读书日记

    记录每日读书进度与心得。 记录方式:《某书》X~Y章节,读后感

  • ClusterProfiler做GO、KEGG富集(一)

    今天新学会了clusterprofiler,把学习过程记录下来。Clusterprofiler是Y叔开发的一个R包...

  • YS

    Y叔是我的资助人。 从大一一直支持到我大四。 之所以现在还和Y叔一家保持密切的联系,是因为Y叔一家始终给我以真诚的...

  • R语言:yyplot画emoji和动物轮廓

    导读 这里记录两个Y叔的绘图方法。可以画emoji的R包emojifont,可以画轮廓的ggimage geom_...

  • Y叔要求职

    余光创香港大学 生物信息学 博士,目前在港大从事博士后工作求职意向:副教授以上地点:主要意向是广州和深圳 简历:h...

  • 小芳画画|乡村小屋

    用画笔记录下来三叔家的小屋子!三叔最为村里唯一的医生,几乎照看着所有村里的老老小小!

网友评论

      本文标题:Y叔的书 笔记记录

      本文链接:https://www.haomeiwen.com/subject/vebrnctx.html