I have been investigating the issue related to the foreground and background colors not appearing correctly in IGB when sent via CyVerse metadata bridge.
The cause of the issue is that IGB Bookmarks is not capable of loading sym foreground/background colors without first loading the data. For example, the following URL includes the sym color information, but the color will never be shown as no region of the genome is specified to load (so the track is added to IGB, but no data is ever loaded).
//This URL will not show the specified sym color in IGB
http://127.0.0.1:7085/IGBControl?
version=H_sapiens_Dec_2013&
loadresidues=false&
feature_url_0=https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/Bed_HomoSapiensChr1.bed&
sym_method_0=https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/Bed_HomoSapiensChr1.bed&
sym_col_0=0x00FF00&
sym_bg_0=0xFF0000&
sym_name_0=RefSeq+Curated&
query_url=https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/Bed_HomoSapiensChr1.bed&
server_url=
If a chromosome and start/end are added to the above URL, then the specified sym colors will show correctly in IGB as the data will be loaded for that chromosome and region:
seqid=chr1&
start=0&
end=248956422&
There is currently no way to save a bookmark and include foreground/background colors without first loading some amount of data.
For example, in IGB:
Add a file to IGB via Open File... or Open URL... (can use https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/Bed_HomoSapiensChr1.bed as an example)
DO NOT click Load Data
In the Data Management Table, change the foreground/background colors
In the Bookmarks tab, create a bookmark, then export the bookmark
Reset Preferences to Default in IGB
Delete the .igb folder
Start IGB
Import bookmark
Load bookmark
The bookmark will not have the correct foreground/background color (default is blue foreground and white background). This can also be seen by Copying the bookmark as a URL and examining the URL. No sym_col or sym_bg will be included in the URL so the default colors will be selected.
Note: Neither Galaxy or BAR specify foreground/background color within the URL.
I'm guessing there is a reason for why data has to be loaded before foreground/background color properties can be applied. However, as we cannot make assumptions about the data from CyVerse, it is not possible to load data coming from CyVerse. We will need to find a workaround for specifying foreground/background color for CyVerse without having to load the data.
The CyVerse metadata bridge has been implemented with shortcomings. At the IGB loaded initially, the metadata is sent to IGB when the View In IGB button is clicked,however the foreground and background colors are not rendered then. On clicking it a second time, the colors are rendered when chromosomes are changed. The same happens when User preferences are rest. This happens because the lamda function at line 284 of BookmarkUnibrowControlServlet is skipped. The colors are not rendered when the function, BookmarkController.applyProperties(igbService, seq, parameters, feature, combos), is not rendered, which happens when IGB is initially loaded and when preferences are reset. Further investigation required in this regard.