天天看点

小果带你用homer进行motif富集分析

作者:云生信学生物信息学

尔云间 一个专门做科研的团队

原创 小果 生信果

小果带你用homer进行motif富集分析

Homer是干嘛的?

HOMER是一套基于 C++ 和 Perl 语言的用于 motif 查找和二代数据分析的工具,一般需要两个序列作为参数:

● 参考序列:hg19、mm10 等基因组序列、promoter 序列、自定义的 FASTA 序列

● 所要分析的序列:DNA 或 RNA 序列

HOMER 适用于在大规模数据中寻找 DNA 或 RNA 序列的 motif。

那什么是 motif 呢?

motif:反复出现的模式,即一种特征序列,比如 sequence motif, structure motif, network motif。它有或者可能有一定的生物学功能。

具体分析步骤

3.1 linux配置新环境

conda create -n work puthon=3.8

conda activate work

3.2 homer安装

conda install -c bioconda homer

##下载configureHomer.pl

wget http://homer.ucsd.edu/homer/configureHomer.pl

##使用configureHomer.pl配置Homer

perl configureHomer.pl -install

perl configureHomer.pl -install mm10

3.3 homer分析

3.3.1 Analyzing lists of genes with promoter motif analysis (findMotifs.pl)

############寻找基因列表启动子上的motif富集

findMotifs.pl 3v3135F15Q001gene.txt mouse /public/home/wjiang/zhan/work/homer/testdata -len 10

3.3.2 Analyzing genomic positions(findMotifsGenome.pl)

####输入为bed文件,主要是chip-seq数据通过macs2 callpeak产生narrowPeak文件,需要首先处理一下。

awk '{print $4"\t"$1"\t"$2"\t"$3"\t+"}' chirp_06ab_peaks.narrowPeak > chirp_06ab_homer.bed

for i in *_homer.bed;do j=${i%_homer.bed}; bsub -J macs2p -e %J.err -o %J.out -R span[hosts=1] -n 1 "findMotifsGenome.pl $i mm10 $j -len 8,10,12";done

3.3.3 Analyzing custom FASTA files (findMotifs.pl, homer2)

homers的说明文档:recommended that you have both target and background sequences, and in each case you should have several (preferably thousands) of sequences in each set that are roughly the same length。

需要目的和背景基因的序列,所以这个一般用的比较少一些。

3.3.4 Analyzing data for RNA motifs (findMotifs.pl/findMotifsGenome.pl)

####和寻找DNA序列的motif区别在于:使用 findMotifs.pl和 findMotifsGenome.pl时,要加上 “-rna”参数,从而只寻找RNA+链的motif,并且匹配/显示U而不是T。

#######注意!HOMER尚未包含“RNA motif”列表,所以不支持“已知motif”的分析。如果使用FASTA文件格式,请在输入文件中使用T(DNA编码)。

# 获取目标序列在人类mRNA上聚集的motif

findMotifs.pl genes.txt mouse MotifOutput/ -rna -len 8

# 分析CLIP-Seq for RNA motifs

findMotifsGenome.pl fox2.clip.bed hg17 MotifOutput -rna

3.3.5 Scanning for motif across the entire genome (scanMotifGenomeWide.pl)

scanMotifGenomeWide.pl pu1.motif mm9 -bed > pu1.sites.mm9.bed

########这个的话,其实用MEME数据库中的FIMO效果更好一些

小果带你用homer进行motif富集分析

生信人R语言学习必备

立刻拥有一个Rstudio账号

开启升级模式吧

(56线程,256G内存,个人存储1T)

小果带你用homer进行motif富集分析

“生信果”,生信入门、R语言、生信图解读与绘制、软件操作、代码复现、生信硬核知识技能、服务器、生物信息学的教程,以及基于R的分析和可视化等原创内容,一起见证小白和大佬的成长。

继续阅读