DGE 理論:中介資料(Metadata)
請依下方資訊為纖維化(fibrosis)的計數資料建立一個名為 metadata 的中介資料資料框,包含欄位 genotype 與 condition。樣本名稱(例如 smoc2_fibrosis1、smoc2_fibrosis2 等)應作為資料框的列名稱:

本練習屬於課程
使用 R 與 Bioconductor 進行 RNA-Seq
練習說明
- 使用
c()為上述資料建立一個名為genotype的字元向量。 - 使用
c()為上述資料建立一個名為condition的字元向量。 - 使用
data.frame(),並以上述genotype與condition字元向量建立一個名為smoc2_metadata的資料框。 - 使用
c()建立一個樣本名稱向量,並用rownames()指派為該資料框的列名稱。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Create genotype vector
genotype <- c(___)
# Create condition vector
condition <- c(___)
# Create data frame
smoc2_metadata <- data.frame(___, ___)
# Assign the row names of the data frame
rownames(smoc2_metadata) <- c(___)