nf-core/quantms

proteomicsLFQ removes features with few measurements from MSstats input

Roman-Si opened this issue · 2 comments

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:

  • Features with less than 3 measurements across runs will be kept.
    and that
    INFO [2023-05-26 10:45:53] ** Features with one or two measurements across runs are removed.

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_msstats_in.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
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

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.

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