2012年7月19日 星期四

WampServer 修改預設開啟瀏覽器

修改檔案 wampmanager.ini  內的

[Menu.Left]
;WAMPMENULEFTSTART
Type: separator; Caption: "Powered by Anaska"
Type: item; Caption: "Localhost"; Action: run; FileName: "C:/Program Files/Mozilla Firefox/firefox.exe"; Parameters: "http://localhost/"; Glyph: 5
Type: item; Caption: "phpMyAdmin"; Action: run; FileName: "C:/Program Files/Mozilla Firefox/firefox.exe"; Parameters: "http://localhost/phpmyadmin/"; Glyph: 5

改成: C:/Users/Redlin/AppData/Local/Google/Chrome/Application/chrome.exe

2012年7月18日 星期三

[R] Hypergeometric Relationship to Fisher's exact test


通常用來做Enrichment analysis的方法不外乎是
(1) 
Binomial distribution probability

(2) Hypergeometric probability  P[X ≥ x] 的機率
ex. We have total 38574 probes, significance have 14558, then we take 53 probes and get 33 probes significance
[R code ]:   
P[X ≥ 33] P[X = 33]+P[X > 33] = 1-P[X ≤ 32]
dhyper(33, 14558, (38574-14558), 53 ) +
phyper(33, 14558, (38574-14558), 53, lower.tail = FALSE)
= 1 - phyper(32, 14558, (38574-14558), 53)

而此
Hypergeometric 機率又與Fisher's Exact Test 單尾檢定相同:
x <- matrix( c(33,20,14525,23996), ncol=2)
out <- fisher.test(x, alternative = "greater")
out$p.val = P[X ≥ 33]



+
-

+
33
14558-33
14558
-
20
24016-56
24016

53
38574-53
38574