Cogena-1 (CoExpression 분석) Start.

BioinformaticsAndMe



array 분석을 하다보면, 때로 수많은 DEG(Deferentially Expressed Gene) 형님들을 만나게 된다.

몇 천..?개는 다른 보정이 필요하겠고, 사실 몇 백개라도 골치 아프다.

아.. 수많은 DEG가지고 DAVID 돌려버리면 뭔가 두리뭉실한 기작만 나온다. GG



이럴때 나는

'Co-Expression 분석' 을 한다.


뭐 여러 정의가 있겠지만

간단히 말해서 유전자 발현(up, down) 양상이 비슷한 것 끼리 분석합시다.. 라고 나는 정의하겠다.

다시말해, 수많은 DEG들을 비슷한 발현양상을 갖는 그룹으로 클러스터링하여, 클러스터링된 DEG들의 기작을 살펴보는 것이다.

이것을 쉽게하기 위한 아래 R package를 추천한다.


'Cogena'

Co-expressed gene-set enrichment analysis 



논문에 나와있는 위 그림이 Cogena 를 단번에 설명해준다.

1. DEG 나옴.

2. 발현에따라 클러스터링 해줌 (클러스터링방법은많다).

3. 클러스터링 된 그룹에 무슨 Drug, Pathway가 Enrichment(빵빵)한지 분석을 해줌.




#############################################################################

BioinformaticsAndMe script

#############################################################################

1. cogena 패키지 설치

source("https://bioconductor.org/biocLite.R")

biocLite("cogena")

library(cogena)

# 예제(건선) 데이터 로딩

data(Psoriasis)

# 데이터 확인

ls()


2. Input data

# expression file

dim(DEexprs)

View(DEexprs)

# annotation file

sampleLabel

str(sampleLabel)

table(sampleLabel)


3. Pathway 데이터 로딩

# KEGG Pathway gene set

annoGMT <- "c2.cp.kegg.v5.0.symbols.gmt.xz“

# annotation 경로 지정

annofile <- system.file("extdata", annoGMT, package="cogena")

# GO 분석을 하고 싶다면,

# GO biological process gene set

# annoGMT <- "c5.bp.v5.0.symbols.gmt.xz"

아래표는 Cogena 가 가진 Annotation set이다. 잘 정리했군..


4. 파라미터 지정 (몇개 클러스터로 할건지, 무슨 clustering method를 쓸건지 등등)

# the number of clusters. It can be a vector.

# nClust <- 2:20

nClust <- 10

# Making factor "ct" , "Psoriasis"

sampleLabel <- factor(sampleLabel, levels=c("ct", "Psoriasis"))

# the clustering methods

# clMethods <- ("hierarchical","kmeans","diana","fanny","som","model",

# "sota","pam","clara","agnes") # All the methods can be used together.

clMethods <- c("hierarchical","pam")

# the distance metric

metric <- "correlation“

# the agglomeration method used for hierarchical clustering

method <- "complete"


5. Co-expression Analysis 시작

genecl_result <- coExp(DEexprs, nClust=nClust, clMethods=clMethods,

                       metric=metric, method=method)

summary(genecl_result)

# Enrichment (Pathway) analysis for the co-expressed genes

clen_res <- clEnrich(genecl_result, annofile=annofile, sampleLabel=sampleLabel)

summary(clen_res)


6. 클러스터링 결과 Heatmap 확인

# pam 클러스터링을 통해 10개의 클러스터 제작

# Always make the number as character, please!

# heatmap 그리기

heatmapCluster(clen_res, "pam", "10", maintitle="Psoriasis")



크... 일단 이쁘다.. 10개의 클러스티렁, up|down DEG, two샘플 그룹으로 heatmap이 만들어진다.

아! Pathway 봐야지!





7. 클러스터 Pathway 확인

# The enrichment score for 10 clusters, together with Down-regulated,Up-regulated and All DE genes.

heatmapPEI(clen_res, "pam", "10", maintitle="Pathway analysis for Psoriasis")

유전자 클러스터마다 어떤 pathway가 enrichment한지 보인다 (물론, 전체 only up, only down 도 볼 수있다).

옵션 조정해주면 특정 클러스터의 score 내림차순 기준으로 그림을 다시그려준다. 클러스터9 를 기준으로 다시그려보았다.




그림 왜이렇게 커...;;

Cogena-2 (CoExpression 분석) 에서 이어서 살펴보자.




Cogena-1 (CoExpression 분석) End.

BioinformaticsAndMe


'R' 카테고리의 다른 글

R, Command line interface Ⅱ  (0) 2018.07.20
R, Command line interface Ⅰ  (0) 2018.07.16
R, RStudio 설치  (0) 2018.07.14
Permutation test (순열검정법)  (7) 2018.07.08
Cogena-2 (CoExpression 분석)  (0) 2018.07.06

+ Recent posts