knitr::opts_chunk$set(echo = TRUE)
The goal of this analysis is to collect growth curves from the PDX models.
Xeva
is coming across as being clunky to use. While it is useful for plotting dose response curves with error bars, I'm not convinced it will be helpful for more quantitative analysis since everything is stored in the object and hard to access.
Here we will calculate three basic response metrics from the PDX data and then correlate them with other data modalities. First we load all the PDX data from Synapse
.
require(remotes) if(!require(mpnstXenoModeling)){ remotes::install_github('sgosline/mpnstXenoModeling') library(mpnstXenoModeling) } #this function simply loads all the data into memory loadPDXData()
Let's see how the various growth metrics compare.
Based on this manuscript there are numerous metrics by which we can compare various treatments in models. They each have their own biases but we need to evaluate in detail.
We can now get all the values for all the combinations.
library(ggplot2) drugData <- mpnstXenoModeling::loadPDXDrugData() pat.drug<-drugData%>%dplyr::rename(individualID='Sample')%>% getAllDrugStats(.)%>% subset(drug!='n/a')%>% tidyr::replace_na(list(SPI=0.0,TGI=0.0,AUC=0.0)) DT::datatable(pat.drug) ##why do i have missing values?? sync<-reticulate::import('synapseclient') syn<-sync$login() write.table(pat.drug,file='patientByDrugSens.csv',sep=',',row.names=F,col.names=T) res = syn$tableQuery('select * from syn25955439') syn$delete(res) res = syn$tableQuery('select * from syn25955439') pd <- sync$build_table('PDX drug sensitivities','syn21984813','patientByDrugSens.csv') syn$store(pd) #pat.drug%>% # tidyr::pivot_longer(c(3,4,5),values_to='Value',names_to='Metric')%>% # ggplot(aes(x=individualID,y=Value))+geom_bar(aes(fill=Metric),position='dodge',stat='identity')+facet_grid(~drug) pat.drug%>% tidyr::pivot_longer(c(3,4,5),values_to='Value',names_to='Metric')%>%ggplot(aes(x=drug,y=Value))+geom_bar(aes(fill=individualID),position='dodge',stat='identity')+facet_grid(~Metric)+scale_fill_viridis_d()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
It seems that 545 is a growth outlier (in addition to a mutational outlier) so we can remove it and re-plot.
pat.drug%>% subset(individualID!='WU-545')%>% tidyr::pivot_longer(c(3,4,5),values_to='Value',names_to='Metric')%>% ggplot(aes(x=drug,y=Value))+geom_bar(aes(fill=individualID),position='dodge',stat='identity')+facet_grid(~Metric)+scale_fill_viridis_d()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.