Missing p values

120 views
Skip to first unread message

Lara Holoidovsky

unread,
Mar 19, 2024, 6:32:43 PM3/19/24
to MSstats
Hello MSstats team,

I am analyzing a data set consisting of 2 groups, 3 replicates each. First, I am imputing the missing values and then performing groups comparison. 
I noticed that in some cases the p-value is missing from the group comparison lines, specifically, when the ratio between the replicates that the protein was found in is 1:3 or 1:2 (In other words, when in group A the protein was found in 1 replicate from 3, and in group B in 2 replicates from 3). I am not sure if it has something to do with the imputation limit because the log2FC is present, but maybe im wrong. 
If not, is there something wrong with my code or how can I overcome this problem? 
I am attaching the r code I am using, and part of the output (The missing p-value lines I am talking about are 16, 17, 45, 48, 68, 84, 89, 94.)

Thank you in advance for all your help!

analyzed_data <- dataSummarizationPTM(
  raw,
  logTrans = 2,
  normalization = FALSE,
  normalization.PTM = FALSE,
  nameStandards = NULL,
  nameStandards.PTM = NULL,
  featureSubset = "all",
  featureSubset.PTM = "all",
  remove_uninformative_feature_outlier = FALSE,
  remove_uninformative_feature_outlier.PTM = FALSE,
  n_top_feature = "all",
  n_top_feature.PTM = "all",
  summaryMethod = "TMP",
  equalFeatureVar = TRUE,
  censoredInt = "NA",
  MBimpute = TRUE,
  MBimpute.PTM = TRUE,
  remove50missing = FALSE,
  fix_missing = NULL,
  use_log_file = TRUE,
  append = TRUE,
  verbose = TRUE,
  log_file_path = NULL,
  base = "MSstatsPTM_log_"
  )


comarison_results <- groupComparisonPTM(
  analyzed_data,
  data.type =  "LabelFree",
  contrast.matrix = "pairwise",
  log_base = 2,
  use_log_file = TRUE,
  append = FALSE,
  verbose = TRUE,
  log_file_path = NULL,
  base = "MSstatsPTM_log_"
)
Comparison_results_msstats.xlsx

Devon Kohler

unread,
Mar 20, 2024, 9:39:39 AM3/20/24
to MSstats
Hi Lara,

I am really not sure what is happening here. The p-value is not being calculated because there are no degrees of freedom and I am wondering if there is something weird going on with the PTM adjustment. Would you be able to share that "raw" data object that you input into the summarization step? 

Best,
Devon

Message has been deleted

Lara Holoidovsky

unread,
Apr 1, 2024, 11:38:00 PM4/1/24
to MSstats
Hi Devon,
I noticed that my answer to your message is missing here, though I can see it in my gmail. did you get it? if not I will send it once again

Best,

Devon Kohler

unread,
Apr 4, 2024, 9:45:21 AM4/4/24
to MSstats
Hi Lara,

I was able to get the data by looking at my gmail.

Quick question about your experimental design. Did you perform an enriched run and a separate global profiling run? It looks like your msstats and msstats_ptm files are the same?

Either way the fix for this will be pretty straightforward but will be different depending on your answer.

Devon

Lara Holoidovsky

unread,
Apr 4, 2024, 10:44:40 PM4/4/24
to MSstats
Hi Devon,

I performed only enriched run. Both of the files are generated from FragPipe after the data is searched.

Best,

Devon Kohler

unread,
Apr 5, 2024, 9:01:31 AM4/5/24
to MSstats
Hi Lara,

Ok that makes sense. Did you generate the `msstats.csv` file from FragPipe? It's actually really easy to use MSstatsPTM with FragPipe via the converter. I've included some code below to get the workflow started. From there you can just use the code you sent over.

One note is that without a global profiling run we generally do not recommend normalizing for changes in the underlying protein level. We can extract unmodified peptides from the enriched run and use them in place of the global profiling run, however this usually does not work as well.

```
fragpipe_input = read.csv("msstats.csv")

msstats_data = FragPipetoMSstatsPTMFormat(fragpipe_input,
                                          label_type="LF",
                                          mod_id_col = "STY", # Just add in the name of the modification column in the msstats.csv file
                                          use_unmod_peptides=FALSE # Set this to TRUE if you want to extract unmod peptides for normalization
)
```

Devon

Lara Holoidovsky

unread,
Apr 6, 2024, 1:22:05 AM4/6/24
to MSstats
Hi Devon,

Thank you so much for the help!

For your question the answer is yes, I generated both of the files from FragPipe, but from my understanding, I don't have to use the converter (?) because I have the msstats_ptm file with the column of modification.
Nevertheless, while running the conversion code you sent on msstats.csv I got the following error:  
Error: column(s) not found: [Protein, Peptide.Sequence]
next, I changed the column names in the file for the ones that it is looking for (From ProteinName to Protein, and from PeptideSequence to  Peptide.Sequence) and got the following error:
Error in .subset2(x, i, exact = exact) : subscript out of bounds

While looking on the instructions for MSstatsPTMConverter in Bioconductor I noticed that my msstats.csv is different from what is shown on the website, in addition it says "Experiments must be acquired with TMT labeling methods (a label-free converter is currently in development)", so I am a bit confused if the converter even can be used in my case. So based on the solution you suggested I assume that the format of my input files is causing the missing p values?

Best,

Devon Kohler

unread,
Apr 8, 2024, 12:22:39 PM4/8/24
to MSstats
Hi Lara,

Apologies I forgot that the id columns for label free are different than TMT. This converter actually works for both label free and TMT now, the documentation needs to be updated on our end.

So you actually do need to use the converter because it will format the data into MSstatsPTM format. The FragPipe output just gives you the information needed for the formatting.

Can you try the updated code below? It runs for the example FragPipe data I have.

```
fragpipe_input = read.csv("msstats.csv")

msstats_data = FragPipetoMSstatsPTMFormat(fragpipe_input, 
                                    label_type="LF", 
                                    protein_id_col="ProteinName", 
                                    peptide_id_col = "PeptideSequence")
```

Devon

Lara Holoidovsky

unread,
Apr 16, 2024, 4:54:22 PM4/16/24
to MSstats
Hi Devon,

apologies for the late response, unfortunately, I am still getting the same error
Error in .subset2(x, i, exact = exact) : subscript out of bounds

As I mentioned previously, the msstats file I am getting from pragpipe (the one I sent you previously) looks different from the one that is shown in Bioconductor. I also tried to run it with an annotation file I got from fragpipe as it is shown in Bioconductor, but with no success. Not sure but perhaps this is the sourse for the problem?


Lara Holoidovsky

unread,
May 9, 2024, 3:08:15 PM5/9/24
to MSstats
Hi Devon,
It has been a while since we last disscussed the issue with the converter and the missing p values, since then we tried some othey analysis pipelines but we want to use msstats` imputation pipeline in out projects as well,  and unfortunatelly,  we couldnt ovecome the problem I was describing previously. 
You mentioned that the converter worked for fragpipe msstats output file you have but perhaps this is a version difference, and the file I generated somehow differ from the one you have?

We will greatly appreciate your guidance and help on that matter,

best

Devon Kohler

unread,
May 24, 2024, 9:47:02 AM5/24/24
to MSstats
Hi Lara,

I am not really sure what is happening here. Could you post the top 5 rows of your FragPipe output just so that I can see if it very different from what we are expecting?

Devon
Reply all
Reply to author
Forward
0 new messages