<!DOCTYPE html>
<html>

<head>
<title>ProVision</title>
</head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--CSS-->

<style>
html { scroll-behavior: smooth; } 
.trueBody {
  background:"white"
}

.mainNavHeader {
  height:10vh;
  background-color:#2b579e;
  color:white;
  border-style: outset;
  border-radius:10px;
  box-shadow: 3% 1% #888888;
}

.navList {
  padding-top:2%;
  font-size:1.2em;
}
.navList li {
  display:inline;
  padding:1%;
}

.navList li:hover {
  background-color:#ebeced;
  border-radius:10px;
}

.navList li a {
  color:white;
  text-decoration: none;
}
.navList li:hover a {
  color:black;
  text-decoration: none;
}

.trueHeader {
  background:white;
  border-style: outset;
  border-radius:10px;
  box-shadow: 3% 1% #888888;
  display: flex;
  flex-direction: row;
}

.headerBox {
  margin: auto;
  font-style:bold;
  text-align:center;
}

.section2{
  background-color:white;
  border-style: outset;
  text-align: justify;
  text-justify: inter-word;
  border-radius:10px;
  border-color:#edeceb;
  box-shadow: 3% 1% #888888;
  padding-left:8%;
  padding-right:8%;
}
.vidBox {
  background-color:black;
  border-style: outset;
  border-radius:10px;
  border-color:#edeceb;
  box-shadow: 3% 1% #888888;
  width:100%;
  height:60vh;
}

.vidPos {
  display:block;
  margin-left:12%;
  margin-top:2%;
}


</style>

<body>
<div class="trueBody">
    <div class="mainNavHeader">
    <ul class="navList" style="list-style:none;">
      <li><a href="#loadData"> Uploading data </a></li>
      <li><a href="#initFilter"> Filter and transform </a></li>
      <li><a href="#assignGroups"> Assign groups </a></li>
      <li><a href="#validVals"> Filter valid values </a></li>
      <li><a href="#impute"> Impute missing values </a></li>
    </ul>
  </div>
  <div class="trueHeader">
    <div class="headerBox">
      <h1>ProVision: Data processing</h1>
    </div>
  </div>
  <div class = "section1"> <!---top section --->
   <div class="vidBox">
      <img src="../media/vidTut2.svg" style="width:100%; height:100%;">
    </div>
  </div><!---top section close --->
  <div class="section2">
    <h2 id = "loadData"> Load data </h2>
      <p style="font-size:1.2em"> If no data processing has been done a new file can be uploaded. Else refresh the page to wipe all data and re upload your file. As of this version, only MaxQuant output is supported. If you don't have your own data, we have provided tutorial data: <a href="../data/proteinGroups.txt" download="proteinGroupsTutorial"> proteinGroupsTutorial.txt </a> The tutorial data is real maxQuant data that has been blinded and chosen specifically to showcase the plotting features. MaxQuant uses what is called the label free quantification or <b>LFQ</b> algorithm for quantification. This needs to be enabled when performing the searches and outputs relavent columns for ProVision. The raw intensity is available as well and can be accessed by choosing intensity in the data upload tab, however we find this to be useful in specific cases only. It is recommended to use LFQ intensities for most label free experiments. For further reading, see the manuscript about the maxLFQ algorithm <a href="https://dx.doi.org/10.1074%2Fmcp.M113.031591" target="_blank"> here.</a><br><br>
      MaxQuant folder structure is as follows: <br><br> specified output folder > combined > txt > proteinGroups.txt </p>
    <h3 id="initFilter"> Filter and Transform </h3>
      <p style="font-size:1.2em"> Adding or removing columns is disabled by default because this functionality can only be used once prior to filtering. If you have used ProVision and would like to re analyse the data without specific samples this is how you could do it. However, we recommend to rather research the mass spec data without the outlier samples and to keep the number of replicates constant across groups. Thus if a replicate is dropped from one condition, a replicate should be dropped from all other samples as well. This is important for statistical tests </p>
      <p style="font-size:1.2em"> Unique peptides are simply the number of unique peptides associated with each protein group. For instance, a protein group can be assigned with no unique peptides as amino acid sequences can be shared between different proteins. Furthermore the assignment of peptides to proteins is based on a probability, thus having at least two unique peptides gives a greater chance that a specific protein was actually observed. Also, the intensity is based on the sum of the unique and razor peptides observed in the maxLFQ algorithm. Thus by Increasing the number of unique peptides to filter on increases the strictness of the data set but also the accuracy of the quantification. Refer to the<a href="https://dx.doi.org/10.1074%2Fmcp.M113.031591" target="_blank"> maxLFQ</a> paper to read more about the role of unique peptides in quantification.</p>
      <p style="font-size:1.2em"> Transformation of the intensity data is done to satisfy the requirement for normally distributed data when performing parametric statistics.Also, having normally distributed data will help with imputation, which will be discussed later in this tutorial. Typically, intensity data is log normally distributed and to obtain a normal distribution the data is log transformed using base 2. This is chosen by default, however to see the effect of this step the log2 checkbox can be unclicked and the results can be viewed downstream. To restore the results, check the transformation box again and click the start filtering button.</p>
      
    <h3 id = "assignGroups"> Assigning groups </h3>
      <p style="font-size:1.2em"><img src="../media/annotations.png" alt="groupAnnotation" style="width:300px;height:150px;margin-left:15px;float:right"> Assigning groups is how ProVision knows what to compare statistically and many other functions. It is thus of utmost importance to have this input done correctly, if for any reason the data is mislabeled in some way we recommend to re upload your data and start again. The ID column is your data extracted from MaxQuant proteinGroups.txt file. The annotation column must be changed to reflect relevant groups as depicted in the figure. Also, each group should have the same name, i.e. all replicates of control must be named "control" and all replicates of treatment must be named "treatment". This table has a third column called AxisLabels and these are simply the axisLabels that will be used on relevant positions. If you are happy with the names in the ID column the AxisLabels column does not need to be edited. If you do choose to edit this column make sure the names are unique, again see the example in the figure. It is possible to copy, paste and drag in the table similar to Microsoft excel. Because this part is so sensitive to the functionality of provision we lock in and confirm your submission and it cannot be changed within the same session. To change this you would need to reload the page. </p>
    <h3 id = "validVals"> Filter for valid values </h3>
      <p style="font-size:1.2em">Filtering for valid values simply means filtering for missing values, during log transformation these will be labelled as NA and thus register as non valid. These values can occur due to two main factors, <b>1:</b>absent across replicates or<b>2:</b>absent due to experimental conditions.</p>
      <p style="font-size:1.2em">Addressing the first case, it is completely possible that the spectra contributing to a specific protein is missed across different mass spec runs or different replicates of a condition. This does not mean that this protein is missing, it simply means that the mass spectrometer did not observe it in a specific run. To address we can choose to filter out proteins that were seen in at least twice in a total of three replicate runs. Thus we are confident that this protein exists yet allow for some lenience with the knowledge of how the mass spectrometer operates. changing the number to three (if you have three replicates) would only consider proteins that were observed in each replicate of a sample and thus be the strict case.</p>
      <p style="font-size:1.2em">In the second case, it can be conceived that certain proteins will not be expressed in response to a condition, as per example addition of a drug in a cell line. This missing data is thus important to keep in the calculations as it likely contains the proteins activated in response to the drug. To do this we choose <b> in at least one group</b> where groups were defined in the assigned groups section. By choosing the <b> in each group</b> option the minimum value filtering parameter will be applied to each group defined in the assigned groups section. To achieve the strictest possible filtering, assign the minimum values equal to your number of replicates and choose <b>in each group</b>. While it might be tempting to keep data as strict as possible, using this filtering parameter discards a large amount of usable data which could contribute to your phenotype. However, if you do decide to filter at the most strict level there will be no residual missing values and you are done with the section and imputation can be skipped</p>
    <h3 id = "impute"> Impute missing values </h3>
    <p style="font-size:1.2em"> Missing values can and will affect statistical tests, while it can be dealt with during the test we find that the statistical test does not perform as well. In order to address the issue of missing values we impute them. Imputation simply refers to making up values in a clever way, the simplest form of imputation is using the mean of a given data set and using that as a default value for all missing data. However it should be immediately apparent that this is a bad idea as we are working with protein expression. Again it is either one of two cases contributing to our missing data, either the mass spec did not observe the spectra associated with a specific protein or the protein was simply not expressed. Regardless of the case it remains true that the expression of the missing value is below the detection limit. Thus it makes sense to determine the mean expression for identified proteins in each replicate of each group and give our missing proteins values within this range. This simply simulates a very low, yet detectable level of expression. This is especially powerful when combined with the filtering parameters in the previous section. see the figure for an example on how the imputation would work. We have provided options to alter the width of the standard deviation and the amount by which the random numbers are shifted based on the units of standard deviation from the valid data. This can dramatically alter the significance tests and should not be altered unless there is a reason for it. These numbers have been optimized previously. For more information see the publication on <a href="https://doi.org/10.1038/nmeth.3901" target="_blank">Perseus</a>, another fantastic and versatile program for MaxQuant data. Other machine learning methods can be used to impute data, which we will likely introduce in later versions. However, truncated normal distributions work well for the majority of proteomics experiments.</p>
    <p style="font-size:1.2em"> Centering the median can be useful in some cases as an additional mechanism to normalize data. This will center all data around zero, thus if there is run-to-run variability centering the median can reduce this variability and normalize the data across replicates that deviate for non-biological reasons.</p>
  <br>

</div>
</body>
</html>
