Phân tích Biểu hiện khác biệt với limma trong R
John Blischak
Instructor
x_sub <- x[1000, 1:10]
f_sub <- f[1000, ]
p_sub <- p[1:10, ]
Chỉ một dấu phẩy sai chỗ cũng đủ biến thành ác mộng gỡ lỗi:
x_sub <- x[1000, 1:10]
f_sub <- f[1000, ]
p_sub <- p[, 1:10]
# Ôi không! *
class - định nghĩa cấu trúc để chứa dữ liệu phức tạp
object - một thể hiện cụ thể của một class
methods - các hàm hoạt động trên một class cụ thể
install.packages("BiocManager")
BiocManager::install("Biobase")
# Load package library(Biobase) # Tạo object ExpressionSet eset <- ExpressionSet(assayData = x, phenoData = AnnotatedDataFrame(p), featureData = AnnotatedDataFrame(f))# Xem số feature (hàng) và sample (cột) dim(eset)
Features Samples
22283 344
?ExpressionSet
Ma trận expression
x <- exprs(eset)
Dữ liệu feature
f <- fData(eset)
Dữ liệu phenotype
p <- pData(eset)
x_sub <- x[1000, 1:10]
f_sub <- f[1000, ]
p_sub <- p[1:10, ]
eset_sub <- eset[1000, 1:10]
nrow(exprs(eset_sub)) == nrow(fData(eset_sub))
TRUE
ncol(exprs(eset_sub)) == nrow(pData(eset_sub))
TRUE
boxplot(<y-axis> ~ <x-axis>, main = "<title>") boxplot(<gene expression> ~ <phenotype>, main = "<feature>")boxplot(exprs(eset)[1, ] ~ pData(eset)[, "er"], main = fData(eset)[1, "symbol"])

Phân tích Biểu hiện khác biệt với limma trong R