# #——knitr-opts回声= FALSE -------------------------------------------- 库(knitr) opts_chunk美元集(消息= FALSE,警告= FALSE) opts_chunk美元(图。对齐= "中心",fig.width = 10) # #——usecase ------------------------------------------------------------- 库(GEOquery) gse < - getGEO(“GSE29619 ") ## ------------------------------------------------------------------------ gse ## ------------------------------------------------------------------------ 名称(gse) # #------------------------------------------------------------------------ 图书馆(Biobase) es_LAIV < gse([1])头(pData (es_LAIV), 3) # #——combine-es错误= TRUE -------------------------------------------- 结合(gse [[1]],gse [[2 ]]) ## ---- CreateConnection269 ------------------------------------------------- 库(ImmuneSpaceR) sdy269 < - CreateConnection (sdy269) sdy269 # #——getGEM_TIV2008 ------------------------------------------------------ TIV2008 < - sdy269 getGEMatrix美元(“TIV_2008”)TIV2008 # #——pdata_TIV2008 ------------------------------------------------------- 头(pData (TIV2008 )) ## ---- getGEM_multicohorts ------------------------------------------------- es269 < - sdy269 getGEMatrix美元(c(“TIV_2008”、“LAIV_2008”),摘要= TRUE) es269 # #——getGEM_cohortnames -------------------------------------------------- es269 < - sdy269 getGEMatrix美元(队列= c(“TIV集团2008”,“2008 LAIV集团”),总结= TRUE ) ## ------------------------------------------------------------------------ 所有< - CreateConnection(" ") #所有研究es < - $ getGEMatrix (c(“TIV_2007”,“TIV_2008”、“LAIV_2008”),摘要= TRUE (pData (es)头 )) ## ---- listds -------------------------------------------------------------- 库(data.table) sdy269 listDatasets美元()海< - sdy269 getDataset美元(“海”)海# #——getDataset_cross ---------------------------------------------------- ahai < - $ getDataset(“海”)# #——makeFilter ---------------------------------------------------------- 库(Rlabkey) virus_filter < - makeFilter (c(“病毒”、“包含”、“H1N1”))hai_f < - sdy269 getDataset美元(“海”,colFilter = virus_filter) virus_filter2 < - makeFilter (c(“病毒”、“平等”、“布里斯班/ / 59/2007 (H1N1)”))hai_f < - sdy269 getDataset美元(“海”,colFilter = virus_filter2) #可以指定多个过滤器analyte_filter <- makeFilter(c("Analyte", "EQUAL", "IFNg"), c("Study time collected", "IN", "0;7") elisa <- sdy269$getDataset("elisa", colFilter = analyte_filter) ## ----cross-assay--------------------------------------------------------- # Elispot analyte_filter2 <- makeFilter(c("Analyte", "EQUAL", "IgG"), c("Study time collected", "EQUAL", "7")) elispot <- sdy269$getDataset("elispot", colFilter = analyte_filter2, reload = TRUE) elispot <- elispot[, elispot_response := spot_number_reported + 1] elispot <- elispot[, list(participant_id, elispot_response)] # Flow fcs <- sdy269$getDataset("fcs_analyzed_result") fcs <- fcs[, fcs_response := (as.double(population_cell_number) + 1) / as.double(base_parent_population)][study_time_collected == 7] res <- merge(elispot, fcs, by = "participant_id") library(ggplot2) ggplot(res, aes(x = as.double(fcs_response), y = elispot_response, color = cohort)) + geom_point() + scale_y_log10() + scale_x_log10() + geom_smooth(method = "lm") + xlab("Total plasmablasts (%)") + ylab("Influenza specific cells\n (per 10^6 PBMCs)") + theme_IS() ## ----quick-plot---------------------------------------------------------- sdy269$quick_plot("hai", normalize = FALSE) sdy269$quick_plot("hai", filter = virus_filter2, normalize = FALSE, color = "Age", shape = "Gender") ## ----qp_cross------------------------------------------------------------ virus_filter3 <- makeFilter(c("cohort", "contains", "TIV"), c("study_time_collected", "IN", "0;21;28;30;180")) all$quick_plot("hai", filter = virus_filter3, normalize = TRUE, color = "Age")