knitr::opts_chunk$set(echo = TRUE) require(remotes) if(!require(mpnstXenoModeling)){ remotes::install_github('sgosline/mpnstXenoModeling') library(mpnstXenoModeling) } library(dplyr)
Here we have an example of using the Xeva
package to search for any molecular indicates of drug response in the MPNST PDX data.
PDX data is available on this Synapse project page that collates available PDX and tumor model data across the project.
loadPDXData()
Now we can look at the mutational data in more detail
mutMat<-varData%>% mutate(AD=as.numeric(AD))%>% subset(Symbol!="")%>% dplyr::select(-c(individualID,specimenID,Sample,Age,Sex,MicroTissueQuality,Location,Size,Clinical.Status))%>% distinct()%>% tidyr::pivot_wider(names_from=synid,values_from=AD,values_fn=list(AD=mean), values_fill=list(AD=0.0))%>% tibble::column_to_rownames('Symbol') library(pheatmap) annotes<-varData%>% dplyr::select(c(synid,Sample,Age,Sex,MicroTissueQuality,Location,Size,Clinical.Status))%>% mutate(MicroTissueQuality=unlist(MicroTissueQuality))%>% mutate(`Clinical Status`=unlist(Clinical.Status))%>% dplyr::select(-Clinical.Status)%>% #tidyr::separate(specimenID,into=c('patient','sample'),remove=TRUE)%>% distinct()%>% tibble::column_to_rownames('synid')#%>% # dplyr::filter(sample!='normal') mutMat<-mutMat[,rownames(annotes)] pheatmap(log10(0.01+mutMat),clustering_distance_cols = 'correlation',cellwidth = 10,annotation_col = annotes,labels_row = rep("",nrow(mutMat)),labels_col=rep("",ncol(mutMat))) pheatmap(log10(0.01+mutMat),clustering_distance_cols = 'correlation',cellwidth = 10,annotation_col = annotes,labels_row = rep("",nrow(mutMat)),labels_col=rep("",ncol(mutMat)),filename='allMutations.pdf')
We then select for those mutations that exist in more than one sample. And then add back TP53.
topMuts=dplyr::filter(varData,AD>0)%>% group_by(Symbol)%>% summarize(nSamps=n_distinct(individualID))%>% dplyr::filter(nSamps>1)%>% dplyr::select(Symbol) topMuts<-intersect(rownames(mutMat),union("TP53",topMuts$Symbol)) pheatmap(log10(0.01+mutMat[topMuts,]),cellwidth = 10,cellheight=10,annotation_col = annotes,labels_col=rep("",ncol(mutMat)),clustering_method='ward.D2', clustering_distance_cols = 'correlation') pheatmap(log10(0.01+mutMat[topMuts,]),cellwidth = 10,cellheight=10,annotation_col = annotes,filename='recMutations.pdf',clustering_method='ward.D2', clustering_distance_cols = 'correlation')
Below is a list of custom genes we want to evaluate.
genelist=c('NF1','CDKN2A','TP53','EED','SUZ12','EGFR','PDGFRA','MET','BRAF', 'TYK2','PIK3CA','AURKA2','ATRX','TSC1','TSC2','NF2') missed.genes<-setdiff(genelist,rownames(mutMat)) print(paste('Missing mutations in genes',paste(missed.genes,collapse=','))) missed.mat<-matrix(0,nrow=length(missed.genes),ncol=ncol(mutMat), dimnames=list(missed.genes,colnames(mutMat))) new.mat<-rbind(mutMat[intersect(genelist,rownames(mutMat)),],missed.mat) pheatmap(log10(0.01+new.mat),cellwidth = 10,cellheight=10,annotation_col = annotes,labels_col=rep("",ncol(mutMat)),clustering_method='ward.D2') pheatmap(log10(0.01+new.mat),cellwidth = 10,cellheight=10,annotation_col = annotes,filename='selectedMutations.pdf',clustering_method='ward.D2')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.