Details
-
Type:
Improvement
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 9.0.2 Minor Release
-
Labels:
-
Story Points:0.5
-
Sprint:B - Summer 2018, Summer 2018 Part 2, Summer 2018 Part 3, Fall 2018 1, Fall 2018 Sprint 2
Description
IGB has a REST API that allows users to control the application. We are using this to enable users to load data from external servers by clicking links that then get forwarded to a JavaScript "bridge" program running on BioViz.org.
For example, here is a link from the BAR Web site. Note that it refers to a Web page on BioViz that contains JavaScript code that then tries to open a link on localhost, where IGB is running. IGB contains a build-in Web server that listens on a port for requests.
Note that the "sym_name" parameter is supposed to specify track label.
However, it does not appear to be working correctly.
For example,
Should result in a new track appearing in IGB with FOOBARBAZ as the track label.
This should be fixed so that IGB respects the given parameters.
Attachments
- Error1287Jira.PNG
- 99 kB
- test.html
- 3 kB
Issue Links
- relates to
-
IGBF-1353 Optimize IGB Javascript bridge code
-
- Closed
-
Activity
This is a bookmark url converted as a rest API which changes the track name according to sym_name_0:
http://bioviz.org/bar.html?
version=A_thaliana_Jun_2009&
seqid=Chr1&
start=15084200&
end=15084313&
loadresidues=false&
create=2018%2F06%2F14+16%3A15%3A58&
modified=2018%2F06%2F14+16%3A15%3A58&
feature_url_0=http%3A%2F%2Figbquickload.org%2Fquickload%2FA_thaliana_Jun_2009%2FAraport11.bed.gz&
sym_method_0=http%3A%2F%2Figbquickload.org%2Fquickload%2FA_thaliana_Jun_2009%2FAraport11.bed.gz&
sym_ypos_0=0&
sym_yheight_0=50&
sym_col_0=0x000000&
sym_bg_0=0xFFFFFF&
sym_name_0=FOOBARFOO&
query_url=http%3A%2F%2Figbquickload.org%2Fquickload%2FA_thaliana_Jun_2009%2FAraport11.bed.gz&
server_url=http%3A%2F%2Figbquickload.org%2Fquickload%2F
The URL's mentioned in this ticket use the file name and not sym_name_0.
Need a review for the branch https://bitbucket.org/kkorey/kkorey-igb/branch/IGBF-1287-sym-name
Thanks.
You may not have seen Dr. Loraine's comment in the import statements:
"Please observe IGB code convention of explicitly importing packages rather than using wild cards, e.g., import foo.bar.* "
This line: (currently line ~324)
" gFeatures.add(getFeature(igbService, genomeVersion, dataProivders.get
, queryUrl));"
This looks like a formatting change rather than a code change.
Be sure to leave spaces after commas.
It looks like in the method "directlyLoadFile" the variable "fileName" is now not used.
Trying to see... If the data provider IS an instance of a LocalDataProvider, how will the system know what name to use for it?
I didn't quite follow the changes in the "directlyLoadUrls" method.
In doing a functional review...
I worry this might have made the sym_name_0 required.
According to the bookmark parameters documentation
https://wiki.transvar.org/display/igbdevelopers/Bookmark+Properties
Giving a track a human-readable name (sym_name_0 parameter) is optional.
This bookmark creates a track:
http://bioviz.org/bar.html?version=Arabidopsis_thaliana_TAIR10&sym_name_0=Test1&query_url=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&server_url=bar
This bookmark for the same file just hangs:
http://bioviz.org/bar.html?version=Arabidopsis_thaliana_TAIR10&query_url=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&server_url=bar
The difference is the parameter: sym_name_0=Test1
I tried this again on a build from master. Both bookmarks work.
Functional review for local file...
I loaded a local file, and make a bookmark and selected position and data.
I removed that file.
I clicked the bookmark.
Branch build hangs.
I built from master, IGB follows the bookmark.
I think it would be best to consider a new approach for this issue.
It may be beneficial to review this documentation:
https://wiki.transvar.org/display/igbdevelopers/Bookmark+Properties
I am moving this back to todo.
I think I just need to handle the case where sym_name_0 is missing from URL.
If sym_name is not present, then I will make use of file name as a track name.
The Changes are made and NPE is handled.
Please review,
https://bitbucket.org/kkorey/kkorey-igb/branch/IGBF-1287-sym-name
Error detected:
1)System hangs while loading data from accepted_hits.bam file (Size might be large). This is seen in master branch too. Do we have any solution to this?
2)Error in loading bookmarks for the local files. As Ivory pointed out in the above comments,
If we book mark an area of locally loaded file and delete the file. Bookmarked area doesn't load on selection of bookmark from Bookmarks tab. This behavior is seen only in this branch and not in master.
Name in the "Data Management Table" is changed as per the sym_name parameter.If sym_name parameter is not given in the URL then it takes file name as Track name. So that fix works fine.
Reassigning it to Kiran Korey for fixing the above introduced bug.
Sneha Ramesh Watharkar Can you check the issue two now. I think it should be resolved.
Kiran Korey: Issue 2 still persists. Please fix it. I am assigning back to you.
Sneha Ramesh Watharkar Can you please give me the steps to reproduce the issue?
After testing, I could see that Error 2 is fixed. Now the data loads when the bookmark is clicked.
On a completely different note,
I found out a bug in bookmarks.
Steps to reproduce:
Select A thaliana genome.
Araport 11 is default loaded. Bookmark a region. lets call it B1.
Now load local bed file using File -> Open File. Bookmark a region of this dataset. Say B2 .
Now close or uncheck the local file dataset.
Click on Bookmark of Araport 11 i.e B1 from bookmarks tab.
Now you can see that local file dataset is loaded which is wrong!!
We have clicked bookmark of one dataset which is already loaded, but it loads dataset of other one too!
However, this issue is not introduced in this branch because I can see the same behavior in master.
So the fix works fine.
Assigning it to Kiran Korey.
To test this issue please use the below link, you can remove the sym_name parameter or change it to verify different cases.
The previous links in the issue will no longer work as there were some changes made to the BioViz Web site (bar.html and bar.js) and also annots.xml of http://lorainelab-quickload.scidas.org/bar/A_thaliana_Jun_2009/
BookmarkHTTPRequestHandler
invokes
BookmarkUnibrowControllerServlet
See: goToBookmark - used by endpoints:
Also, we have;
Dr. Loraine –
I don't know how to interpret that last comment... is that added instructions for testing? or a tip for figuring out a problem? ... ?
I got the last master branch, did a clean and build, ran IGB.
When I follow each of those last three links I get:
- http://localhost:7085/IGBControl -->
"This page isn’t working
localhost didn’t send any data.
ERR_EMPTY_RESPONSE" - http://localhost:7085/IgbGalaxyDataView -->
"Invalid Request!" - http://127.0.0.1:7085/igbStatusCheck -->
var igbIsRunning = true
Doing a functional review:
Between each test, remove the track and return to the home screen by hitting the "species" link.
I should be able to click this link and see the A thaliana genome, and a track called "FOOBARBAZ":
http://localhost:7085/IGBControl?server_url=kiki&version=Arabidopsis_thaliana_TAIR10&feature_url_0=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&query_url=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&sym_name_0=FOOBARBAZ
--> Good!
I should be able to follow this link (modified from above) and the track will be named based on its file name (accepted_hits.bam):
http://localhost:7085/IGBControl?server_url=kiki&version=Arabidopsis_thaliana_TAIR10&feature_url_0=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&query_url=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam
--> Good!
I should be able to follow this link (modified from above) and the track will be named "newName":
http://localhost:7085/IGBControl?server_url=kiki&sym_name_0=newName&version=Arabidopsis_thaliana_TAIR10&feature_url_0=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam&query_url=http://s3.amazonaws.com/iplant-cdn/iplant/home/araport/rnaseq_bam/aerial/ERR274310/accepted_hits.bam
--> Good!
In terms of the initial issue description, this looks great!
Checking to make sure local file bookmarks are still good:
(I'm including these links for future inspection. Since they are for local files, they will only work on my machine.)
--> that link seems to be working fine!
--> The sym_name argument is respected! (sym_name_1=MyLocalFile+with+C.+sabeus+genes) Good!
Lastly, local file, with no sym_name arg:
http://localhost:7085/IGBControl?version=C_sabeus_Mar_2014&seqid=chr8&start=97021529&end=97021597&loadresidues=false&create=2018%2F09%2F17+13%3A20%3A04&modified=2018%2F09%2F17+13%3A20%3A04&feature_url_0=http%3A%2F%2F18.222.191.240%2FQuickload_IGBF-1401_C.sabaeus%2FC_sabeus_Mar_2014%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&sym_method_0=http%3A%2F%2F18.222.191.240%2FQuickload_IGBF-1401_C.sabaeus%2FC_sabeus_Mar_2014%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&sym_ypos_0=0&sym_yheight_0=50&sym_col_0=0x000000&sym_bg_0=0xFFFFFF&sym_name_0=C.+sabeus+genes&feature_url_1=file%3A%2FUsers%2Fivory%2FDesktop%2FlocalQuickloadTestSet%2FQuickload_C.sabaeus%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&sym_method_1=file%3A%2FUsers%2Fivory%2FDesktop%2FlocalQuickloadTestSet%2FQuickload_C.sabaeus%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&sym_ypos_1=0&sym_yheight_1=50&sym_col_1=0x0247FE&sym_bg_1=0xFFFFFF&query_url=http%3A%2F%2F18.222.191.240%2FQuickload_IGBF-1401_C.sabaeus%2FC_sabeus_Mar_2014%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&query_url=file%3A%2FUsers%2Fivory%2FDesktop%2FlocalQuickloadTestSet%2FQuickload_C.sabaeus%2FC_sabeus_Mar_2014.mRNAs_withDesc.bed.gz&server_url=http%3A%2F%2F18.222.191.240%2FQuickload_IGBF-1401_C.sabaeus%2F&server_url=
--> the url works! with no sym_name arugment, the track is added with the file path as the name.
Its a little odd to use the entire file path. When I just add a file directly, the track is named based on the file name, not the full path.
A quick regression test with 9.0.1... 9.0.1 also uses the entire file path.
I think everything I know to check looks good here. : )
I am moving this to done and reassigning it to Kiran so records show that he tackled the issue.
The REST API is closely related to IGB's bookmark syntax.
Review what the User's guide says about location and location+data bookmarks.
Note that you can right-click a bookmark in IGB and choose option "copy bookmark as URL".
You can also see the bookmark parameters by click "Details" in the Bookmarks tab.