Vitek-Lab / MSstats

R package - MSstats
74 stars 46 forks source link

groupComparison() Issue in ComparisonResult Data Frame #111

Closed kkw5710 closed 8 months ago

kkw5710 commented 9 months ago

I have just recently updated R and RStudio to the newest current version. Prior to this update, dataProcess() and groupComparison() were both producing the expected output. dataProcess() is still functioning and is producing the same results, but now when running groupComparison(), the ComparisonResult data frame has only the Protein and Label columns with the actual (and correct) values, but every other column (i.e. log2FC, SE, Tvalue, DF, pvalue, adj.pvalue, etc.) only has NA for every observation for each protein. I am not receiving any warning or error messages with either function, and I have already tried the following to resolve this issue:

  1. Ensured that I have the newest BiocManager and MSstats versions.
  2. Removed and reinstalled both of these packages.
  3. Verified that the dataProcess() output (the input for groupComparion()) is correct.
  4. Consulted the documentation for the newest MSstats version.
  5. Ensured that my data preprocessing steps and constructing of the contrast matrix are correct.

For reference, the following image is the ComparisonResult data frame produced when I run groupComparison() now (Protein and Label have actual values, while every other column has only NA for each observation):

Screenshot 2024-02-18 092034

Any assistance with this issue would be greatly appreciated.

mstaniak commented 8 months ago

Hi, thank you for reporting this potential bug, could you kindly share the code that you're using and output of session_info?

kkw5710 commented 8 months ago

I am not sure what you require, but this is my ProteinLevelData output from dataProcess(), which is producing the expected results:

Screenshot 2024-02-20 191752

This is the code I used after running dataProcess() for groupComparison():

Screenshot 2024-02-20 192249 Screenshot 2024-02-20 192305

This code has not been altered in any way after updating R and RStudio and it does not result in any errors.

Lastly, this is the output of my session_Info():

Screenshot 2024-02-20 193402 Screenshot 2024-02-20 193419

I hope this is helpful and I thank you for any assistance you can provide on this issue. Please let me know if you require any more information.

mstaniak commented 8 months ago

Hi, please try re-running with option save_fitted_models set to TRUE. This way we can verify if models are fitted correctly.

mstaniak commented 8 months ago

Hi, do groups labels start with digits?

kkw5710 commented 8 months ago

Thank you for your continued help. I have run groupComparison() with "save_fitted_models = TRUE." What output do you require to assist you?

And in regards to the group labels, I have 8 labels in total - 5 of which do start with digits.

I hope this was helpful and thank you again!

mstaniak commented 8 months ago

Please put letters at the start of group labels, this should fix the problem.

mstaniak commented 8 months ago

hope it is OK now, please re-open if the problem persists

kkw5710 commented 8 months ago

Hi. I added an 'X' to all Labels that started with a digit and that still did not fix the issue. I apologize for this continued problem, and any help would be greatly appreciated.