cbielow / PTXQC

A Quality Control (QC) pipeline for Proteomics (PTX) results generated by MaxQuant
Other
42 stars 25 forks source link

Error in qualUniform(x$topN): Error: qualUniform() received negative or missing data #128

Closed eschen42 closed 1 year ago

eschen42 commented 1 year ago

Related issue https://github.com/cbielow/PTXQC/issues/121

I ran data today in http://ptxqc.bsc.fu-berlin.de/ without specifying advanced options and got the following error message

The following error occured while running PTXQC: Error in qualUniform(x$topN): Error: qualUniform() received negative or missing data! Please contact PTXQC's authors

I can attach specific files on request. Thank you.

cbielow commented 1 year ago

Thanks for reporting this. Yes, please attach file(s) since we do not store any data after the job finishes.

Am 23.03.2023 18:38 schrieb Arthur Eschenlauer @.***>:

Related issue #121https://github.com/cbielow/PTXQC/issues/121

I ran data today in http://ptxqc.bsc.fu-berlin.de/ without specifying advanced options and got the following error message

The following error occured while running PTXQC: Error in qualUniform(x$topN): Error: qualUniform() received negative or missing data! Please contact PTXQC's authors

I can attach specific files on request. Thank you.

— Reply to this email directly, view it on GitHubhttps://github.com/cbielow/PTXQC/issues/128, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABN27EX7NPMU52GPIFHQZ5DW5SC6TANCNFSM6AAAAAAWFQYAUQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

eschen42 commented 1 year ago

Closed by stray mouse click :(

@cbielow - which files to attach? I maximally compressed the combined/txt directory and got 654 MB, but only 25 MB attachments are allowed.

Thank you.

cbielow commented 1 year ago

You could upload to any public file hosting service such as https://wetransfer.com/ or https://www.itc.rwth-aachen.de/cms/it-center/Services/Kollaboration/~smiti/GigaMove/?mobile=1 (if you have DFN access) and share the download link here.

Am 24.03.2023 21:02 schrieb Arthur Eschenlauer @.***>:

Closed by stray mouse click :(

@cbielowhttps://github.com/cbielow - which files to attach? I maximally compressed the combined/txt directory and got 654 MB, but only 25 MB attachments are allowed.

Thank you.

— Reply to this email directly, view it on GitHubhttps://github.com/cbielow/PTXQC/issues/128#issuecomment-1483343899, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABN27EWIJKTRRZ6SA4DJKYTW5X4TBANCNFSM6AAAAAAWFQYAUQ. You are receiving this because you were mentioned.Message ID: @.***>

eschen42 commented 1 year ago

@cbielow The combined/txt folder is at https://we.tl/t-dy52G0TgIv for seven days. Thank you

eschen42 commented 1 year ago

@cbielow Will you have a chance to fetch the files before they expire?

cbielow commented 1 year ago

perfect. I got the files. Thank you. I will look at it in the next days (hopefully)

cbielow commented 1 year ago

The problem seems rooted in a MaxQuant bug: the Scan event numbers in msmsScans.txt are all negative, which is simply wrong.

It may help to switch to another MQ version and re-run the analysis. I have not seen this behaviour for MQ 1.6.17.0, but maybe yours behaves like that because its run on Linux? Not sure...

Other workarounds: disable the qcMetric_MSMSScans_TopNoverRT metric (using a yaml file) or (even more brute force) omit the msmsScans.txt from the analysis (by renaming or removing it).

I will try to find a way to recompute the scan index, but this requires releasing a new PTXQC version, which will take some time.

eschen42 commented 1 year ago

@cbielow FYI:

Using CRAN PTXQC 1.0.4 on Windows with the same Thermo files (LC-MS, combining three ion mobility ranges) but processed with different (less stringent) parameters (attached parameters.txt), resulting in many more peptides (>21,500), I got (apparently) the same error, as seen in ptxqc_fail_log.txt, the last lines of which are:

. . .
Simplifying contaminants
Simplifying reverse
Adding fc.raw.file column ... done
Starting to work on MS^2*Scans: TopN over RT ...
Error in qualUniform(x$topN) : 
  Error: qualUniform() received negative or missing data!
In addition: Warning message:
Vectorized input to `element_text()` is not officially supported.
(i) Results may be unexpected or may change in future versions of ggplot2. 

Upon request, I can upload the combined/txt directory if it would be a useful addition to identifying this issue.

cbielow commented 1 year ago

thanks. This looks like the same MQ bug on first sight. You can check by simply inspecting the Scan event number column in msmsScans.txt.

Have you tried running MaxQuant on a Windows machine or use a more recent MaxQuant? I'm afraid the MaxQuant developers will not fix bugs on old releases (or even new ones)..

cbielow commented 1 year ago

report_v1.0.14_ptxqc_bug_eschen42_txt.pdf

This is the PDF version of the report, with a fix for MaxQuants invalid scan event numbers. Is this data (see TOP-N metrics) realistic?

eschen42 commented 1 year ago

I missed your comment that most recently preceded my last comment. Oh well. I don't know how realistic the TOP-N metrics are because I am way too new at this. Thank you for the report; I will try YAML suppression to see how far it takes me. I look forward to learning how to correct for the invalid scan numbers.

Unfortunately (from my perspective) PTXQC is available in the Galaxy Toolshed only as part of the MaxQuant tool, meaning that any mitigation of this issue would either need to be built into an updated version of PTXQC or inserted in the Galaxy tool between MaxQuant and PTXQC.

The elephant in the living room is this: Why has this scan event number bug crawled to the surface now? What is it about the Thermo RAW data that precipitates this mistake by MaxQuant, and is it something that can be addressed by data processing or is it indeed something that needs to be addressed in the method that the LC-MS runs? Any speculation would be welcome! :)

eschen42 commented 1 year ago

I successfully circumvented the issue by renaming msmsScans.txt

I could not figure out what change to make in the YAML file.

Commenting out the line with

  #qcMetric_MSMSScans_TopNoverRT: 120.0

did not work.

Assigning a negative value to the order

Commenting out the line with
```yaml
  qcMetric_MSMSScans_TopNoverRT: -120.0

did not work.

In both cases, "did not work" means processing never completes after outputting the following to the R console:

... MS^2*Scans: Intensity  done
Starting to work on MS^2*Scans: TopN high ...
eschen42 commented 1 year ago

Other workarounds: disable the qcMetric_MSMSScans_TopNoverRT metric (using a yaml file) or (even more brute force) omit the msmsScans.txt from the analysis (by renaming or removing it).

@cbielow How do I edit the YAML file to suppress qcMetric_MSMSScans_TopNoverRT ?

cbielow commented 1 year ago

When PTXQC runs on a txt folder for the first time, it creates a report plus a defaulted .yaml file. Open the YAML file and assign a negative number to the metric you want to disable: image

Then you need to make sure that the YAML is actually used when running PTXQC's createReport() function. If you use the drag'n'drop script for Windows, this is done automatically. If you invoke PTXQC::createReport manually in R, then you need to pass a YAML object. See https://github.com/cbielow/PTXQC/blob/master/inst/dragNdrop/QC-dragdrop/_internal/compute_QC_report.R#L36 for code on how to load the YAML object from file and then pass it to PTXQC::createReport https://github.com/cbielow/PTXQC/blob/master/inst/dragNdrop/QC-dragdrop/_internal/compute_QC_report.R#L48

You can, of course, also copy the YAML file somewhere else and use this configuration it for all TXT folders. May be useful if you want to disable certain metrics permanently or set some other thresholds specific to your instrument etc. There is nothing specific to a YAML file which ties it to a certain TXT folder (unless you make it very specific, e.g. by specifying thresholds or contaminants which only apply to a certain experiment).