NAs after protein group comparison

70 views
Skip to first unread message

froehlic...@gmail.com

unread,
Apr 8, 2021, 6:41:05 AM4/8/21
to MSstats
Dear MSstats developer team,
I have to do a power analysis on a pilot study in order to plan the real study.
It is DIA data analyzed in DIA-NN and I manually brought the data in 10 column format.

When I run the proteingroupcomparison I only get NAs for FCs pVals etc.

After dataprocess, the Abundance values were calculated, so I am not sure where the problem lies. 

I had the same problem before and Mateusz found that my annotation was wrong, so here I already checked the annotation twice for double annotated bioreplicates and even changed the bioreplicates in the data to make sure, there is no problem with the assignment of 
Condition <-> BioReplicate

I set up a really small reproducible sample, which I will attach.

Best, Klemens
test.rds

froehlic...@gmail.com

unread,
Apr 8, 2021, 6:42:31 AM4/8/21
to MSstats
I cannot attach the R script. Here is the script for the example:


#packages
library(MSstats)

#set working directory to current folder of R script
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))


# input
test2 <-  readRDS(file = "test.rds")


##### msstats analysis ######
msstats_dataprocess <- MSstats::dataProcess(raw = test2,
  normalization = F,
  MBimpute = F)

#investigate this
msstats_dataprocess$ProcessedData %>% View()

#contrast.matrix for comparison
comparison <-  data.frame(V1 = 1, V2 = -1)
colnames(comparison) <- levels(msstats_dataprocess$ProcessedData$GROUP_ORIGINAL)
rownames(comparison) <- c("Group.A vs Group.B")

msstats_comparison <- MSstats::groupComparison(data = msstats_dataprocess, contrast.matrix = comparison)

msstats_comparison$ComparisonResult %>% View()

Mateusz Staniak

unread,
Apr 8, 2021, 6:48:46 AM4/8/21
to MSstats
Hi,


thanks for the example data, I'll see where the problem is



Kind regards
Mateusz

froehlic...@gmail.com

unread,
Apr 12, 2021, 5:39:02 AM4/12/21
to MSstats
Hi Mateusz,
Thank you very much for looking into this! 
Please let me know, if you find anything.
Is there any way, that msstats could give an error message when and why NAs are returned in this step? I realize there can probably be a plethora of different reasons, but any pointer would be super helpful there.
Best, Klemens

Mateusz Staniak

unread,
Apr 12, 2021, 5:59:14 AM4/12/21
to MSstats
Hi,


if you change the way you create comparison matrix to

> matrix(c(1, -1), nrow = 1, ncol = 2)

will it solve the problem? I  just tested that on older R version and it worked.

I can add a check for class of contrast.matrix parameter. It's hard to catch all possible errors, though, and error message are not always helpful. (That was the case here - it's way it took me some time).
I'll see what I can do.


Kind regards,
Mateusz

froehlic...@gmail.com

unread,
Apr 12, 2021, 5:14:10 PM4/12/21
to MSstats
Hi Mateusz
as.matrix() fixed the problem too.....
Thank you very much for looking into this! I am sorry to have bothered you with something so trivial ....
Best, Klemens

Reply all
Reply to author
Forward
0 new messages