R에서 limma로 하는 차등 발현 분석
John Blischak
Instructor
x_sub <- x[1000, 1:10]
f_sub <- f[1000, ]
p_sub <- p[1:10, ]
콤마 하나가 잘못되면 디버깅 악몽이 시작됩니다:
x_sub <- x[1000, 1:10]
f_sub <- f[1000, ]
p_sub <- p[, 1:10]
# Oh no! *
클래스(class) - 복잡한 데이터를 저장하는 구조 정의
객체(object) - 클래스의 특정 인스턴스
메서드(methods) - 특정 클래스에서 작동하는 함수
install.packages("BiocManager")
BiocManager::install("Biobase")
# Load package library(Biobase) # Create ExpressionSet object eset <- ExpressionSet(assayData = x, phenoData = AnnotatedDataFrame(p), featureData = AnnotatedDataFrame(f))# View the number of features (rows) and samples (columns) dim(eset)
Features Samples
22283 344
?ExpressionSet
발현 행렬
x <- exprs(eset)
피처 데이터
f <- fData(eset)
표현형 데이터
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"])

R에서 limma로 하는 차등 발현 분석