\newpage
Some proteins were quantified only in one condition. In such a case no p-values or fold change can be computed. Nevertheless, proteins with relatively high intensity in one condition but not present in the other condition can have biological relevance. Figure \@ref(fig:plotPresentInOnlyOneCondition) shows how many protein were not quantified in a condition. The Figure \@ref(fig:barplotIntensitiesSingle) visualizes the most intensive proteins not quantified in the other condition.
library(ggplot2) ggplot(NAinfo , aes(x= name, y=nrProteins)) + geom_bar(stat="identity") + geom_text(aes(label=nrProteins), vjust=1.6, color="white", size=3.5) + theme_minimal()
tmp1 <- results %>% select(TopProteinName,grp2$getConditions()$reference , grp2$getConditions()$condition,log2FC) %>% dplyr::filter(is.na(log2FC)) %>% arrange( desc(!!sym(grp2$getConditions()$reference)) ,desc(!!sym(grp2$getConditions()$condition)) )
plotBaR<-function(tmp2, name){ if(nrow(tmp2) > 0){ tmp3 <- tmp2 %>% select(TopProteinName,name) x <- setNames(tmp3[,2],tmp3[,1])[1:min(20,nrow(tmp3))] barplot(x, las = 2, ylab="Normalized intensity", main= name,cex.names=0.7, border="lightblue") } } tmp2R <- dplyr::filter(tmp1, !is.na(!!sym(grp2$getConditions()$reference))) tmp2C <- dplyr::filter(tmp1, !is.na(!!sym(grp2$getConditions()$condition))) if(nrow(tmp2R) >0 & nrow(tmp2C)> 0){ par(mfrow=c(1,2)) par(mar=c(10,4,4,1)) plotBaR(tmp2R , name= grp2$getConditions()$reference) plotBaR(tmp2C, name= grp2$getConditions()$condition) }else if(nrow(tmp2R) >0 | nrow(tmp2C)> 0){ par(mar=c(8,4,4,1)) plotBaR(tmp2R , name= grp2$getConditions()$reference) plotBaR(tmp2C, name= grp2$getConditions()$condition) }
Furthermore, to integrate those proteins with proteins which do have a fold change and a q.value, we do also provide and a fold change estimate and q.value for those proteins. To emphasize that these values were not obtained employing fitting a statistical model we call the columns in the output file pseudo.log2FC
and pseudo.adj.P.Val.
Pseudo fold changes are estimated using the mean of the 10% smallest protein averages instead of the absent group average. The missing q-value is substituted by 0. The Volcano plot in Figure \@ref(fig:pseudoVolcanoplot) envisages all the proteins quantified including those identified only in one of the samples (green).
pseudoData <- grp2$getResultTableWithPseudo() p1 <- quantable::volcano2GB(pseudoData, foldchange ="pseudo.log2FC", pvalue = "pseudo.P.Value", labels = "proteinID", ylab="-log10(P Value)", log2FCThresh=grp2$qfoldchange, pthresh=grp2$qvalue, pseudo = pseudoData$P.Value) p1<-p1 + labs(tag="A") + theme(legend.position="bottom") p2 <- quantable::volcano2GB(pseudoData, foldchange ="pseudo.log2FC", pvalue = "pseudo.adj.P.Val", labels = "proteinID", ylab="-log10(Q Value)", log2FCThresh=grp2$qfoldchange, pthresh=grp2$qvalue, pseudo = pseudoData$adj.P.Val) p2<-p2 + labs(tag="B") + theme(legend.position="bottom") if(length( grp2$special )>0) { p1<-quantable::addSpecialProteins(p1,pseudoData,special= grp2$special, foldchange ="pseudo.log2FC", pvalue = "pseudo.p.mod", labels = "TopProteinName") p2<-quantable::addSpecialProteins(p2,pseudoData,special= grp2$special, foldchange ="pseudo.log2FC", pvalue = "pseudo.q.mod", labels = "TopProteinName") } gridExtra::grid.arrange(p1, p2, nrow=1)
\clearpage
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.