Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eschen42 opened this issue Mar 23, 2023 · 14 comments

Comments

@eschen42
Copy link

Related issue #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
Copy link
Owner

cbielow commented Mar 24, 2023 via email

@eschen42 eschen42 reopened this Mar 24, 2023
@eschen42
Copy link
Author

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
Copy link
Owner

cbielow commented Mar 25, 2023 via email

@eschen42
Copy link
Author

eschen42 commented Mar 27, 2023

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

@eschen42
Copy link
Author

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

@cbielow
Copy link
Owner

cbielow commented Mar 31, 2023

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

@cbielow
Copy link
Owner

cbielow commented Apr 3, 2023

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
Copy link
Author

eschen42 commented Apr 3, 2023

@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
Copy link
Owner

cbielow commented Apr 4, 2023

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
Copy link
Owner

cbielow commented Apr 4, 2023

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
Copy link
Author

eschen42 commented Apr 4, 2023

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
Copy link
Author

eschen42 commented Apr 4, 2023

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
Copy link
Author

eschen42 commented Apr 5, 2023

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
Copy link
Owner

cbielow commented Apr 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants