PRIDE-Archive / pride-inspector

PRIDE Inspector is a Java desktop application to visualise and Quality Assessment on Mass Spectrometry data and Proteomics
16 stars 19 forks source link

Unable to open peak files with BOMs set #51

Closed Tobias-Ternent closed 9 years ago

Tobias-Ternent commented 9 years ago

PRIDE Inspector is unable to open or process a peak file which has a byte order mark (BOM) set in the file. This means the peak file cannot be visualised on its own, or added as a related spectra file for an mzIdentML file.

Thought I was going a bit crazy there for a while. Can be fixed by updating the input file to remove the BOM, but this isn't ideal.

The exception from the bottom right of Inspector:

Failed to retrieve spectrum related data uk.ac.ebi.pride.utilities.data.controller.DataAccessException: Exception while trying to read Spectrum using Spectrum ID

And in the log file:

2015-03-25 12:07:12,162 ERROR [pool-2-thread-1] u.a.e.p.u.d.c.i.C.PeakControllerImpl [PeakControllerImpl.java:174] Get spectrum by id uk.ac.ebi.pride.tools.jmzreader.JMzReaderException: MS2 query must start with 'BEGIN IONS' at uk.ac.ebi.pride.tools.mgf_parser.model.Ms2Query.(Ms2Query.java:123) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.loadIndexedQueryFromFile(MgfFile.java:809) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.loadIndexedQueryFromFile(MgfFile.java:840) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getMs2Query(MgfFile.java:779) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getSpectrumById(MgfFile.java:1178) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.utilities.data.io.file.PeakUnmarshallerAdaptor.getSpectrumById(PeakUnmarshallerAdaptor.java:42) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.PeakControllerImpl.getSpectrumById(PeakControllerImpl.java:168) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.CachedDataAccessController.getSpectrumById(CachedDataAccessController.java:154) [ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.AbstractDataAccessController.getSpectrumMsLevel(AbstractDataAccessController.java:222) [ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.CachedDataAccessController.getSpectrumMsLevel(CachedDataAccessController.java:268) [ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.RetrieveSpectrumTableTask.retrieve(RetrieveSpectrumTableTask.java:104) [pride-inspector-2.5.0.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.RetrieveSpectrumTableTask.retrieve(RetrieveSpectrumTableTask.java:25) [pride-inspector-2.5.0.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.AbstractDataAccessTask.doInBackground(AbstractDataAccessTask.java:47) [pride-inspector-2.5.0.jar:na] at javax.swing.SwingWorker$1.call(Unknown Source) [na:1.7.0_75] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_75] at javax.swing.SwingWorker.run(Unknown Source) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_75] at java.lang.Thread.run(Unknown Source) [na:1.7.0_75] 2015-03-25 12:07:12,163 ERROR [pool-2-thread-1] u.a.e.p.t.g.t.i.RetrieveSpectrumTableTask [RetrieveSpectrumTableTask.java:132] Failed to retrieve spectrum related data uk.ac.ebi.pride.utilities.data.controller.DataAccessException: Exception while trying to read Spectrum using Spectrum ID at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.PeakControllerImpl.getSpectrumById(PeakControllerImpl.java:175) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.CachedDataAccessController.getSpectrumById(CachedDataAccessController.java:154) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.AbstractDataAccessController.getSpectrumMsLevel(AbstractDataAccessController.java:222) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.CachedDataAccessController.getSpectrumMsLevel(CachedDataAccessController.java:268) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.RetrieveSpectrumTableTask.retrieve(RetrieveSpectrumTableTask.java:104) [pride-inspector-2.5.0.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.RetrieveSpectrumTableTask.retrieve(RetrieveSpectrumTableTask.java:25) [pride-inspector-2.5.0.jar:na] at uk.ac.ebi.pride.toolsuite.gui.task.impl.AbstractDataAccessTask.doInBackground(AbstractDataAccessTask.java:47) [pride-inspector-2.5.0.jar:na] at javax.swing.SwingWorker$1.call(Unknown Source) [na:1.7.0_75] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_75] at javax.swing.SwingWorker.run(Unknown Source) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_75] at java.lang.Thread.run(Unknown Source) [na:1.7.0_75] Caused by: uk.ac.ebi.pride.tools.jmzreader.JMzReaderException: MS2 query must start with 'BEGIN IONS' at uk.ac.ebi.pride.tools.mgf_parser.model.Ms2Query.(Ms2Query.java:123) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.loadIndexedQueryFromFile(MgfFile.java:809) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.loadIndexedQueryFromFile(MgfFile.java:840) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getMs2Query(MgfFile.java:779) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getSpectrumById(MgfFile.java:1178) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.utilities.data.io.file.PeakUnmarshallerAdaptor.getSpectrumById(PeakUnmarshallerAdaptor.java:42) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.PeakControllerImpl.getSpectrumById(PeakControllerImpl.java:168) ~[ms-data-core-api-2.0.3.jar:na] ... 12 common frames omitted at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getMs2Query(MgfFile.java:779) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.tools.mgf_parser.MgfFile.getSpectrumById(MgfFile.java:1178) ~[mgf-parser-1.2.9.jar:na] at uk.ac.ebi.pride.utilities.data.io.file.PeakUnmarshallerAdaptor.getSpectrumById(PeakUnmarshallerAdaptor.java:42) ~[ms-data-core-api-2.0.3.jar:na] at uk.ac.ebi.pride.utilities.data.controller.impl.ControllerImpl.PeakControllerImpl.getSpectrumById(PeakControllerImpl.java:168) ~[ms-data-core-api-2.0.3.jar:na] ... 12 common frames omitted

ypriverol commented 9 years ago

@Tobias-Ternent can you provide the example files one mzidentml and the corresponding mgf.

Tobias-Ternent commented 9 years ago

@ypriverol Example mgf with BOM: https://drive.google.com/file/d/0B0sNAtPF372ZSFhXTm1XVWRzLWs/view?usp=sharing Example mgf without BOM: https://drive.google.com/file/d/0B0sNAtPF372Za24xYkw0cHIyX2s/view?usp=sharing

ypriverol commented 9 years ago

Done