proteomicslfq icon indicating copy to clipboard operation
proteomicslfq copied to clipboard

Errors in MultiQC ("quantms" module)

Open hendrikweisser opened this issue 2 years ago • 2 comments

I've encountered two errors in the "quantms" module for MultiQC during the "pmultiqc" step:

  1. If the experimental design file ("--input" parameter) uses the one-table OpenMS format (see https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/classOpenMS_1_1ExperimentalDesign.html#details), I get the error below. The reason seems to be that the "Sample" column in the experimental design table is expected by "quantms", but is not used in the one-table format. (If I use the two-tables format, the error goes away.)
  Parsing out csv file...
  ╭──────────────── Oops! The 'quantms' MultiQC module broke... ─────────────────╮
  │ Please copy this log and report it at                                        │
  │ https://github.com/ewels/MultiQC/issues                                      │
  │ Please attach a file that triggers the error. The last file found was:       │
  │ ./proteomicslfq/out.mzTab                                                    │
  │                                                                              │
  │ Traceback (most recent call last):                                           │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     return self._engine.get_loc(casted_key)                                  │
  │   File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine │
  │   File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine │
  │   File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs │
  │   File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs │
  │ KeyError: 'Sample'                                                           │
  │                                                                              │
  │ The above exception was the direct cause of the following exception:         │
  │                                                                              │
  │ Traceback (most recent call last):                                           │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     output = mod()                                                           │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     self.parse_out_csv()                                                     │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     Sample = list(exp_data[exp_data['Spectra_Filepath'] == i]['Sample'])[0]  │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     indexer = self.columns.get_loc(key)                                      │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     raise KeyError(key) from err                                             │
  │ KeyError: 'Sample'                                                           │
  │                                                                              │
  ╰──────────────────────────────────────────────────────────────────────────────╯
  1. If both Comet and MS-GF+ are used as search engines ("--search_engines comet,msgf"), with results combined using ConsensusID, I get the error below. The reason seems to be that "quantms" checks for the presence of "msgf" or "comet" in the names of input idXML files, but in my case the files are named "..._consensus_fdr_filter.idXML". As a consequence the mzML_name variable is not initialised in the Python code (see https://github.com/bigbio/pmultiqc/blob/main/pmultiqc/modules/quantms/quantms.py#L1154-L1175).
  Parsing 20220223d_JR_METTL1_SILAC_SST_01_consensus_fdr_filter.idXML...
  ╭──────────────── Oops! The 'quantms' MultiQC module broke... ─────────────────╮
  │ Please copy this log and report it at                                        │
  │ https://github.com/ewels/MultiQC/issues                                      │
  │ Please attach a file that triggers the error. The last file found was:       │
  │ ./proteomicslfq/out.mzTab                                                    │
  │                                                                              │
  │ Traceback (most recent call last):                                           │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     output = mod()                                                           │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     self.parse_mzml_idx()                                                    │
  │   File "/opt/conda/envs/nf-core-proteomicslfq-1.1.0dev/lib/python3.9/site-pa │
  │     mzml_table[mzML_name]['Final result of spectra'] = self.mL_spec_ident_fi │
  │ UnboundLocalError: local variable 'mzML_name' referenced before assignment   │
  │                                                                              │
  ╰──────────────────────────────────────────────────────────────────────────────╯

hendrikweisser avatar Mar 28 '22 12:03 hendrikweisser