Search


關於工作室

Newton 牛頓
Web Developer
PHP+MYSQL, Flash, Javascript, .NET Framework, Web Application.

找尋網頁設計專家?

牛頓工作室提供客製化網頁設計服務,想知道更多,歡迎來信洽詢。 E-mail Us!

近期文章

Sponsors

Plurk

Plurk.com

行事曆

主題

彙整

Sponsors

Blogroll

R

結合R與PHP的方法

星期六, 8月 28th, 2010

R中有很多的模組與套裝軟體都是PHP所沒有的, 若能夠將這兩個平台結合起來將會將很多工作簡化起來, 以下是結合PHP與R的一個範例, 但通常我們使用到網頁服務(web service)都要考量到TIMEOUT的問題. 若R需要大量的computational time, 則表示PHP勢必會造成TIMEOUT; 所以解決方法可能就要再另外寫一個LOADING BAR, 或者用FLASH, SILVERLIGHT等RIA的方式來操控了.
以下範例應該是以LINUX裝R的機器為主, 若要在windows Server的R上去執行exec()可能需要設定其他的環境變數, 由於尚未實際操作, 所以先略過這個部分了.
http://www.r-bloggers.com/integrating-php-and-r/
台灣R的官方網站載點: http://cran.csie.ntu.edu.tw/

R httprequest package

星期四, 8月 5th, 2010

httprequest Package
http://cran.r-project.org/web/packages/httpRequest/index.html
Regular Expression:
http://stat.ethz.ch/R-manual/R-devel/library/base/html/grep.html

[R]MicroArray Preprocessing

星期一, 8月 24th, 2009

Preprocessing includes
– Image analysis and data import
– Background adjustment
– Normalization
– Summarization (for Affymetrix)
– Quality assessment
Practise Data:

使用limmaGUI匯入two-channel microarray data
參考: http://bioinf.wehi.edu.au/limmaGUI/
A. 下載 Swirl Zebrafish資料
http://bioinf.wehi.edu.au/limmaGUI/Swirl/swirl.zip
B. 安裝 Bioconductor
> source(”http://bioconductor.org/biocLite.R”)
> biocLite()
C. 安裝以下packages: convert, limma, arrayQuality, marray, mclust, hexbin, limmaGUI, sma, tkrplot, R2HTML, statmod

程式套件 > 選擇存放處 > CRAN, CRAN(extra), BioC software
程式套件 > 安裝程式套件 (或用install.packages(”convert”)

利用affylmGUI匯入two-channel microarray data:
準備動作:
A 安裝estrogen package以取得estrogene dataset:

程式套件 > 選擇存放處 [...]

[R]Data Clustering

星期四, 8月 20th, 2009

講師: 陳倩瑜
Feature Selection 課程組織
屬性的選擇
Clustering:分群
(Unsupervised Learning)
Classification: 分類
(Supervised Learning)
這堂課的大鋼會比較涵蓋在演算法上, 一些函數的背景理論與應用.
首先假設我們拿到的資料已經經過整理,
來自不同病人的資料整理成一個二維的陣列.
縱軸可能是 時間的差異, Condition,
—————————————-
| sample |
—————————————-
| gene1 |
—————————————-
| gene2 |
—————————————-
若作clustering, 屬性相同的會被歸類在一起.Data Clustering concerns how to group similar objects together while spearating dissimilar objects.如何判斷行不行? 當你拿到一群資料的時候, 就可以從一大群資料去判斷有甚麼關連性, 以及如何分群.
這樣的方法在很多地方都有用到, 如: machine learning, Data mining, Pattern recognition, Image Analysis, Bioinformatics.
Hierarchical
http://en.wikipedia.org/wiki/Cluster_analysis
http://nlp.stanford.edu/IR-book/html/htmledition/hierarchical-agglomerative-clustering-1.html
巢狀式,
階層式 (應用在基因的概念上)
Agglomerative
Divisive
HAC (hierarchical agglomerative clustering) 先把像的東西放在一起, 決定第一刀切在哪裡.
方法如下:
1. 先決定兩個人的相似程度, 比如: A有25000個FEATURE, B有25000個FEATURE
Proximity matrix [...]

[R]Data Analysis

星期三, 8月 19th, 2009

Class Comparison: 比較不同Class的類別, 屬性
Class Discovery: 從一群Data中去歸類, 相似性
Class Prediction: 有新的data, 能不能用來歸類於現有的Class
Class Comparison
找出顯著差異的.
不考慮基因與基因的Interactions.
用FoldChange(FC) = Expression of Experriment al Sample / Expresssion of Reference Sample
可用Scatter plots 及 MA-plots Visualized, 但Fold-Change沒辦法找出顯著差異, 不具有統計意義,但還是很多人喜歡使用, why? 因為統計上需要大量的SAMPLE, 而一般實驗沒有那麼多的sample, 只能用Fold Change 來表示.
P-value: 機率的概念. 在正常情況下, 我看到這樣的CASE的機率到底有多少? 例如: 在大家都買樂透的情況下. p-value越小越好, 表示越顯著. alpha-value是臨界值, 若p-value小於alpha-value, 則有顯著. 所以一般上習慣把alpha-value設得比較小.
分析一般的 Microarray data方法:
Parametric  Hypothesis Testing (有常態分布)

Paired Data :z-test, t-test
Unpaired Data :two-sample, [...]