TCGA數(shù)據(jù)下載分析(1-2):RTCGA包PCA和生存分析

1 PCA plot:pcaTCGA

Plots Two Main Components of Principal Component Analysis

用法如下:
pcaTCGA(x, group.names, title = "", return.pca = FALSE, scale = TRUE, center = TRUE, var.scale = 1, obs.scale = 1, ellipse = TRUE, circle = TRUE, var.axes = FALSE, alpha = 0.8, add.lines = TRUE, ...)

expressionsTCGA(BRCA.rnaseq, OV.rnaseq, LIHC.rnaseq) %>%
  dplyr::rename(cohort = dataset) %>%  
  filter(substr(bcr_patient_barcode, 14, 15) == "01") -> BRCA.OV.LIHC.rnaseq.cancer
pcaTCGA(BRCA.OV.LIHC.rnaseq.cancer, "cohort") -> pca_plot
plot(pca_plot)
Rplot.jpeg

2 生存分析kmTCGA()

  • Kaplan-Meier 生存曲線(xiàn)評(píng)估乳腺癌和卵巢癌病人中TP53基因突變與生存關(guān)系
library(RTCGA.mutations)
# library(dplyr) if did not load at start
library(survminer)
mutationsTCGA(BRCA.mutations, OV.mutations) %>%
   filter(Hugo_Symbol == 'TP53') %>%
   filter(substr(bcr_patient_barcode, 14, 15) ==
   "01") %>% # cancer tissue
   mutate(bcr_patient_barcode =
   substr(bcr_patient_barcode, 1, 12)) ->
  BRCA_OV.mutations

library(RTCGA.clinical)
survivalTCGA(
  BRCA.clinical,
  OV.clinical,
  extract.cols = "admin.disease_code"
  ) %>%
   dplyr::rename(disease = admin.disease_code) ->
  BRCA_OV.clinical

BRCA_OV.clinical %>%
   left_join(
     BRCA_OV.mutations,
     by = "bcr_patient_barcode"
     ) %>%
   mutate(TP53 =
   ifelse(!is.na(Variant_Classification), "Mut","WILDorNOINFO")) ->
  BRCA_OV.clinical_mutations

BRCA_OV.clinical_mutations %>%
select(times, patient.vital_status, disease, TP53) -> BRCA_OV.2plot

kmTCGA(
  BRCA_OV.2plot,
  explanatory.names = c("TP53", "disease"),
  break.time.by = 400,
  xlim = c(0,2000),
  pval = TRUE) -> km_plot
print(km_plot)
Rplot01.jpeg

更多的看這里

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容