Skip to content

java.util.NoSuchElementException during Glycan Assignment in PTMShepherd (v23.0) #2695

@cyH2001

Description

@cyH2001

Subject: Bug Report: java.util.NoSuchElementException during Glycan Assignment in PTMShepherd (v23.0)
Description
I am reporting a fatal error encountered while running O-glycan assignment with a custom glycan database (861 entries) using FragPipe v23.0. The process terminates with a java.util.NoSuchElementException during the pairwiseCompareYstatic step.

System Environment

FragPipe Version: 23.0
Workflow: glyco-O-HCD.workflow
Module: PTMShepherd (Glyco Analysis)
Data Type: timsTOF HT DDA (dataset: timsTOF_HT_DDA_X0064260102...)
Key Parameters & Configuration

Glycan FDR: 3.0% / 5.0%
Mass Error: 30.0 ppm (also tested 50.0 ppm)
Isotope Errors: [-1, 0, 1, 2, 3]
Threads: Tested both multi-threaded and single-threaded (1). Both failed with the same error.
Error Log Highlights

java.util.concurrent.ExecutionException: java.util.NoSuchElementException
at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
at edu.umich.andykong.ptmshepherd.glyco.GlycoAnalysis.glycoPSMs(GlycoAnalysis.java:128)
at edu.umich.andykong.ptmshepherd.PTMShepherd.runGlycanAssignment(PTMShepherd.java:571)
Caused by: java.util.NoSuchElementException
at java.base/java.util.TreeMap$PrivateEntryIterator.nextEntry(Unknown Source)
at java.base/java.util.TreeMap$ValueIterator.next(Unknown Source)
at edu.umich.andykong.ptmshepherd.glyco.GlycoAnalysis.pairwiseCompareYstatic(GlycoAnalysis.java:1261)
at edu.umich.andykong.ptmshepherd.glyco.GlycoAnalysis.pairwiseCompareStatic(GlycoAnalysis.java:1210)
java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Fatal error: Error in parallel processing glyco PSMs
Process 'PTMShepherd' finished, exit code: 1
Process returned non-zero exit code, stopping
Troubleshooting & Observations
I attempted to modify the ptmshepherd.cap_y_ions parameter to narrow down the cause:

Modification A: Set ptmshepherd.cap_y_ions=0,203.07937.
Result: Still failed with java.util.NoSuchElementException. This suggests the iterator is failing even with standard Y-ion masses when using this specific custom database.
Modification B: Set ptmshepherd.cap_y_ions=0.
Result: The process "hangs." The GUI status shows "Finished," but the "RUN" button remains greyed out and only "STOP" is clickable. No output files are generated, and the log stops advancing. It seems the logic enters an infinite loop or an unhandled empty state.
Other attempts: Changing PPM to 50 and reducing/expanding isotope error ranges did not bypass the error.
Expected Behavior
The glycan assignment should either complete based on the provided Y-ion list or provide a clear error message if the Y-ion list is incompatible with the glycan database.

Requested Action
It seems there is a robustness issue in GlycoAnalysis.java when handling certain Y-ion configurations or custom glycan entries, specifically where a TreeMap iterator (likely for scoring Y-ions) is called without a safety check for empty elements. Any advice on a workaround or a fix for this would be much appreciated.

log_2026-03-10_11-43-46.txt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions