開始使用免費開始

DGE 理論:中介資料(Metadata)

請依下方資訊為纖維化(fibrosis)的計數資料建立一個名為 metadata 的中介資料資料框,包含欄位 genotypecondition。樣本名稱(例如 smoc2_fibrosis1smoc2_fibrosis2 等)應作為資料框的列名稱:

smoc2 metadata

本練習屬於課程

使用 R 與 Bioconductor 進行 RNA-Seq

檢視課程

練習說明

  • 使用 c() 為上述資料建立一個名為 genotype 的字元向量。
  • 使用 c() 為上述資料建立一個名為 condition 的字元向量。
  • 使用 data.frame(),並以上述 genotypecondition 字元向量建立一個名為 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(___)
編輯並執行程式碼