1 Introduction

SmartPhos Explorer is an R Shiny app for streamlined analysis of proteomics and phosphoproteomics, featuring data pre-processing, exploratory data analysis, hypothesis testing, time-series analysis and functional interpretation. There are two ways to run the SmartPhos Explorer shiny app:

  • Calling the function after loading the SmartPhos package.
library("SmartPhos")
runSmartPhos()
  • Users can make an independent directory for the SmartPhos Explorer app and open any of the script (server.R, ui.R) in RStudio and click on Run App button.
library("SmartPhos")
makeSmartPhosDirectory(path = "shinyApp")

The front page of the Shiny app looks as below:

The current tabs are:

  • Preprocessing
  • PCA
  • Heatmap
  • Differential expression
  • Time-series clustering
  • Enrichment analysis
  • Kinase activity inference
  • Log Info
  • Update Notes

In this vignette, we will walk you through the process of preparing your data and performing downstream analyses using different tabs in the Shiny app.

2 Preprocessing tab

This tab contains the functions for preprocessing before diving into data analysis and interpretation. In this tab, users can start with uploading a MultiAssayExperiment object, generated by the SmartPhos R package or a zip file containing quantification tables from Spectronaut or MaxQuant. Output from DIA-NN is planned for the future update. After uploading the data, options for choosing the transformation and normalization methods, performing batch effect correction, and displaying the missing values are available. There is also an option for saving the uploaded data as R object (.rds file) for reusing in the future to save processing time.

2.1 Upload options

Uploading is one of the most important steps in the smooth functioning of the app.

As shown in the figure, users have the option to decide between uploading a zip file and a MultiAssayExperiment object. The zip file contains the output files generated by Spectronaut or MaxQuant software. For users who are not experienced with R, this is the preferred option.

When using the zip file option, there are certain requirements the users need to follow for the error-free conversion of the data from these files into a multiAssayExperiment R object. One of the most important requirements for the zip file is to contain a properly formatted fileTable.txt file. The details of this file are explained in the next subsection.

2.1.1 fileTable.txt file

This file should be a tab-separated tsv file that contains the information including name of the quantification table, sample ID and experimental details, such as whether a certain sample was enriched for phospho-peptides, whether the quantification was on protein groups or phosphorylation sites and so on.
Optional annotations, such experimental conditions, time points and etc. can also be included in this table and some of them are required for specific downstream analysis tasks. An error message will be displayed if this file is missing or the format of file is incorrect. The mandatory columns in this table are as follows:

  • fileName: The names of quantification tables of protein groups or phosphorylation sites. They should be the standard output files from Spectronaut or MaxQuant. Make sure that it contains only the file names with the file extension (For example: “20240826_Protein_Report.xls”, “20240826_PTMReport.xls”)) and not the relative or absolute path.

  • Important notes on the format of the quantification table from Spectronaut: The quantification table from Spectronaut should be in the “wide” format, with different samples in different columns. The table should be in plain text format, not Excel tables. The file extension does not matter. Spectronaut sometimes output .xls files but they are actually plain text files. The acceptable deliminators for the tables are: tab ( (preferred), comma (,), colon (:) and semicolon (;). For full proteome measurement, “PG.ProteinGroups”, “PG.Genes” and “[sample name]PG.Quantity” columns must be present. For phosphoproteome measurement, “[sample name]PTM.SiteProbability”, “[sample name]PTM.Quantity”, “PTM.CollapseKey”, “PG.UniProtIds”,“PG.Genes”, “PTM.SiteLocation”, “PTM.SiteAA”, and “PTM.FlankingRegion” columns must be present.

  • id: Contains unique identifiers for sample (sample IDs). The sample IDs should correspond to the prefix of actual column names in the quantification table. For example: the ID value FullProteome_1stCrtl_0min_rep2 corresponds to one of the column names oecf4_220602_BH_ET_FullProteome_1stCrtl_0min_rep2.raw.PG.Quantity in the quantification table. SmartPhos will automatically recognize the columns in the quantification table that match a certain sample ID, as long as this sample ID is present in the columns that contain “PG.Quantity”.

  • searchType: Contains information on the type of search performed on the samples by Spectronaut or MaxQuant. There are two possibilities: proteome (quantification of protein abundance) and phosphoproteome (quantification of the abundance of phosphorylation sites). The two searchTypes are represented as two assays in the multiAssayExperiment object. Note that the app will still work if only one of the searchType is present but some functions may not be available. For example, normalisation of phosphorylation sites by protein abundance will be not available of only phosphoproteome measurement is available.

  • sampleType: Contains information of whether enrichment for phosphorylated peptides is performed for a certain sample. The sampleType can be Phospho (or PP) for the phospho-enriched samples and FullProteome (or FP) for the non-enriched sample. Not that the app will still work if only one of the sample type is present but some functions may not be available. For example, the novel normalisation correction for phosphoproteomic data will not be available if full proteome without enrichment is absent.

The above mentioned columns are mandatory ones. Other than that, fileTable.txt can contain optional columns such as:

  • sampleName column is important for performing normalization correction or for normalizing Phosphoproteome samples by Full Proteome samples. This should be the sample id without FP_/PP_ or Phospho_/FullProteome_ suffix or prefix. For example, for the sample ID, FullProteome_1stCrtl_0min_rep1, the sampleName should be, “1stCrtl_0min_rep1”. Without this column, it would not be possible to perform normalization correction and normalizing phosphoproteome samples by full proteome samples.

  • subjectID with information like patientID, cell lines, etc. This column will be used if there are multiple samples from the same subject and users wish to include the subject ID as covariates in hypothesis testing (e.g. paired t-test) or time-series analysis.

  • timepoint with values like 0min, 20min, 6h, 24h, etc. This column is important for the time-series clustering tab and other tabs which make use of the results from the time-series clustering tab.

  • replicate with values rep1, rep2, replicate1 and so on.

  • treatment containing information about different treatments or experimental conditions.

  • Users can include any metadata for visualization or hypothesis testing in the fileTable.txt.

Here is an example of the fileTable.txt file:

NOTE: It’s better to avoid any special characters (‘(’, ‘)’, ‘#’, ‘%’, ‘@’, etc) in the column names in the quantification table output by Spectronaut/MaxQuant and same for the ID column of the fileTable.txt file. In addition, sample IDs should not start with numbers. Those can cause error in parsing the data.

2.1.2 Column annotations

Users have option to select the column annotations, which are provided by users in the fileTable.txt, when using the zip file method. If the upload of zip file is successful, another widget will appear which will allow the user to select from the different available annotation options. Multiple selections are possible simply by clicking on the list item.

2.1.3 MultiAssayExperiment object

For users with experience in R, they can parse data by using our SmartPhos package, which will create an multiAssayExperiment object. Users can save this object as an rds file and choose the “MultiAssayExperiment object” option for uploading the data.

Users can also first upload the zip file to SmartPhos Explorer and download the processed data as an rds file (see section 2.1.5) . This file can be uploaded using the "MultiAssayExperiment option** option in the future analysis, which will save some time as processing the quantification table can be slow if the file size is large.

2.1.4 Error checks

If the processing of zip files or multiAssayExperiment object is successful, then the upload tab will show the total number of samples and features.

The user will have option to choose the assay and sample type as shown in the figure above. In case the upload is not successful, the app will display an error message. These error messages are:

2.1.5 Save and re-use the parsed dataset.

Users have the options to download the parsed data as a .rds file for future use. There are also options of saving the parsed data in the local version of Shiny app as well as to load and delete previously saved data objects.

2.2 Preprocessing options

SmartPhos package performs some pre-filtering and preprocessing based on various threshold values during the generation of the multiAssayExperiment object. On top of that, this panel has different options for preprocessing of the selected assay. The options provided by the shiny app are as follows:

  • Normalization correction: This option is present only if the phophoproteomics data is present. It allows for the correction of normalization artefacts introduced by the Spectronaut.
  • Normalize phospho intensity by the corresponding protein expression.
  • Transformation: The transformation methods available are: log2 and vst (variance stabilizing transformation).
  • Normalization: Normalization strategy depends on the selected transformation method. Therefore, the user has option of Yes or No. If the user selects Yes, then for log2 and no transformation, median scaling is applied and for vst, vsn is applied.
  • Missing values: Users can select what percentage of missing values are allowed. Proteins with missing values above the selected threshold will be removed from all analyses.
  • Imputation: Currently four imputation methods are available:
    • QRILC (Quantile Regression Imputation of Left-Censored data)
    • MinDet (Deterministic minimal value approach)
    • BPCA (Bayesian PCA)
    • MLE (Maximum Likelihood Estimation)
    • Random forest
  • Batch effects removal: This option provides the abilty to correct for batch effects. It uses removeBatchEffect() from the limma package. The users can select the maximum of two columns. The columns used for batch effects removal should be present in the fileTable.txt file.

After selecting the options, press the Process button to perform the preprocessing.

2.3 Other options

The preprocessing tab has some more options:

  • Plot the completeness of the assay. It will plot a bar plot displaying percentage of completeness for each sample.
  • Launching MatrixQCvis. Another shiny app for exploratory analysis.
  • Saving, loading and removing results. The multiAssayExperiment object can be saved, loaded and removed within the shiny app.
  • Removing outlier. Simply writing the names of the samples (delimited by comma) in the text box will remove those samples. It also supports regex option. For example: if “100min” is typed in the outlier box, then all the samples with 100min timepoint will be removed.
  • Coloring the box plot based on different annotations is also possible.
  • Subsetting of the dataset is possible from the displayed table. The selected annotations in the filter options of different columns will be used for subsetting the data. The following tabs of the shinyApp will use that subsetted data for further exploration and analysis. Subsetting can be undone by simply removing the annotations from filter boxes.
  • After preprocessing, the assay is saved as a SummarizedExperiment object and user can download it as a rds file.

2.4 Output

The different outputs available to the users are:

  • A box plot of intensity values for each samples.
  • A diagnostic plot of phopho to fullProteome ratio. This plot can be used to decide if the normalization correction should be performed or not. It can also shows the outliers.
  • A data table showing the information about each samples.
  • A bar plot which shows the percentage of completness of each samples.

3 PCA

This tab performs principal component analysis (PCA) on the imputed assay from the Preprocessing tab and then plot the principal components.

Simply click on Run PCA button to perform PCA. The different options available to the users after plotting are:

  • Selecting the principal components for x- and y-axis.
  • Two more dimensions can be added to the data points using color and shape options.
  • The plotting is done using Plotly package, so users have many functionalities. For example, hovering over the plotted data points will display more information, downloading plot as png file, etc.
  • PCA values can be downloaded as a tsv file.
  • PCA plot can also be downloaded as a pdf file.

NOTE: If imputation is selected none in the preprocessing tab, then performing PCA is not possible. An error message will pop-up on screen.

4 Heatmap

This tabs allow the user to plot the heatmap of the imputed assay from the preprocessing tab. Users can select from the three choices available:

  • Top variant: This allows the users to plot the genes with highest variance. Users can decide the number of top variants genes to plot. This option performs clustering automatically. The user also has the option to divide the columns and rows of the heatmap into specific number of clusters.
  • Differentially expressed: Allows to plot the heatmaps for differentially expressed genes. The differential expression analysis is available in Differential expression tab and can be performed using ProDA or Limma.
  • Selected time series cluster: After performing the time-series clustering in another tab, users have option to plot the heatmap of the selected cluster.

For all the above-mentioned options, users can add additional column annotations to the plotted heatmap. Adding more column annotations to the heatmap can be helpful to understand the heatmap better and see the patterns in the data more clearly. User can also download the heatmap as a PDF.