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

Make a new IGB "demo" App that shows how Apps can get access to track data

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      4
    • Sprint:
      Summer 2018 Part 2, Summer 2018 Part 3, Fall 2018 1, Summer 2019 Sprint 10, Summer 2019 Sprint 11, Summer 2019 Sprint 12, Fall 2019 Sprint 1, Fall 2019 Sprint 2, Fall 2019 Sprint 3

      Description

      A potential App developer asks:

      "can I extract from IGB values for selected/all loaded lines for selected genomic region? For example, I have two tracks for ChIP-seq against two different transcription factors and I want to know what is their average score for selected region e.q. 1kb or 10kb. Can I have also information about which genes (mRNA) are present in this region or values for any other line?"

      Investigate:

      • How does an App find out what tracks are loaded (or selected) in IGB?
      • How does an App access the loaded data for a region?

      Tip:

      • Look at how track filters and operators work.

      *EDIT*: Instead of documenting, let's create a demo App that shows how these things can be done. For spec, see June 2019 comments from Dr. Loraine.

        Attachments

          Issue Links

            Activity

            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            This is closely related to IGBF-1351 .
            Review the comments there.

            Most importantly:
            draft documentation:
            https://docs.google.com/document/d/1qYb0MSAV3kiKmv0EZdfS2hqImDMb3FRGG09h-WmkrQI

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - This is closely related to IGBF-1351 . Review the comments there. Most importantly: draft documentation: https://docs.google.com/document/d/1qYb0MSAV3kiKmv0EZdfS2hqImDMb3FRGG09h-WmkrQI
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment - - edited

            Helpful notes from Ann related to this topic:

            Questions:

            • How does an App find out what tracks are currently selected?
            • How does an App get access to currently loaded data currently in view for a track?

            To understand IGB graphics, see paper describing the GenoViz SDK and how it works:
            https://www.ncbi.nlm.nih.gov/pubmed/19706180

            Also, see:

            Dr. Céol's App adds a new track to IGB. It may be useful to look at how he did this, and how the platform supports it.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - - edited Helpful notes from Ann related to this topic: Questions: How does an App find out what tracks are currently selected? How does an App get access to currently loaded data currently in view for a track? To understand IGB graphics, see paper describing the GenoViz SDK and how it works: https://www.ncbi.nlm.nih.gov/pubmed/19706180 Also, see: ProtAnnot paper - https://www.ncbi.nlm.nih.gov/pubmed/27153567 IGB platform paper - https://www.ncbi.nlm.nih.gov/pubmed/27153568 MI Bundle App paper from Dr. Arnaud Céol - https://www.ncbi.nlm.nih.gov/pubmed/26209801 Dr. Céol's App adds a new track to IGB. It may be useful to look at how he did this, and how the platform supports it.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            I think this ticket has taken such a long time to close because the task description is too vague. Instead of creating documentation, we should instead create a demonstration of how an App can get access to the data loaded into a track. Also, we did not have very good infrastructure for supporting Apps until recently.

            To answer the potential App developer's question, let's write simple demonstration App that implements an example feature that he has suggested.

            First pass at a specification:

            Develop App: "Get Average Score" (start a new repo for it, configured like the others)
            Description: This App calculates the average score for all items in the current view for selected annotation tracks.

            On installation:

            • App adds an item to Tools menu - "Get Average Score"
            • If user selects "Get Average Score" and no tracks are selected, a window opens explaining how the Get Average Score function works.
            • If user selects "Get Average Score" with one or more annotation tracks selected, the App calculates the average score for every item currently on view in the display that has a score.
            • The output is printed to the IGB console or to a new window that appears on the user's desktop. (You should decide based your own best judgement – rule of thumb: fewer clicks are better.)

            Note: BED, GFF, and many other formats have numeric "score" field. When IGB reads these files and creates data objects, many times these data objects have a "score" attribute - try to access this. Don't go back to the original file – use the internal data models in IGB.

            Show
            ann.loraine Ann Loraine added a comment - - edited I think this ticket has taken such a long time to close because the task description is too vague. Instead of creating documentation, we should instead create a demonstration of how an App can get access to the data loaded into a track. Also, we did not have very good infrastructure for supporting Apps until recently. To answer the potential App developer's question, let's write simple demonstration App that implements an example feature that he has suggested. First pass at a specification: Develop App: "Get Average Score" (start a new repo for it, configured like the others) Description: This App calculates the average score for all items in the current view for selected annotation tracks. On installation: App adds an item to Tools menu - "Get Average Score" If user selects "Get Average Score" and no tracks are selected, a window opens explaining how the Get Average Score function works. If user selects "Get Average Score" with one or more annotation tracks selected, the App calculates the average score for every item currently on view in the display that has a score. The output is printed to the IGB console or to a new window that appears on the user's desktop. (You should decide based your own best judgement – rule of thumb: fewer clicks are better.) Note: BED, GFF, and many other formats have numeric "score" field. When IGB reads these files and creates data objects, many times these data objects have a "score" attribute - try to access this. Don't go back to the original file – use the internal data models in IGB.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            I have been checking into the code to learn how the app can access the tracks or part of tracks that are selected. ProtAnnot app has a similar functionality and I am trying to implement the logic in my demo app. After this, I shall work on calculating the average score with some guidance from Dr. Loraine.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - I have been checking into the code to learn how the app can access the tracks or part of tracks that are selected. ProtAnnot app has a similar functionality and I am trying to implement the logic in my demo app. After this, I shall work on calculating the average score with some guidance from Dr. Loraine.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            The app is working as required, without making any major code changes in the IGB code. Now, I am working on creating an icon for the app and displaying it a shortcut button for the same.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - The app is working as required, without making any major code changes in the IGB code. Now, I am working on creating an icon for the app and displaying it a shortcut button for the same.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            The app is functional and can be found in the following repository. For now, the icon for the app is kept fairly simple just for demonstration but can be changed if required. The README.md file consists of step to test the functionality of the app. I shall also be adding a document which includes all the approaches that I as an app developer considered while working on this app. This document will also include steps to test. Kindly refer the document if you need more information. Kindly let me know your opinions and suggestions to make this a better demo app. Thank you.

            https://bitbucket.org/skulka2710/get-average-score/src/master/

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - The app is functional and can be found in the following repository. For now, the icon for the app is kept fairly simple just for demonstration but can be changed if required. The README.md file consists of step to test the functionality of the app. I shall also be adding a document which includes all the approaches that I as an app developer considered while working on this app. This document will also include steps to test. Kindly refer the document if you need more information. Kindly let me know your opinions and suggestions to make this a better demo app. Thank you. https://bitbucket.org/skulka2710/get-average-score/src/master/
            Hide
            ann.loraine Ann Loraine added a comment -

            To review:

            • Look at the code. Developer should be able to read the code and know (1) how to build it (2) how to run and test the App in IGB
            • Run the code. Developer should be able to install the App and try it out in IGB.

            Please make comments here for SK.

            Goal: This App is meant to serve as an example for how an App developer can get access to items in the IGB display. Developers (e.g., people like us) are the target audience for this App.

            Show
            ann.loraine Ann Loraine added a comment - To review: Look at the code. Developer should be able to read the code and know (1) how to build it (2) how to run and test the App in IGB Run the code. Developer should be able to install the App and try it out in IGB. Please make comments here for SK. Goal: This App is meant to serve as an example for how an App developer can get access to items in the IGB display. Developers (e.g., people like us) are the target audience for this App.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment - - edited

            Shamika Gajanan Kulkarni, I have reviewed the code for the Demo App. It is very easy to understand.
            IGB service is used to get sequence map view. After that a for loop is ran on the sequence map to get selected syms. And for each score entry for the sym, you have calculated average.
            When I was reviewing your code, I have noticed that the target folder is accidentally pushed to the app repository which shouldn't be there. Along with that there is git.properties file in the resource directory of the source folder which also should be removed from the repository.
            Other than that, everything is fine. Even the message popup that you are showing on click of Tools>"Get Average Score" is perfect.
            Moving the ticket to TO DO. Once you're done removing this folder/file from the repository, let me know so that I can move it forward to Ready for pull request.
            Thanks.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - - edited Shamika Gajanan Kulkarni , I have reviewed the code for the Demo App. It is very easy to understand. IGB service is used to get sequence map view. After that a for loop is ran on the sequence map to get selected syms. And for each score entry for the sym, you have calculated average. When I was reviewing your code, I have noticed that the target folder is accidentally pushed to the app repository which shouldn't be there. Along with that there is git.properties file in the resource directory of the source folder which also should be removed from the repository. Other than that, everything is fine. Even the message popup that you are showing on click of Tools>"Get Average Score" is perfect. Moving the ticket to TO DO. Once you're done removing this folder/file from the repository, let me know so that I can move it forward to Ready for pull request. Thanks.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            I am sorry I overlooked this fact and I have made the necessary changes.
            Also, Dr. Loraine suggested a few changes:
            1) To add a new AppDecription.md file that will be visible in the App Manager and provide instructions to the user on how to use the app.
            2) To modify the existing README.md file providing the user with instructions on how to install the app. The README.md file will only be visible on bitbucket. The App Manager should show the AppDescription.md data.
            The changes have been implemented and usability testing has been conducted for the same.
            Kindly check the link below and let me know if you observe any more changes that need to be done. Thank you for the review.
            https://bitbucket.org/skulka2710/get-average-score/src/master/

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited I am sorry I overlooked this fact and I have made the necessary changes. Also, Dr. Loraine suggested a few changes: 1) To add a new AppDecription.md file that will be visible in the App Manager and provide instructions to the user on how to use the app. 2) To modify the existing README.md file providing the user with instructions on how to install the app. The README.md file will only be visible on bitbucket. The App Manager should show the AppDescription.md data. The changes have been implemented and usability testing has been conducted for the same. Kindly check the link below and let me know if you observe any more changes that need to be done. Thank you for the review. https://bitbucket.org/skulka2710/get-average-score/src/master/
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Shamika Gajanan Kulkarni, I have checked both markdown files, the one after adding plugin to the IGB app manager which is AppDescription as well as the one which is displayed on the bitbucket i.e. README.
            Moving the ticket forward. You can now submit a PR for the same.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Shamika Gajanan Kulkarni , I have checked both markdown files, the one after adding plugin to the IGB app manager which is AppDescription as well as the one which is displayed on the bitbucket i.e. README. Moving the ticket forward. You can now submit a PR for the same.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Thank you for the reviews.
            Since the repository is a separate one for the Demo App - Get Average Score, the ownership to the repo is transferred to LoraineLabs. Moving the ticket to PR Submitted. Kindly review.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Thank you for the reviews. Since the repository is a separate one for the Demo App - Get Average Score, the ownership to the repo is transferred to LoraineLabs. Moving the ticket to PR Submitted. Kindly review.

              People

              • Assignee:
                ann.loraine Ann Loraine
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated: