To reproduce the issue:
- Start IGB.
- Sign in to the nowlanf account on BioViz Connect.
- Navigate to /iplant/home/nowlanf/CyVerse_Webinar_doNotAlter/reads
- Click View in IGB for october5test.bedgraph (file should be public and have no associated metadata).
The issue is that when a file in BioViz Connect has no metadata (the AVUs are completely blank) IGB throws an error when it tries to decode the color for the empty color value. If the user interacts with the metadata right panel and clicks Save then the default color values should be saved and the issue would not appear in IGB.
There are two ways to go about tackling this issue:
- We add logic to BioViz Connect so that if there is no AVU for foreground or background color then a default is sent to IGB.
- We add logic to IGB to catch empty values for foreground/background color.
Here are my changes to IGB for approach number 2: https://bitbucket.org/nfreese/nowlanfork-igb/commits/12e724f37481732e5a1b23c0e436ba1e1c83321e
It may be worth implementing both changes.
11:38:38.778 ERROR c.a.i.b.BookmarkUnibrowControlServlet - Error while loading bookmark.
java.lang.NumberFormatException: Zero length string
at java.lang.Integer.decode(Integer.java:1162) ~[na:1.8.0_332]
at java.awt.Color.decode(Color.java:729) ~[na:1.8.0_332]
at com.affymetrix.igb.bookmarks.BookmarkController.forceStyleChange(BookmarkController.java:544) ~[na:na]
at com.affymetrix.igb.bookmarks.BookmarkUnibrowControlServlet$1.runInBackground(BookmarkUnibrowControlServlet.java:232) ~[na:na]
at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) [genometry-9.1.8.jar:na]
at javax.swing.SwingWorker$1.call(SwingWorker.java:295) [na:1.8.0_332]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_332]
at javax.swing.SwingWorker.run(SwingWorker.java:334) [na:1.8.0_332]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_332]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_332]
at java.lang.Thread.run(Thread.java:750) [na:1.8.0_332]