peterblattmann / SWATH2stats

https://peterblattmann.github.io/SWATH2stats/
1 stars 1 forks source link

Issue with convert4msstats output #5

Open Matthias313 opened 3 years ago

Matthias313 commented 3 years ago

Dear Swath2stats Team,

I tried to use swath2stats in combination with MSstats as suggested in the vignette (6.2 MSstats) using the convert4msstats() function on the data.transition object, However when running the dataprocess() function from msstats i received the following error:

Error in dataProcess(MSstats.input, normalization = "equalizeMedians", : Please remove duplicate rows in the list above.

Most probably this is due to the fact that some Transitions were found at different RT or in multiple scans. I tried to summarise those Intensity values using the following two lines of code:

Test = MSstats.input %>% group_by(ProteinName, PeptideSequence, PrecursorCharge, FragmentIon, ProductCharge, IsotopeLabelType, BioReplicate, Condition, Run) %>% summarise(Intensity = sum(Intensity)) Test = Test[, c("ProteinName", "PeptideSequence", "PrecursorCharge", "FragmentIon", "ProductCharge", "IsotopeLabelType", "Intensity", "BioReplicate", "Condition", "Run")]

Using this summarized object "Test" the dataProcess() function in MSstats worked nicely.

Would it be possible to fix the convert4msstats() function so that the output can directly be used with MSstats (dataprocess() function) ?

Best regards Matthias

peterblattmann commented 3 years ago

Dear Matthias, Thank you very much for your e-mail. Could you share a reproducible example how you get this issue so that I can have a look? Thank you very much. Best regards Peter

peterblattmann commented 3 years ago

Dear Matthias,

To follow up on your issue, if I run the code below for me it works. There are quite some warnings on missing transitions but I don't get an error. So I don't really understand the issue you were having? Do you mind trying the code below and see if it works, thanks!

Kind regards

Peter

library(SWATH2stats)
data("OpenSWATH_data", package="SWATH2stats")
data("Study_design", package="SWATH2stats")
data <- sample_annotation(OpenSWATH_data, Study_design)
raw <- disaggregate(data)
MSstats.input <- convert4MSstats(raw)

library(MSstats)
QuantData <- dataProcess(MSstats.input)

sessionInfo()