Opened 2 years ago

Closed 2 years ago

#1057 closed defect (fixed)

MS Annotation: LC-MS/MS (truncated) experiment throws exceptions during annotation

Reported by: sena Owned by: dbrentw
Priority: normal Milestone: GRITS - 1.2 SR2
Component: MS annotation management Version: GRITS 1.2.x
Severity: blocker Keywords:
Cc: sena

Description

When trying to annotate the following mzxml file as an LC-MS/MS experiment exceptions are thrown and the annotation files are not generated properly. As a result, although an entry appears in the project explorer tab at the completion of GELATO wizard, the entry cannot be opened.

mzxml file is in Dropbox: https://www.dropbox.com/s/30crgyfwx36xbma/SK_gp120_Sialic-acid_reduced_10pmol-Dp4_5%2B5%2B40A_3uL_45-70%25.mzXML?dl=0

the main exception thrown: (Too many open files in system)

[ERROR] 2018-02-01 10:55:52,686 [org.grits.toolbox.ms.file.reader.impl.MzXmlReader getMinMSLevel 1065] -
java.lang.NullPointerException

at org.systemsbiology.jrap.grits.stax.MSXMLParser.rapHeader(MSXMLParser.java:245)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getMinMSLevel(MzXmlReader.java:1056)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getScanList(MzXmlReader.java:983)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getScanList(MzXmlReader.java:57)
at org.grits.toolbox.ms.annotation.gelato.GlycanStructureAnnotationLCMSMS.determineScanBounds(GlycanStructureAnnotationLCMSMS.java:54)
at org.grits.toolbox.ms.annotation.gelato.GlycanStructureAnnotation.initialize(GlycanStructureAnnotation.java:338)
at org.grits.toolbox.ms.annotation.process.GelatoWorker$1.threadStart(GelatoWorker.java:116)
at org.grits.toolbox.widgets.progress.ProgressThread.run(ProgressThread.java:27)

java.io.FileNotFoundException: /Users/sena/Desktop/Grits-Workspace/Simone-LC-MS GRITS/gp120-Nglycans/ms/2018.01.29-11.23.05.0584/SK_gp120_Sialic-acid_reduced_10pmol-Dp4_5+5+40A_3uL_45-70%.mzXML (Too many open files in system)

at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.systemsbiology.jrap.grits.stax.MSXMLParser.rapHeader(MSXMLParser.java:212)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getMinMSLevel(MzXmlReader.java:1056)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getScanList(MzXmlReader.java:983)
at org.grits.toolbox.ms.file.reader.impl.MzXmlReader.getScanList(MzXmlReader.java:57)
at org.grits.toolbox.ms.annotation.gelato.GlycanStructureAnnotationLCMSMS.determineScanBounds(GlycanStructureAnnotationLCMSMS.java:54)
at org.grits.toolbox.ms.annotation.gelato.GlycanStructureAnnotation.initialize(GlycanStructureAnnotation.java:338)
at org.grits.toolbox.ms.annotation.process.GelatoWorker$1.threadStart(GelatoWorker.java:116)
at org.grits.toolbox.widgets.progress.ProgressThread.run(ProgressThread.java:27)

Change History (7)

comment:1 Changed 2 years ago by sena

After further investigation, I figured out that this happens only when we are truncating the ms file with MSConvert. While skipping scans, the jRap code does not close the files:

public ScanHeader rapHeader(int scanNumber)
{

FileInputStream fileIN = null;
long scanOffset = -1;
try
{

fileIN = new FileInputStream(fileName);
scanOffset = getScanOffset(scanNumber);
if (scanOffset == -1)
{

return null; -----> here the fileIN should be closed

}

I don't know if we should copy the code from this jRap jar and modify it ourselves to fix the issue. But for now, we cannot run truncated mzxml files when a big number of scans are omitted (like in this LC-MS/MS file).

comment:2 Changed 2 years ago by sena

Update: it looks like we only get "too many open files" errors on Mac but not on Windows.
On Windows machine, the processing of scans is completed properly but data.xml and dataHeader.xml files were not being generated at the end of the annotation (for both Mac/Windows systems). This part has been fixed in revision [2888]

comment:3 Changed 2 years ago by sena

Summary: MS Annotation: LC-MS/MS experiment throws exceptions during annotationMS Annotation: LC-MS/MS (truncated) experiment throws exceptions during annotation

comment:4 Changed 2 years ago by Rene Ranzinger

Milestone: GRITS - 1.2 SR2GRITS - 1.2 SR3

comment:5 Changed 2 years ago by dbrentw

Potential fix in SVN revisions [2977] [2978]

comment:6 Changed 2 years ago by dbrentw

Milestone: GRITS - 1.2 SR3GRITS - 1.2 SR2
Resolution: fixed
Status: assignedreview

comment:7 Changed 2 years ago by sena

Status: reviewclosed

confirmed

Note: See TracTickets for help on using tickets.