findMotifsGenome.pl: 在基因組區域中尋找富集Motifs
HOMER 最初設計的目的用於ChIP-Seq peaks 中尋找富集motifs 。
命令
findMotifsGenome.pl <peak/BED file> <genome> <output directory> -size # [options]
1. 設定尋找motif 的區域大小 (-size # or -size given, default: 200)
如果想在提供的peak中尋找motifs,使用參數-size given。然而,對於轉錄因子peaks,大多數motifs 被發現位於peak 中心 +/- 50-75 bp的範圍內,所以最好根據peak 的大小將尋找motif的區域設為固定值。2. 輸入文件格式
格式:HOMER peak/Positions 文件和BED 格式文件HOMER peak文件有至少5列:
BED 格式文件至少有6列:
Peak/Position 和 BED兩種格式之間可以相互轉換,使用Homer自帶腳本:pos2bed.pl 或bed2pos.pl
3. 自定義背景
因為HOMER 使用一個不同的motif 尋找算法,因此使用不同的背景會產生不同的結果。例如,如果將某種實驗的peak與另一種實驗peak相比較,可以再創建一個peak/BED文件(參數:"-bg <peak/BED file>"),將會對背景進行移除GC-bias操作和自動標準化。4. findMotifsGenome.pl工作流程
4.1 確認peak/BED 文件
4.2 根據peak/BED 文件提取序列,過濾掉序列中N >70%的序列。
4.3 計算peak 對應序列GC/CpG含量
4.4 根據設定的大小準備背景序列
用於尋找motif 區域大小使用("-size <#>")設置。HOMER 一般選取基因TSS +/- 50kb區域分成設定大小;然後計算這些背景序列GC/CpG% 儲存起來用於後續分析。4.5 隨機選擇背景區域用於尋找motif
因為HOMER 使用一個不同的motif 尋找算法,它需要使用背景序列區域作為對照。默認情況下,HOMER 可能選擇50000 或 peaks總數兩倍的隨機背景序列,可以使用參數-N <#>自定義。HOMER 會選擇和目標數據一致GC 含量分布的序列作為背景序列。例如,目標序列是GC高含量的,那麼背景序列也會如此。
設定-bg <peak/BED file>自定義背景,4.6 序列差異自動標準化
自動標準化是HOMER 用以移除由短寡聚序列引進的序列偏好性,主要用於消除某些特定基因組序列、實驗誤差和測序偏好引起的不平衡。HOMER 假定目標數據和背景序列在1-mers, 2-mers, 3-mers, etc上是沒有差異的。短寡聚序列長度是通過參數-nlen <#>設定。一個例子,目標數據和背景序列中 A's是一樣的;先計算目標序列中各種短寡聚序列的偏好性,然後調整每條背景序列的權重來標準化這些偏好性,當然權重矯正是按照較小的步長一步一步進行矯正。如果目標序列富含A,那麼背景序列中富含A的序列權重高於A含量一般的序列。4.7 檢查已知motifs富集情況
HOMER 會檢索已知 motifs 在目標序列和背景基因富集情況。結果輸出到文件:knownResults.html4.8 重頭預測motif
默認情況,HOMER 尋找長度為 8, 10, 和12 bp的motifs ,可以通過-len <#,#,#>自定義。5 findMotifsGenome.pl結果文件
homerMotifs.motifs<#> : 對應各個長度的motif結果
homerMotifs.all.motifs : 各個長度的motif結果合併到了一起
motifFindingParameters.txt : 文件保存了程序運行參數
knownResults.txt : 已知motif 的富集結果
seq.autonorm.tsv : 短核苷酸自動矯正情況
homerResults.html : 重新預測的motif 的富集結果
peakMotifs.output
homerResults/ directory: 對應homerResults.html中結果
knownResults.html : 已知motif 的富集結果
knownResults/ directory: 對應knownResults.html 中結果
6 Interpreting motif finding results
7 motif 尋找的一些重要參數Masked vs. Unmasked Genome ("-mask" or hg18 vs. hg18r)
一般使用masked 版本Region Size ("-size <#>", "-size <#>,<#>", "-size given", default: 200)
-size -300,100:peak上遊100bp,下遊300bp區域。根據不同的實驗數據選擇。Motif length ("-len <#>" or "-len <#>,<#>,...", default 8,10,12)
如果要尋找長Motif ,建議先尋找短的Motif(<15bp);尋找長的Motif 耗時和佔據大量計算機資源,建議減小尋找Motif 的區域,例如"-len 20 -size 50"。Mismatches allowed in global optimization phase ("-mis <#>", default: 2)
允許錯配可以提升靈敏度,如果尋找12-15 bp Motif ,可以設置3-4bp的錯配。Number of motifs to find ("-S <#>", default 25)
並不是越多越好。Normalize CpG% content instead of GC% content ("-cpg")
考慮到HOMER 可能卡在CGCGCGCG這樣的motifs。Region level autonormalization ("-nlen <#>", default 3, "-nlen 0" to disable)
消除短寡聚核苷酸引入的不平衡。Motif level autonormalization (-olen <#>, default 0 i.e. disabled)
對Region level autonormalization參數的補充。User defined background regions ("-bg <peak file of background regions>")
自定義背景序列Hypergeometric enrichment scoring ("-h")
findMotifsGenome.pl默認使用二項式分布對motifs打分,這是因為背景序列遠遠多於目標序列時,運算比較快。當背景序列比較少的時候,建議使用超幾何檢驗的方法。Find enrichment of individual oligos ("-oligo")
輸出寡聚核苷酸富集情況到文件oligo.length.txtForce findMotifsGenome.pl to re-preparse genome for the given region size ("-preparse").
Only search for motifs on + strand ("-norevopp")
Search for RNA motifs ("-rna")
Mask motifs ("-mask <motif file>")
Optimize motifs ("-opt <motif file>")
Dump FASTA files ("-dumpFasta")
根據peak文件輸出 target.fa 和 background.fa8. findMotifsGenome.pl使用實例:
8.1 數據包準備$perl configureHomer.pl -list
$perl configureHomer.pl -install mm108.2 構建HOMER Peak/Positions 文件
#input.test.bed#peakName #chromsome #startingPosition #endPosition #strand
1 chr2 5214158 5215219 +2 chr2 8345384 8345769 +3 chr2 8647810 8648265 +4 chr2 8943836 8944187 +5 chr2 10036538 10036796 +6 chr3 12362628 12362865 +7 chr3 13105367 13105590 +8 chr3 15619314 15619600 +9 chr3 19819943 19820193 +10 chr3 22236595 22236910 +
8.3 運行程序$ perl findMotifsGenome.pl input.test.bed mm10 /homerResult/ -size 200 -len 8,10,12
常用參數:-bg:自定義背景序列-size: 用於motif尋找得片段大小,默認200bp;-size given 設置片段大小為目標序列長度;越大需要得計算資源越多-len:motif大小設置,默認8,10,12;越大需要得計算資源越多-S:結果輸出多少motifs, 默認25-mis:motif錯配鹼基數,默認2bp-norevopp:不進行反義鏈搜索motif-nomotif:關閉重投預測motif-rna: 輸出RNA motif,使用RNA motif資料庫-h:使用超幾何檢驗代替二項式分布-N:用於motif尋找得背景序列數目,default=max(50k, 2x input);耗內存參數
參考:
Finding Enriched Motifs in Genomic Regions往期精彩:
ChIP-Seq數據挖掘系列-1: Motif 分析(1) - HOMER 安裝
ChIP-Seq數據挖掘系列-2: Motif 分析(2) - HOMER Motif 分析基本步驟
我們創建了生物信息學習交流群,如需進群,請長按下方二維碼,添加管理員微信(禁廣告)。
溫馨提示:添加管理員微信時請備註姓名/學校/專業