Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3147

Add data source button to Track Hub webpages

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Add a button to the manual trackhub-converter page to hit the "Add Data Source" endpoint in IGB. Parameters required for the request:
      1) quickloadurl (eg. https://translate.bioviz.org/api/?hubUrl=https://raw.githubusercontent.com/mhalushka/miROme/main/UCSC/hub.txt&filePath=/) and 2) quickloadname: short label in the hubUrl file (use the hubUrl in the above link to see a short label example)
      Use the following endpoint: http://127.0.0.1:7085/igbDataSource for the request call.

        Attachments

          Issue Links

            Activity

            Hide
            karthik Karthik Raveendran added a comment - - edited

            For the manual trackhub converter page, the 'Add Data Source to IGB' button and the method has been implemented. The button appears only after the UCSC trackhub is converted and the quickload data source URL is copied from the result for the 'quickloadurl' parameter. For the 'quickloadname' parameter, the UCSC trackhub url is called and the 'shortLabel' is used. Thus, the 'add data source' endpoint URL is built.

            However, when the igbDataSource endpoint is hit, I run into an error in IGB:
            Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: genomeVersionNamePrefix is a required field.

            When sample parameters are used(like "bioviz.org" and "karthik" for quickloadurl and quickloadname respectively) right after the 'built' URL above is called, both data sources are added to IGB.

            See Nowlan Freese comments in IGBF-3131 where a list of testing issues are mentioned, Issue 2 "Invalid quickload (incorrect URL that returns HTML) "

            For public trackhub page, I assume that the same error will appear. A design for 'Add Data Source' button needs to finalized as well.

            Show
            karthik Karthik Raveendran added a comment - - edited For the manual trackhub converter page, the 'Add Data Source to IGB' button and the method has been implemented. The button appears only after the UCSC trackhub is converted and the quickload data source URL is copied from the result for the 'quickloadurl' parameter. For the 'quickloadname' parameter, the UCSC trackhub url is called and the 'shortLabel' is used. Thus, the 'add data source' endpoint URL is built. However, when the igbDataSource endpoint is hit, I run into an error in IGB: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: genomeVersionNamePrefix is a required field. When sample parameters are used(like "bioviz.org" and "karthik" for quickloadurl and quickloadname respectively) right after the 'built' URL above is called, both data sources are added to IGB. See Nowlan Freese comments in IGBF-3131 where a list of testing issues are mentioned, Issue 2 "Invalid quickload (incorrect URL that returns HTML) " For public trackhub page, I assume that the same error will appear. A design for 'Add Data Source' button needs to finalized as well.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            When the request call is made, the tail end of quickloadurl, '&filepath=/' gets cutoff and throws an error. But action works fine if the quickloadurl is http and not https. Need to investigate further.

            Show
            karthik Karthik Raveendran added a comment - - edited When the request call is made, the tail end of quickloadurl, '&filepath=/' gets cutoff and throws an error. But action works fine if the quickloadurl is http and not https. Need to investigate further.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            When a request call has been made to consume igbDatasource IGB endpoint, it is added to DataProviderManager where QuickloadDataProvider is initialized. The workflow that leads to the error after that is as follows:

            1. Within the QuickloadDataProvider initialize function, loadOptionalQuickloadFiles method is called that in turn calls loadSpeciesInfo.
            2. In loadSpeciesInfo, parseSpeciesInfo in QuickloadUtils is called and here is where the workflow has two channels for http and https
            • For http, the file does not exist and point of this part of the logic is to add "optional" quickload files. So, it gets caught (IOException from InputStream) and error message is written to log and the rest of the process is skipped. So IGB simply adds the data source as it is without loading the species files.
            • For https, however, when it tries to parse the species info it hits a non-existent endpoint as expected but the SpeciesInfo object, where species data is stored, is send the null values, it throws the error, "genomeVersionNamePrefix is a required field." and break the workflow. For context, the loadGenomeVersionSynonyms is called before the loadSpeciesInfo and it works as expected.

            IGB Files to check: QuickloadDataProvider, QuickloadUtils, SpeciesInfo

            Show
            karthik Karthik Raveendran added a comment - - edited When a request call has been made to consume igbDatasource IGB endpoint, it is added to DataProviderManager where QuickloadDataProvider is initialized. The workflow that leads to the error after that is as follows: Within the QuickloadDataProvider initialize function, loadOptionalQuickloadFiles method is called that in turn calls loadSpeciesInfo. In loadSpeciesInfo, parseSpeciesInfo in QuickloadUtils is called and here is where the workflow has two channels for http and https For http, the file does not exist and point of this part of the logic is to add "optional" quickload files. So, it gets caught (IOException from InputStream) and error message is written to log and the rest of the process is skipped. So IGB simply adds the data source as it is without loading the species files. For https, however, when it tries to parse the species info it hits a non-existent endpoint as expected but the SpeciesInfo object, where species data is stored, is send the null values, it throws the error, "genomeVersionNamePrefix is a required field." and break the workflow. For context, the loadGenomeVersionSynonyms is called before the loadSpeciesInfo and it works as expected. IGB Files to check: QuickloadDataProvider, QuickloadUtils, SpeciesInfo
            Hide
            karthik Karthik Raveendran added a comment -

            The issue can be resolved by handling special characters like "&" in trackhub url because the filePath parameter gets cutoff and needs to be included when sent to IGB. On rudimentary testing, this seems to be working fine, however, there is a CORS errors that needs to be handled.

            Show
            karthik Karthik Raveendran added a comment - The issue can be resolved by handling special characters like "&" in trackhub url because the filePath parameter gets cutoff and needs to be included when sent to IGB. On rudimentary testing, this seems to be working fine, however, there is a CORS errors that needs to be handled.
            Hide
            karthik Karthik Raveendran added a comment -

            CORS error has been handled. Cosmetic issues needs to be handled especially responsiveness of the buttons that are added and adding warning/notification modals .

            Show
            karthik Karthik Raveendran added a comment - CORS error has been handled. Cosmetic issues needs to be handled especially responsiveness of the buttons that are added and adding warning/notification modals .
            Hide
            karthik Karthik Raveendran added a comment - - edited

            The older design needs to be changed in both manual and public trackhub pages. In the manual converter page, the 'Add to IGB' button needs to go in a separate section (like the Appstore 'Install IGB' button). In the public trackhub page, the Copy URL column needs to go and the 'add data source to IGB' functionality needs to happen when the user clicks 'Open in IGB' hyperlink.

            The 'Open in IGB' functionality already runs functions to bring IGB to the front and open the genome to IGB so adding 'Add Data source' to the mix is slowing the process a little which needs a little adjustment and warning modals interfere with each other which needs to be rewired to work in harmony.

            Show
            karthik Karthik Raveendran added a comment - - edited The older design needs to be changed in both manual and public trackhub pages. In the manual converter page, the 'Add to IGB' button needs to go in a separate section (like the Appstore 'Install IGB' button). In the public trackhub page, the Copy URL column needs to go and the 'add data source to IGB' functionality needs to happen when the user clicks 'Open in IGB' hyperlink. The 'Open in IGB' functionality already runs functions to bring IGB to the front and open the genome to IGB so adding 'Add Data source' to the mix is slowing the process a little which needs a little adjustment and warning modals interfere with each other which needs to be rewired to work in harmony.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            UI has been added and the Add Data source functionality has been wired together. Commit

            Testing Protocol:
            a) Public trackhub:

            • Test if Open in IGB works correctly: Adds Data source, bring IGB forward and opens genome.
            • Test if toasts appear correctly when IGB is started and when its not.

            b) Manual Converter:

            • Test if Add button appears, functions correctly and aligned correctly.
            • Test if toasts appear correctly when IGB is started and when its not.
            Show
            karthik Karthik Raveendran added a comment - - edited UI has been added and the Add Data source functionality has been wired together. Commit Testing Protocol: a) Public trackhub: Test if Open in IGB works correctly: Adds Data source, bring IGB forward and opens genome. Test if toasts appear correctly when IGB is started and when its not. b) Manual Converter: Test if Add button appears, functions correctly and aligned correctly. Test if toasts appear correctly when IGB is started and when its not.
            Hide
            karthik Karthik Raveendran added a comment -
            Show
            karthik Karthik Raveendran added a comment - PR has also been submitted : https://bitbucket.org/lorainelab/bioviz/pull-requests/96/igbf-3147
            Hide
            ann.loraine Ann Loraine added a comment -

            Changes look good. Merging to main branch.

            Show
            ann.loraine Ann Loraine added a comment - Changes look good. Merging to main branch.
            Hide
            ann.loraine Ann Loraine added a comment -

            New code is deployed to BioViz main. Ready for testing. Must be tested using branch https://bitbucket.org/KarthikRavee91/karthikfork-igb/branch/IGBF-3131a, which has not yet been merged into the main IGB branch for 9.1.10.

            Show
            ann.loraine Ann Loraine added a comment - New code is deployed to BioViz main. Ready for testing. Must be tested using branch https://bitbucket.org/KarthikRavee91/karthikfork-igb/branch/IGBF-3131a , which has not yet been merged into the main IGB branch for 9.1.10.
            Hide
            nfreese Nowlan Freese added a comment - - edited

            a) Public trackhub:
            Click Open in IGB for ABC of cellular microRNAome.

            • Toast appeared.
            • IGB brought to front.
            • hg38 genome loaded.
            • ABC of cellular microRNAome data source added.

            While the data source was added and visible within the Data Sources tab of the Preferences window, the data source was not available via the Available Data window of the Data Access tab. However, if the user is within the correct genome when the Open in IGB button is clicked the data source does become visible in the Data Access tab. It would appear that the issue is due to IGB trying to both open a genome and add a data source at the same time. Recommend investigating this issue as part of IGBF-3131.

            b) Manual Converter
            Add the trackhub: https://raw.githubusercontent.com/Iuliana-Ionita-Laza/Colocalization_tracks/master/hub.txt and click Convert button.

            • Converted Trackhub URL appears with working copy icon.
            • Add to IGB button appears.

            Click the Add to IGB button.

            • Toast appeared.
            • Data Source added.
            • Data available via the Available Data window.

            A change needs to be made to the add data source endpoint in IGB as part of IGBF-3131. Will wait to conduct further testing until the change has been made.

            Show
            nfreese Nowlan Freese added a comment - - edited a) Public trackhub : Click Open in IGB for ABC of cellular microRNAome. Toast appeared. IGB brought to front. hg38 genome loaded. ABC of cellular microRNAome data source added. While the data source was added and visible within the Data Sources tab of the Preferences window, the data source was not available via the Available Data window of the Data Access tab. However, if the user is within the correct genome when the Open in IGB button is clicked the data source does become visible in the Data Access tab. It would appear that the issue is due to IGB trying to both open a genome and add a data source at the same time. Recommend investigating this issue as part of IGBF-3131 . b) Manual Converter Add the trackhub: https://raw.githubusercontent.com/Iuliana-Ionita-Laza/Colocalization_tracks/master/hub.txt and click Convert button. Converted Trackhub URL appears with working copy icon. Add to IGB button appears. Click the Add to IGB button. Toast appeared. Data Source added. Data available via the Available Data window. A change needs to be made to the add data source endpoint in IGB as part of IGBF-3131 . Will wait to conduct further testing until the change has been made.
            Hide
            karthik Karthik Raveendran added a comment -

            "Add Hub to IGB" and "Copy Quickload Url" buttons have been added to hub name column. Commit

            Show
            karthik Karthik Raveendran added a comment - "Add Hub to IGB" and "Copy Quickload Url" buttons have been added to hub name column. Commit
            Hide
            ann.loraine Ann Loraine added a comment -

            Deployed Karthik Raveendran's branch to bioviztest3.bioviz.org for testing in a close-to-production environment.

            Show
            ann.loraine Ann Loraine added a comment - Deployed Karthik Raveendran 's branch to bioviztest3.bioviz.org for testing in a close-to-production environment.
            Hide
            nfreese Nowlan Freese added a comment -

            Testing on bioviztest3.bioviz.org using MacOS 12.5 with Chrome and IGB master as of August 15, 2022.
            Reset IGB preferences to default and remove the .igb folder.

            a) Public trackhub:
            Click Open in IGB for Breast Cancer lncRNA.

            • Toast appeared.
            • IGB brought to front.
            • hg19 genome loaded.

            Click Add Hub to IGB.

            • Toast appeared.
            • Data source available in the Available Data window.
            • Able to load data.
            • If I click Open in IGB and then immediately click Add Hub to IGB I can still run into the issue where the data source is added but does not appear in the Available Data window. This seems to be somewhat dependent on how fast I click the buttons and how fast the genome loads in IGB. I found it very easy to click the Add Hub to IGB button again when I didn't see Data Source appear, after the genome was loaded, and the data were quickly available, so I think this approach should work well.

            Click the copy URL icon.

            • Tooltip states: "Quickload URI Copied!:
            • The URI that is copied is the IGB Add Data Source endpoint. I think this will be important for development, but may be confusing to a user if they try to copy and paste that URI into IGB as a new Data Source. Doing so will add the data source twice (one of the repositories is added from the endpoint, and is correct, the other does not work). I think we should consider either changing the tooltip text or changing the URI to be the Quickload URI and not the Add Data Source endpoint.

            More Info and Open in UCSC links worked.

            Everything else on the page appeared to load correctly.

            Ready for pull request.

            Show
            nfreese Nowlan Freese added a comment - Testing on bioviztest3.bioviz.org using MacOS 12.5 with Chrome and IGB master as of August 15, 2022. Reset IGB preferences to default and remove the .igb folder. a) Public trackhub: Click Open in IGB for Breast Cancer lncRNA. Toast appeared. IGB brought to front. hg19 genome loaded. Click Add Hub to IGB. Toast appeared. Data source available in the Available Data window. Able to load data. If I click Open in IGB and then immediately click Add Hub to IGB I can still run into the issue where the data source is added but does not appear in the Available Data window. This seems to be somewhat dependent on how fast I click the buttons and how fast the genome loads in IGB. I found it very easy to click the Add Hub to IGB button again when I didn't see Data Source appear, after the genome was loaded, and the data were quickly available, so I think this approach should work well. Click the copy URL icon. Tooltip states: "Quickload URI Copied!: The URI that is copied is the IGB Add Data Source endpoint. I think this will be important for development, but may be confusing to a user if they try to copy and paste that URI into IGB as a new Data Source. Doing so will add the data source twice (one of the repositories is added from the endpoint, and is correct, the other does not work). I think we should consider either changing the tooltip text or changing the URI to be the Quickload URI and not the Add Data Source endpoint. More Info and Open in UCSC links worked. Everything else on the page appeared to load correctly. Ready for pull request.
            Show
            karthik Karthik Raveendran added a comment - PR Submitted. https://bitbucket.org/lorainelab/bioviz/pull-requests/98
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged and deployed to BioViz main. Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Merged and deployed to BioViz main. Ready for testing.
            Hide
            ann.loraine Ann Loraine added a comment -

            Master branch is built and ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Master branch is built and ready for testing.
            Hide
            nfreese Nowlan Freese added a comment -

            Karthik Raveendran - Can you check the commits for IGBF-3147 - https://bitbucket.org/lorainelab/bioviz/commits/

            It looks like the pull request that was merged into master included a revert of the code changes?

            When I test https://www.bioviz.org/public-trackhubs.html I'm not seeing the most recent changes.

            Show
            nfreese Nowlan Freese added a comment - Karthik Raveendran - Can you check the commits for IGBF-3147 - https://bitbucket.org/lorainelab/bioviz/commits/ It looks like the pull request that was merged into master included a revert of the code changes? When I test https://www.bioviz.org/public-trackhubs.html I'm not seeing the most recent changes.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            Dr. [~aloraine] - Changes have been made to resolve the above issue and pull request submitted.

            Pull request: https://bitbucket.org/lorainelab/bioviz/pull-requests/102

            Show
            karthik Karthik Raveendran added a comment - - edited Dr. [~aloraine] - Changes have been made to resolve the above issue and pull request submitted. Pull request: https://bitbucket.org/lorainelab/bioviz/pull-requests/102
            Hide
            ann.loraine Ann Loraine added a comment -

            Changes are deployed to bioviz main site. Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Changes are deployed to bioviz main site. Ready for testing.
            Hide
            nfreese Nowlan Freese added a comment -

            Tested https://www.bioviz.org/public-trackhubs.html using MacOS 12.5 with Firefox and IGB master as of August 23, 2022.
            Reset IGB preferences to default and remove the .igb folder.

            Tested the Add Hub to IGB and Open in IGB buttons/links on the Breast Cancer lncRNA hub. The data source was successfully added to IGB and the genome was loaded, respectively. I was able to load and view data. All other links worked correctly.

            Toasts appeared when the appropriate button/link was clicked. However, I would like to improve the toast messages and have created a new ticket (IGBF-3164).

            Closing ticket.

            Show
            nfreese Nowlan Freese added a comment - Tested https://www.bioviz.org/public-trackhubs.html using MacOS 12.5 with Firefox and IGB master as of August 23, 2022. Reset IGB preferences to default and remove the .igb folder. Tested the Add Hub to IGB and Open in IGB buttons/links on the Breast Cancer lncRNA hub. The data source was successfully added to IGB and the genome was loaded, respectively. I was able to load and view data. All other links worked correctly. Toasts appeared when the appropriate button/link was clicked. However, I would like to improve the toast messages and have created a new ticket ( IGBF-3164 ). Closing ticket.

              People

              • Assignee:
                karthik Karthik Raveendran
                Reporter:
                karthik Karthik Raveendran
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: