【生物信息筆記】HOMER 找 DNA motif

What is HOMER?

HOMER is a software for motif discovery and ChIP-Seq analysis

HOMER軟件是Linux command line based,常用來查找DNA motif ,偶爾以及一些ChIP-seq的分析(如,peak calling)。

  • 其他的DNA motif 查找軟件如非常有名的在線tool: MEME
  • 其他的peak calling tool:Macs2 (更常用)

感興趣HOMER其它功能可以到它主頁去查找,下載與安裝的方法也可以在主頁里找到。

安裝使用如下:

## Download and install homer (Hypergeometric Optimization of Motif EnRichment)
## // http://homer.salk.edu/homer/
## // http://blog.qiubio.com:8080/archives/3024
## pre-install: Ghostscript,seqlogo,blat
cd ~/biosoft
mkdir homer && cd homer
wget http://homer.salk.edu/homer/configureHomer.pl
perl configureHomer.pl -install
perl configureHomer.pl -install hg19
perl configureHomer.pl -install hg38

如果是對MACS找到的peaks記錄文件,還需提取對應(yīng)的列給HOMER作為輸入文件:
awk '{print $4"\t"$1"\t"$2"\t"$3"\t+"}' sample_peaks.bed >sample_homer.bed 如果不熟悉 awk就只好手動(dòng)改。
findMotifsGenome.pl sample_homer.bed hg19 motifDir -len 8,10,12
最后得到的文件夾里面有一個(gè)詳細(xì)的網(wǎng)頁版報(bào)告,所以很多人都喜歡用這個(gè)軟件,而且HOMER 這個(gè)軟件是一個(gè)大雜燴,能解決幾乎所有的高通量測序數(shù)據(jù)的分析。

這里記下的只是DNA motif的查找使用方法:

  1. Gene/Promoter-based Analysis:
    findMotifs.pl
    performs motif and gene ontology analysis with lists of Gene Identifiers, both promoter and mRNA motifs (See Gene ID Analysis Tutorial)
    .pl 說明是HOMER里的perl的腳本。

    findGO.pl
    performs only gene ontology analysis with lists of Gene Identifiers (Called by findMotifs.pl, See Gene Ontology Analysis)
    這里是個(gè)findGO功能,不過我更常用的是enrichR 或者 DAVID。以上兩個(gè)腳本都是gene ID based的,只需要準(zhǔn)備個(gè)文本格式的gene list就也可以使用了。

  1. Next-Gen Sequencing/Genomic Position Analysis
    findMotifsGenome.pl
    performs motif analysis from genomic positions (See Finding Motifs from Peaks)
    這個(gè)是通過基因組里peak的位置來找DNA motif,比較常用,因?yàn)楦鶕?jù)測序方法不同,有些peak是在 non-coding promoter 或者 intergenic 等地方(也就是不只在coding gene promoter 的peak)。
    example:
$ cd /Users/ye.liu/Desktop/OA_analysis_06/9_patients_downstream_analysis/2.data_cpm2_p7/DNA_motif/Homer/1.complete_enhancer_promoter_sets/data
$ findMotifsGenome.pl 1.tss_gained_DAPs_gene_189.txt.bed  hg38 ./5.differential_output_size_400_1_to_3/ -bg 3.tss_lost_DAPs_gene_608.txt.bed -S 25 -len 8,10,12,13 -size 400
$ findMotifsGenome.pl 3.tss_lost_DAPs_gene_608.txt.bed  hg38 ./6.differential_output_size_400_3_to_1/ -bg $ 1.tss_gained_DAPs_gene_189.txt.bed -S 25 -len 8,10,12,13 -size 400 
$ findMotifsGenome.pl 2.tss_gained_DAPs_noncoding_91.txt.bed  hg38 ./7.differential_output_size_400_2_to_4/ -bg 4.tss_lost_DAPs_noncoding_509.txt.bed -S 25 -len 8,10,12,13 -size 400 
$ findMotifsGenome.pl 4.tss_lost_DAPs_noncoding_509.txt.bed  hg38 ./8.differential_output_size_400_4_to_2/ -bg 2.tss_gained_DAPs_noncoding_91.txt.bed -S 25 -len 8,10,12,13 -size 400  

這里是用的Differential ATAC-Peak (DAP)進(jìn)行的motif查詢,兩組測序樣品比較以后會(huì)得到gained DAPs和lost DAPs(樣品組/對照組)。在DAP annotation的時(shí)候會(huì)有peak在coding/noncoding gene promoter (TSS)附近(上下1kb以內(nèi))就稱它是gene associated with DAP=DAG,我用的是FANTOM CAT data set (2017 Nature) 進(jìn)行的annotation,因?yàn)槔锩娌坏采w了coding gene 信息還同時(shí)有 noncoding gene 的信息。Intergenic 的DAP在這里我沒有使用。所以我有四個(gè)bed file分別是:

gained lost
coding file1_189 file3_608
non-coding file2_91 file4_509

然后分別查找只在 gained DAG 里的 de novo DNA motif 和只在 lost DAG 里的 de novo DNA motif。關(guān)于background,我分別用對應(yīng)的bed file來做背景peaks。
所以,
file1 比 file3 得到了 file5: DNA motif 只在 gained coding DAP而不在 lost coding DAP里。(反之得到 file6)
file2 比 file4 得到了 file7: DNA motif 只在 gained non-coding DAP而不在 lost non-coding DAP里。 (反之得到 file8)
file1-4 是指的bed file 5-8是HOMER的output。


接下來想要想要比較的只有DAP gain 與 DAP lost,不包括coding 和 noncoding。
所以需要做的事情是把file1 與 file 2結(jié)合起來變成 DAP gain
file3 與 file 4 結(jié)合起來就是 DAP lost。
之前會(huì)用比較笨的方法,bed file的 .bed改名成 .txt,打開復(fù)制粘貼到excel然后合并,保存稱為.txt (用mac的要保存為windows的txt格式),再改名.bed,還會(huì)用到命令 changeNewLine.pl不然是個(gè)假的bed文件。
后來知道還有其他方法,linux command line:

$ cat 1.tss_gained_DAPs_gene_189.txt.bed  2.tss_gained_DAPs_noncoding_91.txt.bed > gained_DAP.bed

這么快嗎? rbind了?
檢查一下,看看file1 和file2 分別有多少行(row)

$ cat 1.tss_gained_DAPs_gene_189.txt.bed |wc -l
 188
$ cat 2.tss_gained_DAPs_noncoding_91.txt.bed |wc -l
  90

那么合并后的文件應(yīng)該就是188+90,這么多行了

$ cat gained_DAP.bed |wc -l
 278
#另一種方法
$ wc -l < gained_DAP.bed
 278

再不放心就檢查一下,在terminal里查看下bed file。
方法1: cat file 全部輸出
方法2: head -n 5 file or tail -n 6 file局部輸出

$ head -n 10 gained_DAP.bed 
chr10   110460031   110460730   ENSG00000273143.1       RP11-525A16.4
chr20   58622490    58623170    ENSG00000268941.1       MGC4294
chr5    174750778   174752030   ENSG00000266890.1       MIR4634
chr17   18985476    18985916    ENSG00000263045.1       RP11-28B23.1
chr16   1163540 1164037 ENSG00000259910.1       RP11-616M22.2
chr12   46524079    46525144    ENSG00000257496.1       RP11-474P2.4
chr9    129740242   129741064   ENSG00000255824.1       AL590369.1
chr11   132874516   132875011   ENSG00000255371.1       OPCML-IT2
chr8    27901080    27902479    ENSG00000253615.1       RP11-597M17.2
chr8    66176914    66178013    ENSG00000253138.1       LINC00967

接下來同樣辦法得到 lost_DAP.bed

$ cat 3.tss_lost_DAPs_gene_608.txt.bed 4.tss_lost_DAPs_noncoding_509.txt.bed > lost_DAP.bed
$ wc -l < lost_DAP.bed                       
    1017

準(zhǔn)備好了bed file后,開始進(jìn)行motif查找,

$ pwd
/Users/ye.liu/Desktop/OA_analysis_06/9_patients_downstream_analysis/2.data_cpm2_p7/DNA_motif/Homer/1.complete_enhancer_promoter_sets/data/test
$ findMotifsGenome.pl gained_DAP.bed hg38 ./Gained_DAP_specific_motif_size_400/ -bg lost_DAP.bed -S 25 -len 8,10,12,13 -size 400
$ findMotifsGenome.pl lost_DAP.bed hg38 ./Lost_DAP_specific_motif_size_400/ -bg gained_DAP.bed -S 25 -len 8,10,12,13 -size 400

每一個(gè)會(huì)用掉30-40min這樣。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 理解ChIP-Seq 到了目前這個(gè)水平,我學(xué)習(xí)新的高通量數(shù)據(jù)分析流程時(shí)已經(jīng)不再考慮代碼應(yīng)該如何寫的問題了。我更多要...
    xuzhougeng閱讀 67,838評論 11 154
  • 時(shí)光回不去 留下美好的青春回憶 你不已我在身邊 如何再華麗冒險(xiǎn) 留不住你 你要去遠(yuǎn)方 炙熱的心開始流浪 山高水險(xiǎn)路...
    若風(fēng)在野閱讀 124評論 0 0
  • 男人啊,你有億萬顆的精子,可是連一顆卵子都沒有,拽啥呢?!
    尤尤大小姐閱讀 269評論 0 0
  • 少年熱愛運(yùn)動(dòng), 是父母都沒有的特質(zhì)。 也許是耳濡目染對于身體的關(guān)注, 嘗到了鍛煉也是釋放活力, 制造快樂激素的源泉...
    千吉change閱讀 282評論 0 0

友情鏈接更多精彩內(nèi)容