Visualisation of proteomics data is a very broad topic, with lots of potential bespoke visualisations one may want to perform. This notebook is intended to provide a brief overview of how you can extract your proteomics data and manipulate it to prepare it for visualisation
Load the required libraries.
library(camprotR) library(MSnbase) library(dplyr) library(tidyr) library(ggplot2) library(pheatmap)
Here, we'll use the protein-level quantification processed in Processing and QC of TMT data. Please see the previous notebook for details of the data processing.
tmt_protein <- readRDS('./results/tmt_protein.rds')
As a reminder, this data comes from a published benchmark experiment where yeast peptides were spiked into human peptides at 3 known amounts to provide ground truth fold changes (see below). Two versions of Orbitrap control software were tested, with v3 shown to improve fold-change estimation for low intensity peptides. Here, we will use the data obtained with v3. For more details, see: [@http://zotero.org/users/5634351/items/LG3W8G4T]
single_protein <- tmt_protein[1,] %>% # taking the first protein as an example biobroom::tidy.MSnSet(addPheno=TRUE) print(single_protein)
single_protein %>% ggplot() + aes(spike, value) + geom_point() + stat_summary(geom='errorbar', width=0.2) + theme_camprot() + labs(x='', y='Protein abundance (log2)')
set.seed(0) random_proteins <- sample(rownames(tmt_protein), 500, replace=FALSE) # update with actual species annotations! ann_row <- data.frame(species=rep(c('yeast', 'human'), 250), row.names=random_proteins) ann_col <- list('species'=c('yeast'=get_cat_palette(1), 'human'=get_cat_palette(2)[2])) tmt_protein[random_proteins,] %>% exprs()%>% t() %>% scale() %>% t() %>% pheatmap(show_rownames=FALSE, cluster_cols=FALSE, border_color=NA) tmt_protein[random_proteins,] %>% exprs()%>% t() %>% scale() %>% t() %>% pheatmap(show_rownames=FALSE, cluster_cols=FALSE, border_color=NA, annotation_row=ann_row, annotation_colors=ann_col)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.