TCGA database에서 데이터 다운 받은 후 raw count -> TPM 변환
TCGA database를 활용하기 위해, install.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("TCGAbiolinks")
원하는 데이터 다운로드 (여기서는 colon cancer의 RNA expression profiling data)
query <- GDCquery(project = "TCGA-COAD", data.category = "Transcriptome Profiling",
data.type = "Gene Expression Quantification",
workflow.type = "STAR - Counts")
GDCdownload(query)
colon_data <- GDCprepare(query)
Available assays in SummarizedExperiment : => unstranded => stranded_first => stranded_second => tpm_unstrand => fpkm_unstrand => fpkm_uq_unstrand
unstranded는 raw count data,
tpm_unstrand와 fpkm unstrand는 각각 TPM 또는 FPKM 값
데이터의 구조 확인
FPKM data 추출
library(SummarizedExperiment)
expression_data_tcgacoad <- assays(colon_data)[["fpkm_unstrand"]]
head(rownames(expression_data_tcgacoad)) [1] "ENSG00000000003.15" "ENSG00000000005.6" "ENSG00000000419.13" "ENSG00000000457.14" [5] "ENSG00000000460.17" "ENSG00000000938.13"
만약 원하는 유전자의 기호를 알고 있어, 이로 변환하고 싶은 경우# biomaRt 패키지 로드 library(biomaRt)ensembl <- useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl")
gene_symbols <- getBM(attributes = c("ensembl_gene_id", "hgnc_symbol"),filters = "ensembl_gene_id",values = clean_ensembl_ids, mart = ensembl)
댓글
댓글 쓰기