MSstats for Spectronaut

730 views
Skip to first unread message

Domitille Schvartz

unread,
Jun 4, 2021, 8:39:03 AM6/4/21
to MSstats
Hi everyone,
Thank you very much for this wonderful tool, and for this help group.
I followed the may institute workshop, and I am now trying to make everythink works in my hands! I downloaded the last version of MSstat on bioconductor.
But I am working with spectronaut output, and I am facing some issues with the Spectraunot to MSstats converter, I have an error when I use the code :

quant <- SpectronauttoMSstatsFormat(raw,
                           annotation = NULL,
                           intensity = "PeakArea",
                           filter_with_Qvalue = TRUE,
                           qvalue_cutoff = 0.01,
                           useUniquePeptide = TRUE,
                           fewMeasurements = "remove",
                           removeProtein_with1Feature = FALSE,
                           summaryforMultipleRows = max)

The error states : “Error in toString(missing.col) : objet 'missing.col' introuvable”.
Maybe you’d have an idea of what is going wrong with the way I used it?
Could it be because I did "direct DIA" without spectral library? does it change something in the output?
Thank you very much for your help

Mateusz Staniak

unread,
Jun 4, 2021, 8:46:25 AM6/4/21
to MSstats
Hi,


please show the log and Session.info() output - this doesn't look like an error from the current version.



Kind regards
Mateusz

Domitille Schvartz

unread,
Jun 8, 2021, 9:45:48 AM6/8/21
to MSstats
You were right! I thought I did MSstats update, but actually I did not see that I also have to update R!
Therefore the first error I mentioned did not appear yet.

But now I have another one which appear (sorry it's in french):

quant <- SpectronauttoMSstatsFormat(raw,
                           annotation = NULL,
                           intensity = "F.PeakArea",
                           filter_with_Qvalue = TRUE,
                           qvalue_cutoff = 0.01,
                           useUniquePeptide = TRUE,
                           fewMeasurements = "remove",
                           removeProtein_with1Feature = FALSE,
                           summaryforMultipleRows = max)

Erreur dans setnames(x, value) : 
  Can't assign 4 names to a 0 column data.table
De plus : Message d'avis :
  Dans aggregator(Intensity, na.rm = TRUE) :
  aucun argument pour max ; -Inf est renvoyé

Would you have any idea to help me? 
best regards


Mateusz Staniak

unread,
Jun 8, 2021, 10:11:54 AM6/8/21
to MSstats
Hi,


first idea: please try "FPeakArea" or "PeakArea" as the intensity parameter.
If it works, I'll update documentation. If this doesn't help, please show me the column names of your input "raw". When your annotation parameter is NULL, you should have RBioReplicate and RCondition columns in your input.


Kind regards
Mateusz

Domitille Schvartz

unread,
Jun 10, 2021, 12:53:41 AM6/10/21
to MSstats
Thank you Mateusz!
"PeakArea" is working!
I will go through the next steps though.

another question : is there any tutorial/help for MSstatsPTM somewhere? I would be interested to test it with Spectraunot and phosphos.
Thank you
Best regards

Mateusz Staniak

unread,
Jun 10, 2021, 5:00:55 AM6/10/21
to MSstats
Hi,


glad to hear it worked,
for MSstatsPTM, please start here https://vitek-lab.github.io/MSstatsPTM/ and let us know if you have any more questions.


Kind regards
Mateusz

Domitille Schvartz

unread,
Jun 22, 2021, 7:13:43 AM6/22/21
to MSstats
Hi Mateusz
Spectronaut has a new version (v.15). Before installing it, I would want to be sure that this new version will be compatible with MSstats, MSstatsPTM etc... packages.
Do you know if v15 exports are the same as v14 and will fit MSstats packages?
Thank you
Best regards
Domitille

Message has been deleted

Alison Ross

unread,
Feb 7, 2022, 3:25:07 PM2/7/22
to MSstats
Hi Mateusz,

I'm having the same problem with my spectronaut file - was wondering if you had any insight?

command used 
> quant <- SpectronauttoMSstatsFormat(input2,intensity = 'PeakArea',
+       filter_with_Qvalue = TRUE,
+       qvalue_cutoff = 0.01,
+       useUniquePeptide = TRUE,
+       fewMeasurements="remove",
+       removeProtein_with1Feature = FALSE,
+       summaryforMultipleRows=max)
INFO  [2022-02-07 15:20:33] ** Raw data from Spectronaut imported successfully.
INFO  [2022-02-07 15:22:47] ** Raw data from Spectronaut cleaned successfully.
INFO  [2022-02-07 15:22:48] ** Using annotation extracted from quantification data.
INFO  [2022-02-07 15:22:48] ** Run labels were standardized to remove symbols such as '.' or '%'.
INFO  [2022-02-07 15:22:48] ** The following options are used:
  - Features will be defined by the columns: PeptideSequence, PrecursorCharge, FragmentIon, ProductCharge
  - Shared peptides will be removed.
  - Proteins with single feature will not be removed.
  - Features with less than 3 measurements across runs will be removed.
WARN  [2022-02-07 15:22:48] ** PGQvalue not found in input columns.
INFO  [2022-02-07 15:22:50] ** Intensities with values smaller than 0.01 in EGQvalue are replaced with 0
INFO  [2022-02-07 15:23:06] ** Features with all missing measurements across runs are removed.
INFO  [2022-02-07 15:23:29] ** Shared peptides are removed.
INFO  [2022-02-07 15:23:44] ** Multiple measurements in a feature and a run are summarized by summaryforMultipleRows: max
INFO  [2022-02-07 15:23:47] ** Features with one or two measurements across runs are removed.
INFO  [2022-02-07 15:24:02] ** Run annotation merged with quantification data.
INFO  [2022-02-07 15:24:07] ** Features with one or two measurements across runs are removed.
INFO  [2022-02-07 15:24:07] ** Fractionation handled.
Error in setnames(x, value) :
  Can't assign 4 names to a 0 column data.table

 & here's the session info 

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base    

other attached packages:
[1] MSstatsConvert_1.2.2 dplyr_1.0.7          MSstats_4.0.1      
[4] BiocManager_1.30.16

loaded via a namespace (and not attached):
 [1] gtools_3.9.2          tidyselect_1.1.1      xfun_0.27            
 [4] purrr_0.3.4           splines_4.1.1         lattice_0.20-45      
 [7] log4r_0.4.1           colorspace_2.0-2      vctrs_0.3.8          
[10] generics_0.1.1        htmltools_0.5.2       yaml_2.2.1          
[13] survival_3.2-13       utf8_1.2.2            marray_1.70.0        
[16] rlang_0.4.12          pillar_1.6.4          nloptr_1.2.2.2      
[19] glue_1.5.0            DBI_1.1.1             lifecycle_1.0.1      
[22] munsell_0.5.0         gtable_0.3.0          caTools_1.18.2      
[25] evaluate_0.14         knitr_1.36            fastmap_1.1.0        
[28] fansi_0.5.0           preprocessCore_1.54.0 Rcpp_1.0.7          
[31] KernSmooth_2.23-20    backports_1.3.0       checkmate_2.0.0      
[34] scales_1.1.1          limma_3.48.3          lme4_1.1-27.1        
[37] gplots_3.1.1          ggplot2_3.3.5         digest_0.6.28        
[40] ggrepel_0.9.1         grid_4.1.1            tools_4.1.1          
[43] bitops_1.0-7          magrittr_2.0.1        tibble_3.1.6        
[46] crayon_1.4.2          pkgconfig_2.0.3       ellipsis_0.3.2      
[49] MASS_7.3-54           Matrix_1.3-4          data.table_1.14.2    
[52] assertthat_0.2.1      minqa_1.2.4           rmarkdown_2.11      
[55] R6_2.5.1              boot_1.3-28           nlme_3.1-153        
[58] compiler_4.1.1      

column names
> names(input2)
 [1] "R.Condition"                  "R.FileName"                  
 [3] "R.Replicate"                  "PG.ProteinAccessions"        
 [5] "PG.ProteinGroups"             "PG.Quantity"                
 [7] "PEP.GroupingKey"              "PEP.StrippedSequence"        
 [9] "PEP.Quantity"                 "EG.iRTPredicted"            
[11] "EG.Library"                   "EG.ModifiedSequence"        
[13] "EG.PrecursorId"               "EG.Qvalue"                  
[15] "FG.Charge"                    "FG.Id"                      
[17] "FG.PrecMz"                    "FG.Quantity"                
[19] "F.Charge"                     "F.FrgIon"                    
[21] "F.FrgLossType"                "F.FrgMz"                    
[23] "F.FrgNum"                     "F.FrgType"                  
[25] "F.ExcludedFromQuantification" "F.NormalizedPeakArea"        
[27] "F.NormalizedPeakHeight"       "F.PeakArea"                  
[29] "F.PeakHeight"                 "R.condition"

Thanks so much for your help!

Best
Alison 

Mateusz Staniak

unread,
Feb 8, 2022, 6:21:59 AM2/8/22
to MSstats
Hi,

is it the new version of Spectronaut? Can I see a small snippet of the input file? A few proteins to check what the problem is, I don't see it based on just the column names.



Kind regards,
Mateusz

Mateusz Staniak

unread,
Feb 8, 2022, 4:52:48 PM2/8/22
to MSstats
Hi,


how many runs are there in your dataset? That subset only has a single run and that's what's causing the issue.


Kind regards,
Mateusz

Alison Ross

unread,
Feb 8, 2022, 5:05:18 PM2/8/22
to MSstats
Hi Mateusz,

There are multiple runs in the real file! Should I subset the file differently to demonstrate?

Best,
Alison

Mateusz Staniak

unread,
Feb 8, 2022, 5:33:39 PM2/8/22
to MSstats
Hi,


yes please, one protein + at least 3 runs should be OK.


Kind regards,
Mateusz

Alison Ross

unread,
Feb 8, 2022, 7:25:44 PM2/8/22
to MSstats
Hi Mateusz,

Great - see attached. Thanks!

Best,
Alison

20210208_forMateusz_2.csv

Mateusz Staniak

unread,
Feb 9, 2022, 4:41:07 PM2/9/22
to MSstats
Hi,


sorry for the confusion,
what I meant was ~1 protein, several features and at least 3 runs for each feature (because we remove features with too few runs). Moreover, all the rows from the second file have "TRUE" in ExcludedFromQuantification column, which MSstats would remove them before any other processing.


Kind regards,
Mateusz

Alison Ross

unread,
Feb 11, 2022, 3:49:34 PM2/11/22
to MSstats
Gotcha! I hope this one works haha!  I also included one in which all the entries have a FALSE value for the ExcludedFromQuantification column just to make sure we can use the file to test the command.

Thanks so much!

Alison 

20210211_forMateusz_3_noExclusions.csv
20210211_forMateusz_3.csv

Mateusz Staniak

unread,
Feb 11, 2022, 5:56:14 PM2/11/22
to MSstats
Hi,

this subset does not throw an error for me.
If it does for you, please re-install MSstatsConvert via the following command:
devtools::install_github("Vitek-Lab/MSstatsConvert", ref = "develop")
if it doesn't, we'll need another subset.


Kind regards,
Mateusz
Reply all
Reply to author
Forward
0 new messages