簡體   English   中英

使用model.matrix函數設計基因表達矩陣

[英]Design Matrix using model.matrix function for gene expression

需要一些幫助。 我的數據如下所示:

Identifier    Sample1    Sample2   Sample3 ...Sample10
Gene1          10.85       9.33      11.04 ... 10.093
Gene2          5.94        7.95      6.46  ... 6.33
...
Gene99         3.93        4.12      7.86  ... 9.45

樣本1至4正常,樣本5至10異常。

數據存儲在稱為DF的數據幀中。 需要使用model.matrix函數創建設計矩陣,其思想是使用此信息來擬合線性模型,從而能夠識別差異基因。

我不知道如何創建設計矩陣。 我已經閱讀了文檔,但是卻無濟於事。 該函數的語法似乎不適合於我所擁有的格式。

任何提示表示贊賞。

你需要類似的東西

disease <- factor(rep(c(1,2),c(4,6)))
levels(disease) <- c("normal","abnormal")
design <- model.matrix(~disease)

您是否嘗試閱讀《 limma用戶指南》 有很多示例:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM