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

Order of data sources in Available Datasets section of Data Access tab

    Details

    • Sprint:
      B - Summer 2018

      Description

      Investigate whether ordering of data providers in IGB preferences JSON file affects their top-to-bottom order in the IGB Available Data Sets section of Data Access tab.

      To-Do:

      • Update tests in Preferences module to ensure tests do not fail due to trivial reasons such as changing order of data providers in the preferences file.
      • Check if order of data sources in Preferences JSON file dictates order in which they appear in Data Access tab. If yes, place new RNA-Seq and BAR data sources above IGB Quickload.

        Attachments

          Issue Links

            Activity

            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited

            Methods tried:
            Interchanging of Load priorities were not changing the load sequence in both Data access Tab and Preferences table.
            Change in JSON sequence changed the order but behavior was not consistent
            Ex: If RNA-Seq was first element in JSON then it would load before IGB Quickload but if Blueberry is first element, it would not load first so the behavior was inconsistent.
            After analyzing, I understood that loadPriority of value "2" was missing. Load priority was 0, 1 ,3, 4, 5...
            Issue was fixed when I added load priorities in proper sequence.
            Now data providers load according to their Load priority irrespective of their placement in JSON file.

            Also fixed test case associated with the same.
            Branch link: https://bitbucket.org/swathark/integrated-genome-browser/branch/IGBF-1221-DPOrder

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited Methods tried: Interchanging of Load priorities were not changing the load sequence in both Data access Tab and Preferences table. Change in JSON sequence changed the order but behavior was not consistent Ex: If RNA-Seq was first element in JSON then it would load before IGB Quickload but if Blueberry is first element, it would not load first so the behavior was inconsistent. After analyzing, I understood that loadPriority of value "2" was missing. Load priority was 0, 1 ,3, 4, 5... Issue was fixed when I added load priorities in proper sequence. Now data providers load according to their Load priority irrespective of their placement in JSON file. Also fixed test case associated with the same. Branch link: https://bitbucket.org/swathark/integrated-genome-browser/branch/IGBF-1221-DPOrder
            Hide
            ann.loraine Ann Loraine added a comment -

            Please explain:

            How does data provider order in the preferences JSON file affect top-to-bottom order in the IGB Available Data Sets section of Data Access tab?

            Show
            ann.loraine Ann Loraine added a comment - Please explain: How does data provider order in the preferences JSON file affect top-to-bottom order in the IGB Available Data Sets section of Data Access tab?
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            We just reviewed our tests to be sure.

            The order of the data provider nodes in the file igbDefaultPrefs.json has no affect on the order of the data providers in IGB.
            The order of the data provider nodes in the preferences file (com.affymetrix.igb.plist) has no affect on the order of the data providers in IGB.

            In IGB, data providers are displayed in Available Data panel, and in the Data Sources table in the preferences window.
            In both cases, the order of the data providers is dictated by their load priority.
            Note: The order may be inconsistent when multiple data providers have the same load priority. This issue is produced when a user adds data providers. Any time the user adds a data provider, it is given a load priority of -1. See issue IGBF-1225.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - We just reviewed our tests to be sure. The order of the data provider nodes in the file igbDefaultPrefs.json has no affect on the order of the data providers in IGB. The order of the data provider nodes in the preferences file (com.affymetrix.igb.plist) has no affect on the order of the data providers in IGB. In IGB, data providers are displayed in Available Data panel, and in the Data Sources table in the preferences window. In both cases, the order of the data providers is dictated by their load priority. Note: The order may be inconsistent when multiple data providers have the same load priority. This issue is produced when a user adds data providers. Any time the user adds a data provider, it is given a load priority of -1. See issue IGBF-1225 .
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            To extend from Sneha's email...

            When the user adds a new data provider, it gets a load priority of -1 and it appears at the top of the list because -1 < 0.
            When it is moved up and down the table, it swaps its priority with the data provider of current position.

            As mentioned in IGBF-1220 and IGBF-1225, problems arise when additional data providers are added by the user because they are all given load priority of -1. When multiple data providers have the same load priority, the swap has no affect.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - To extend from Sneha's email... When the user adds a new data provider, it gets a load priority of -1 and it appears at the top of the list because -1 < 0. When it is moved up and down the table, it swaps its priority with the data provider of current position. As mentioned in IGBF-1220 and IGBF-1225 , problems arise when additional data providers are added by the user because they are all given load priority of -1. When multiple data providers have the same load priority, the swap has no affect.
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited

            I have completed To-do part mentioned above for this issue i.e
            – Fixed the associated test case which was failing due to re-ordering (manual) of data providers in igbDefaultPrefs.json.
            – Changed the data provider sequence so that RNA-Seq loads first, BAR loads second followed by IGB Quickload. (Achieved this by changing load priorities of the data providers)

            Also analysed that order of data providers in igbDefaultPrefs.json doesn't impact the order of loading of data providers. Loading takes place in the order of their load priorities.

            Branch link: https://bitbucket.org/swathark/integrated-genome-browser/branch/IGBF-1221-DPOrder

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited I have completed To-do part mentioned above for this issue i.e – Fixed the associated test case which was failing due to re-ordering (manual) of data providers in igbDefaultPrefs.json. – Changed the data provider sequence so that RNA-Seq loads first, BAR loads second followed by IGB Quickload. (Achieved this by changing load priorities of the data providers) Also analysed that order of data providers in igbDefaultPrefs.json doesn't impact the order of loading of data providers. Loading takes place in the order of their load priorities. Branch link: https://bitbucket.org/swathark/integrated-genome-browser/branch/IGBF-1221-DPOrder
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            I am grabbing this for first level review.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - I am grabbing this for first level review.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment - - edited

            In this file:
            core/igb-preferences/src/test/resources/igbDefaultPrefs.json

            I think ordering the nodes within the file to match the load priority is a good choice. --good job!
            I think making all data providers have consecutive load priorities (no skipped numbers) is a good choice. --good job!

            ----------

            In this file:
            core/igb-preferences/src/test/java/com/lorainelab/igb/preferences/IgbPreferencesParseTest.java

            Why did the package name need to change?
            When I look at the master branch, Netbeans highlights it because the package name in the file (org.lorain...) doesn't match the package its in (com.lorainelab...).
            But the package it is testing is called "org.lorainelab...".
            Would it make more sense to change the package name to match the file and the other package?
            Do the two packages need to match? The project was able to build, so it may not matter. Might just be a best-practice thing.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - - edited In this file: core/igb-preferences/src/test/resources/igbDefaultPrefs.json I think ordering the nodes within the file to match the load priority is a good choice. --good job! I think making all data providers have consecutive load priorities (no skipped numbers) is a good choice. --good job! ---------- In this file: core/igb-preferences/src/test/java/com/lorainelab/igb/preferences/IgbPreferencesParseTest.java Why did the package name need to change? When I look at the master branch, Netbeans highlights it because the package name in the file (org.lorain...) doesn't match the package its in (com.lorainelab...). But the package it is testing is called "org.lorainelab...". Would it make more sense to change the package name to match the file and the other package? Do the two packages need to match? The project was able to build, so it may not matter. Might just be a best-practice thing.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            We could stand to improve this test. With this new test, we don't really know if the prefs are being read in correctly, just that its reading something, and it got at least one something. We should consider adding something like:

            String aName = prefs.getDataProviders().get(0).getName()
            assertTrue(!Strings.isNullOrEmpty( aName ) )

            int loadPriority = prefs.getDataProviders().get(0).getLoadPriority()
            assertTrue(loadPriority instanceof Integer)

            Then we would know at least the first one had at least some symptom of being the right data type.
            But at least for now, this modified test looks fine.

            Digging into the tests here is outside the scope of this issue.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - We could stand to improve this test. With this new test, we don't really know if the prefs are being read in correctly, just that its reading something, and it got at least one something. We should consider adding something like: String aName = prefs.getDataProviders().get(0).getName() assertTrue(!Strings.isNullOrEmpty( aName ) ) int loadPriority = prefs.getDataProviders().get(0).getLoadPriority() assertTrue(loadPriority instanceof Integer) Then we would know at least the first one had at least some symptom of being the right data type. But at least for now, this modified test looks fine. Digging into the tests here is outside the scope of this issue.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            Sneha, I emailed you a note about doing a git rebase.
            Please review that and the notes above and make what changes you see fit before passing the issue to the next 1st level reviewer.
            (I think we are still doing 2-layers of 1st level review).

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - Sneha, I emailed you a note about doing a git rebase. Please review that and the notes above and make what changes you see fit before passing the issue to the next 1st level reviewer. (I think we are still doing 2-layers of 1st level review).
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment -

            Yes, I liked the idea of modifying the test case in the way Ivory mentioned. Its more clearer and specific. I will change the test case.
            Package name was throwing error. Packages are meant for separation. Test file is in com.lorainelab... but it had package name as org.lorain.. So i changed it to the right package it belonged to.

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - Yes, I liked the idea of modifying the test case in the way Ivory mentioned. Its more clearer and specific. I will change the test case. Package name was throwing error. Packages are meant for separation. Test file is in com.lorainelab... but it had package name as org.lorain.. So i changed it to the right package it belonged to.
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment -

            Fixed Test case as per the suggestions given by Ivory in First level review.
            Moving the issue to "First level review" column.

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - Fixed Test case as per the suggestions given by Ivory in First level review. Moving the issue to "First level review" column.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            Tested using the IGB-master.dmg downloaded from bitbucket main master...
            After reseting preferences, the default data providers appear in this order:
            IGB Quickload
            RNA-Seq
            Bio-analytic Resource
            (I think that's wrong)

            I also downloaded the latest version of master (with this branch merged in) and when I run it the data providers appear in the correct order.
            This baffles me.

            The test seem to work. The build fails when I make bad changes to the igbDefaultPrefs.json file.
            I'm happy with the code, I'm just baffled by the installer producing a different result.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - Tested using the IGB-master.dmg downloaded from bitbucket main master... After reseting preferences, the default data providers appear in this order: IGB Quickload RNA-Seq Bio-analytic Resource (I think that's wrong) I also downloaded the latest version of master (with this branch merged in) and when I run it the data providers appear in the correct order. This baffles me. The test seem to work. The build fails when I make bad changes to the igbDefaultPrefs.json file. I'm happy with the code, I'm just baffled by the installer producing a different result.

              People

              • Assignee:
                ieclabau Ivory Blakley (Inactive)
                Reporter:
                sneha Sneha Ramesh Watharkar (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: