nf-core / quantms

Quantitative mass spectrometry workflow. Currently supports proteomics experiments with complex experimental designs for DDA-LFQ, DDA-Isobaric and DIA-LFQ quantification.
https://nf-co.re/quantms
MIT License
31 stars 0 forks source link

proteomicsLFQ removes features with few measurements from MSstats input #102

Closed Roman-Si closed 1 year ago

Roman-Si commented 1 year ago

Description of the bug

I run quantms v1.1.1 for a DDA LFQ experiment with the option "msstatslfq_removeFewMeasurements": false to keep features with 2 measurements but proteomicsLFQ removes them from the *_msstats_in.csv" file anyway. I want to keep features with 2 measurements since I have only 3 replicates per condition in this experiment.

The msstats.log (attached) says both that:

I tried to export the sdrf_openms_design_msstats_in_comparisons.csv into MSstats to ensure these features are not removed but noticed that proteomicsLFQ has already removed them. data <- read.csv("proteomicslfq/sdrf_openms_design_msstatsin.csv", header = TRUE, sep = ',') data <- data %>% filter(!grepl('CONTAMINANT', ProteinName)) data_msstats <- OpenMStoMSstatsFormat(data, useUniquePeptide = TRUE, removeFewMeasurements=FALSE, removeProtein_with1Feature = FALSE, summaryforMultipleRows = max, use_log_file = FALSE) data_msstats %>% group_by(PeptideSequence, PrecursorCharge) %>% summarise(RunCount = sum(is.na(Intensity))) %>% ungroup() %>% count(RunCount) %>% mutate(Frequency = n / sum(n)) RunCount n Frequency

1 3 106 0.0484 2 4 368 0.168 3 5 639 0.292 4 6 1077 0.492 ![multiQC](https://github.com/nf-core/quantms/assets/53473219/405c6aa1-83b9-4099-b433-1ec5fe305673) [msstats.log](https://github.com/nf-core/quantms/files/11585555/msstats.log) ### Command used and terminal output _No response_ ### Relevant files _No response_ ### System information Nextflow version 22.10.6 Hardware Desktop Executor local Container engine: Docker OS Linux Version of nf-core/quantms 1.1.1
Roman-Si commented 1 year ago

I installed MSstatsconverter and rerun it using the consensusXML and the openms_desing.tsv and produced the same output so I guess it is the default behavior of MSstatsconverter.

Roman-Si commented 1 year ago

The MSstats functions are responsible for the removal of these features so I will close this issue.