Skip to content

III. Basic processing

We have run the image analysis workflow. Its output file contains: - Median_SigmBg per peptide-barcode-row-cycle-exposure time - Peptide annotation (Sequence, SwissProtID, gene name, sequence similarity)

Next, add the PTK_template or STK_template to do the data analysis using the output file of the image analysis. overview2

Basic Processing Overview

The result of Image Analysis contains the Median signal minus background (Median_SigmBg) value for each peptide-barcode-row-cycle-exposure time datapoint.

  1. add input data
    1. data step: add image analysis output files (for PTK: add both prewash and afterwash at the same time)
    2. Join with sample annotation
  2. Run ETS (Exposure Time Scaling) app. ETS combines Median_SigmBg at multiple exposure times to create a single value per cycle: S100 (AU).
  3. Check Mean and CV (CV is the data quality metric for technical replicates)
  4. Check positive control (pre-phosphorylated peptides). Expectation: S100 > 1000
  5. Run the QC app (PTK or STK QC app)
  6. Do normalizations

ETS: Exposure Time Scaling App

The ETS is the first app in PamDx data analysis. An app is a subworkflow: left click "Open" to inspect the structure to familiarize yourself with how an app looks like in general. It always starts with an Input step, which takes the data from the main workflow. Then there is a wizard step which helps the users to select data. Then there are data transformation steps and finally: - View step(s) to visualize data - Output step to bring data back to the main workflow

ETS app internal workflow

However, usually we do not have to interact with the app from inside. When we run the app from the main workflow, the wizard pops up, where we have to select correct data input by answering questions.

In ETS, the correct factors are set by default — just click Run.

ETS app internal workflow

Quality control for technical replicates: the Mean & Variance operator

We examine technical replicate variation of individual conditions / samples as a quality metric. Each condition has usually 3+ replicates. An example of technical replicate is 1 sample lysate on 3+ arrays; An example of biological replicate is 1 sample lysate per array.

How to configure the crosstab view - Each column should contain all replicates of a condition. - Colors should be set per condition (e.g. drag and drop Supergroup and/or Test condition to colors)

Mean & CV crosstab view

Running the operator switches to operator view; you can switch back to crosstab view.

Mean & CV operator view - If CV for high signals is NA → adjust the curve fit parameters shown in the panel - Result: CV high signals per condition. To interpret results (whether the variation is high or low), use the quality control criteria table below.


QC Apps

QC apps calculate which peptides have low signal. Phosphorylation on these peptides is not detected, and these peptides should be removed. Peptide removal does not happen inside the app - it will be removed at a later step.

PTK QC app

  1. Calculates presence value per peptide-array: positive if peptide signal shows positive trend over cycles.
  2. Calculates fractionPresent: the fraction of arrays with a positive trend per peptide.
  3. At a later step, the fractionPresent factor is used to remove peptides which are only present in a fraction of all the samples (default: 25% which can be lowered.)

Run the app and view the visualization to assess peptide presence:

PTK QC heatmap: fractionPresent per peptide (blue=low, orange=high)

STK QC LOD app

  • This app calculates the same factors as the PTK QC, but in a different way. The reason is that the prewash steps cannot be used in the STK assay to assess the trend over the cycles.
  • Presence is calculated based on the Limit of Detection (LOD). Peptides with S100 above the LOD are considered present.
  • Per peptide, the ratio of samples that are present is calculated in the qc_stk_thr.ratio factor.

STK QC heatmap

Next, at the first normalization, the peptides which are present in < 25% of samples are excluded. 25% is the default threshold but it should be always checked and adjusted. 25% stems from the following rational: If there are 4 conditions, 25% = 1 condition. It is usually acceptable if peptides are missing in max 1 condition.

Always review this threshold during analysis! Sometimes, we can accept lower threshold, e.g. if there are not enough peptides passing QC or with potent inhibitors which inhibit kinases so that signal is only present in the control sample.

STK QC App: Use When All Peptides Pass the LOD App

If pre-phosphorylated peptides have very low signal, all peptides will pass the STK_QC_LOD app. In this case, use the STK_QC app (based on CV).

  • Calculates nominal CV
  • At normalization, remove peptides with high CV (= low signal). Use the pep.cv.estimate factor. The default threshold is < 0.5, but revise this.

STK QC CV heatmap: pep.cv.estimate

Removal of low signal peptides

Removal of low signal peptides is done by a Filter in the log step or, if VSN normalization is done, then in the Filter QC peptides step after VSN. These filters are set up with the defaults in the templates. The QC heatmaps should be used to visually assess if these thresholds should be adjusted.

Quality Control criteria

The quality assessment manages our expectations. See the below table for criteria that can be used to assess quality of the experiment. For example, if the number of QC passed phosphosites is high and the samples have low technical CV (with technical replicates), it enables detection of smaller effect sizes from the covariates of interest. On the contrary, if the flags indicate fair or poor quality of samples, higher differential effects are needed to reach significance.

Level Flag Number of QC-passed phosphosites PTK (of 195) Number of QC-passed phosphosites STK (of 142) Technical CV
Good 🟢 > 123 > 90 < 20%
Fair 🟡 78–123 56–90 20–30%
Poor 🔴 < 78 < 56 > 30%

Data flow in Tercen

In general the data flows from operator to operator in the following way. An operator transforms the data (e.g. log transform). It creates an output factor. Each step has a namespace which is the name of the step.

Output construction follows the pattern: <namespace>.<output_name_from_operator>

In the next step, the output of the previous step is taken as input values. It is represented on the y axis of the crosstab view.

workfow logic

Example: - Namespace: STKQC - Output name: logTransformed - → Full reference: STKQC.logTransformed


Normalizations

Overview

Two basic normalizations:

  • Log2 (the log_cutoff operator assignes 1 to values < 1 before log transformation.)

  • VSN (Variance Stabilizing Normalization)

Optional: batch effect correction by ComBat, applied after Log or VSN.

Normalization in the Tercen workflows are done together with filtering.

  • Log normalization & filtering for QC-passed peptides is done in 1 step.
  • VSN normalization & filtering for QC-passed peptides is done in two steps. The reason is that log works per individual value, while VSN considers all peptides simultaneously - even peptides not passing QC are needed to carry it out
  • Filtering for peptides that passed QC is done with the following defaults:
    • PTK: fractionPresent > 0.249
    • STK: qc_stk_thr.ratio > 0.25

Log & VSN

Read about different base normalizations here.


ComBat: Batch Effect Correction

Examine with the Combat operator if there are technical batch effects. For a single run, the batch can be barcode, for multiple runs the batch can be run. If batch effects are visible, Combat can remove them. Use Combat on normalized data (log or VSN).

Combat should only be done on data with balanced design: if a condition (e.g. control) sits mostly or only in one batch, the correction also removes part of the real biological difference. Additionally, in every technical batch there should be minimum 2 samples.

  1. Crosstab view: color by expected technical batch
  2. Result: assess batch effect removal: check if before-ComBat PCA shows batch clusters and after-ComBat PCA has removed / mitigated the batch effect
  3. If Combat is suitable for the data and has removed batch effects, keep this step, otherwise do not use it.

ComBat

Mode 1: simple

All batches are shifted toward a common average. Use it when every batch contains a similar mix of your conditions, e.g. each run has controls and treatments in similar numbers.

Mode 2 fit condition (UseFitCondition = true, FitConditionFactors = e.g. Grouping, FitConditionValues = e.g. REF)

The correction is learned only from the samples of one condition, typically reference or control samples measured in every batch. It is then applied to all samples. Used with multiple run design, when we expect a condition (e.g. REF) to be very homogenous (technical replicates) so the batch effect estimated from this is cleaner.

Put the condition factors on the columns of the crosstab.

Check whether replicates in a condition are more similar Before and After ComBat

Heatmap and PCA before and after ComBat

If ComBat successfully decreases technical variance, then after Combat:

  • Replicates within a condition are more similar &
  • Conditions are usually more separated

Important: for multi-run experiments: check Run effect first (usually larger than Barcode). Correcting for too many batch types can introduce bias — if Run effect exists, correcting for Barcode as well is usually unnecessary.


References

ComBat and batch correction:

  • Chen, C., et al. (2011). Removing batch effects in analysis of expression microarray data: An evaluation of six batch adjustment methods. PLoS One, 6, e17238.

  • Johnson, W.E., Li, C. & Rabinovic, A. (2007). Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics, 8, 118–127.

  • Leek, J.T., et al. (2010). Tackling the widespread and critical impact of batch effects in high-throughput data. Nature Reviews Genetics, 11(10), 733–739.

  • Zindler, T., et al. (2020). Simulating ComBat: how batch correction can lead to the systematic introduction of false positive results in DNA methylation microarray studies. BMC Bioinformatics, 21(1), 1–15.