BaderLab / EnrichmentMapApp

The EnrichmentMap Cytoscape App allows you to visualize the results of gene-set enrichment as a network.
http://apps.cytoscape.org/apps/enrichmentmap
GNU Lesser General Public License v2.1
31 stars 12 forks source link

index 1 out of bounds for length 1 #524

Closed mikekucera closed 12 months ago

mikekucera commented 1 year ago

If there's a bad line in an enrichment file this happens...

Screenshot 2023-07-19 at 11 10 25 AM

If its just a blank line then it should be ignored. If its actually a badly formatted line then give the user a better error message!

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at org.baderlab.csplugins.enrichmentmap.parsers.ParseGenericEnrichmentResults.parse(ParseGenericEnrichmentResults.java:79)
    at org.baderlab.csplugins.enrichmentmap.parsers.ParseGenericEnrichmentResults.run(ParseGenericEnrichmentResults.java:34)
    at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.innerRun(JDialogTaskManager.java:337)
    at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(JDialogTaskManager.java:352)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
mikekucera commented 12 months ago

The error message now reports the file and line number where the parsing error occurred. Also blank lines are skipped so if the file ends with a blank line that's now ignored.

Screenshot 2023-07-25 at 5 17 00 PM