-标题:"在SDY144中HAI/病毒中和滴度和细胞计数的相关性"作者:"Renan Sauteraud" date: " ' r Sys.Date() ' "输出:rmarkdown::html_document vignette: > %\VignetteIndexEntry{使用ImmuneSpaceR重新生成在线报告:SDY144} %\VignetteEngine{knitr::rmarkdown}——三价流感灭活疫苗(TIV)接种者血凝抑制(HI)和病毒中和(VN)滴度与浆母细胞和浆B细胞之间的相关性。本报告复制了[Cao RG et al(2014)](http://www.jid.oxfordjournals.org/cgi/pmidlookup?view=long&pmid=24495909)作为原始研究的一部分发表的图2。opts_chunk$set(message = FALSE, fig.align = "center", fig.width = 10, fig.height = 8)' ' ' ' ' ' {r netrc_req,回声= FALSE} #这一块只用于BioConductor检查和不应该影响其他设置ISR_login < - Sys.getenv (ISR_login) ISR_pwd < - Sys.getenv(“ISR_pwd”)如果(ISR_login ! =”“& ISR_pwd ! = " ") {netrc_file < - tempfile(“ImmuneSpaceR_tmp_netrc”)netrc_string < -粘贴(“ISR_login机器www.immunespace.org登录”,labkey.netrc.file <- netrc_file} ' ' ' #### Load ImmuneSpaceR ' ' ' {r} library(ImmuneSpaceR) library(data.table) library(ggplot2)首先,我们使用' CreateConnection '初始化到所选研究的连接。然后我们用' getDataset '方法获取感兴趣的数据集。' ' {r} con <- CreateConnection("SDY144") flow <- con$getDataset("fcs_analyzed_result") hai <- con$getDataset("hai") vn <- con$getDataset("neut_ab_titer")然后我们选择细胞群和时间点。 ```{r subset} pb <- flow[population_name_reported %in% c("Plasma cells,Freq. of,B lym CD27+", "Plasmablast,Freq. of,Q3: CD19+, CD20-")] pb <- pb[, population_cell_number := as.numeric(population_cell_number)] pb <- pb[study_time_collected == 7 & study_time_collected_unit == "Days"] #13 subjects pb <- pb[, list(participant_id, population_cell_number, population_name_reported)] ``` We compute the HI and VN titer as the fold-increase between baseline and day 30. ```{r FC} # HAI hai <- hai[,response:=value_reported/value_reported[study_time_collected==0], by="virus,cohort,participant_id"][study_time_collected==30] hai <- hai[, list(participant_id, virus, response)] dat_hai <- merge(hai, pb, by = "participant_id", allow.cartesian = TRUE) # VN vn <- vn[, response:=value_reported/value_reported[study_time_collected==0], by="virus,cohort,participant_id"][study_time_collected==30] vn <- vn[, list(participant_id, virus, response)] dat_vn <- merge(vn, pb, by = "participant_id", allow.cartesian = TRUE) ``` #### Plot using `ggplot2` Figure 2 A: Correlation between the absolute number of plasmablasts and plasma Bcells 7 days after vaccination with and fold-increase of HI titers from baseline to day 30 after vaccination. ```{r HAI, dev='png'} ggplot(dat_hai, aes(x = population_cell_number, y = response)) + geom_point() + geom_smooth(method = "lm") + facet_grid(virus~population_name_reported, scale = "free") + xlab("Number of cells") + ylab("HI fold-increase Day 30 vs. baseline") + theme_IS() ``` Figure 2 B: Correlation between the absolute number of plasmablasts and plasma Bcells 7 days after vaccination with and fold-increase of VN titers from baseline to day 30 after vaccination. ```{r VN, dev='png'} ggplot(dat_vn, aes(x = population_cell_number, y = response)) + geom_point() + geom_smooth(method = "lm") + facet_grid(virus~population_name_reported, scale = "free") + xlab("Number of cells") + ylab("VN fold-increase Day 30 vs. baseline") + theme_IS() ```