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

Fix right-click Filter... in IGB when track is separated into (+) and (-) strands

    Details

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

      Description

      Situation: IGB users can use the right-click Filter... option in IGB to filter annotations or reads in a track based on properties such as score. However, there is a bug where if the track is separated by strand and the filter is applied to one strand and then removed in the other strand, the data do not reappear.

      Task: Investigate the cause of the issue. Once we have a better understanding of the code, determine if there is a relatively easy way to accomplish one of the possible solutions below.

      Possible solutions:

      • If a filter is applied to a strand it can only be removed from that strand.
      • If a user removes the filter from either strand, the filter is removed from both strands.
      • Filters are added and removed from both strands, there is no way to add a strand-specific filter.
      • It would also be nice if the filter icon appeared only for the relevant strand (right now it appears for both strands even if the filter is only applied to one strand).

      To reproduce the issue:

      1. Start IGB
      2. Select the Arabidopsis genome
      3. Navigate to Chr1:8,673,056-8,677,891
      4. Right-click on the Araport track and select Filter...
      5. In the Filter menu, select Add
      6. In the Add filter menu, select Show Only Score
      7. Click OK
      8. Click OK
      9. The gene model in the Araport track should now be hidden
      10. Right-click on the Araport track and select Filter...
      11. Select the Score filter and click on the Remove button
      12. Click OK
        The filter should now be removed, but the gene model in the Araport track is still missing.

        Attachments

          Issue Links

            Activity

            Hide
            nfreese Nowlan Freese added a comment - - edited
            1. Open the most recent chicken genome (G_gallus_Mar_2018).
            2. Navigate to 1:79,200,818-79,317,139
            3. Under UCSC REST in the Data Access tab under Available Data, select cpgIslandExt
            4. Load Data
            5. Right-click on the cpgIslandExt track label and select Filter...
            6. Click Add
            7. Set Show Only to Score
            8. Set score to 10.0 and comparator to >=
            9. Click OK
            10. Click OK

            The following error appears:

            Apr 18, 2024 10:18:44 AM com.affymetrix.igb.action.FilterAction applyFilter
            WARNING: Found a glyph with null info at location java.awt.geom.Rectangle2D$Double[x=0.0,y=53.764827058823535,w=0.0,h=20.0]
            
            Show
            nfreese Nowlan Freese added a comment - - edited Open the most recent chicken genome (G_gallus_Mar_2018). Navigate to 1:79,200,818-79,317,139 Under UCSC REST in the Data Access tab under Available Data, select cpgIslandExt Load Data Right-click on the cpgIslandExt track label and select Filter... Click Add Set Show Only to Score Set score to 10.0 and comparator to >= Click OK Click OK The following error appears: Apr 18, 2024 10:18:44 AM com.affymetrix.igb.action.FilterAction applyFilter WARNING: Found a glyph with null info at location java.awt.geom.Rectangle2D$ Double [x=0.0,y=53.764827058823535,w=0.0,h=20.0]
            Hide
            jsirigin Jaya Sravani Sirigineedi added a comment -

            The issue described in the ticket is occurring because the style object is same for both the positive and negative strands and the filter is an object inside the style object that's the reason the filter is there in both strands. But the strands have different glyph objects so when you remove the filter from the negative strand it does the remove filter on only the glyphs present in the negative strand and makes the filter null in the style object which in turn makes it null for the positive strand as well, without doing the remove filter for the glyphs present in the positive strand.

            We can approach this problem with two solutions:

            • To do the remove filter for the other strand as well, to make it consistent I think we have to do for add as well, would this be changing the requirement as the user might intended to add a filter to only the positive strand but if we do this whenever user adds a filter to a particular track it's gonna do filtering to both of its strands. Even though this change gonna be a bit complicated this won't involve design change.
            • The other option is to do a design change and move the filter out of the style object and make it a separate object for both the strands which would keep the requirement as it is but would require a lot of code change which is a bit risky as it might break other stuff.

            Nowlan Freese Please review the comment and let me know your opinion on this. We can discuss this over a call too when you are free.

            Show
            jsirigin Jaya Sravani Sirigineedi added a comment - The issue described in the ticket is occurring because the style object is same for both the positive and negative strands and the filter is an object inside the style object that's the reason the filter is there in both strands. But the strands have different glyph objects so when you remove the filter from the negative strand it does the remove filter on only the glyphs present in the negative strand and makes the filter null in the style object which in turn makes it null for the positive strand as well, without doing the remove filter for the glyphs present in the positive strand. We can approach this problem with two solutions: To do the remove filter for the other strand as well, to make it consistent I think we have to do for add as well, would this be changing the requirement as the user might intended to add a filter to only the positive strand but if we do this whenever user adds a filter to a particular track it's gonna do filtering to both of its strands. Even though this change gonna be a bit complicated this won't involve design change. The other option is to do a design change and move the filter out of the style object and make it a separate object for both the strands which would keep the requirement as it is but would require a lot of code change which is a bit risky as it might break other stuff. Nowlan Freese Please review the comment and let me know your opinion on this. We can discuss this over a call too when you are free.
            Hide
            jsirigin Jaya Sravani Sirigineedi added a comment - - edited

            Fixed the remove issue by showing only the filters that were added by the track that's selected, so when you add a filter from a positive strand and then click on the negative strand filter you won't see the filter that's added by the positive strand. This fixes the issue described in the ticket but won't resolve the other issues (https://jira.bioviz.org/browse/IGBF-1247 and the following one). There's another issue that was found during the investigation of this one, the code that currently exists in IGB to do the filtering assumes that the user is going to select a single track only when he does the filtering so whenever the user selects the filter option for multiple tracks that already have separate filters on their own, user won't be able to see all the filters for those tracks instead he will be able to see the filters that are present in the first-selected track. Created a separate ticket for this: https://jira.bioviz.org/browse/IGBF-3746

            Updated code is present at the branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3698. Tested a few scenarios, working as expected. Please review and let me know if there are any issues.

            Show
            jsirigin Jaya Sravani Sirigineedi added a comment - - edited Fixed the remove issue by showing only the filters that were added by the track that's selected, so when you add a filter from a positive strand and then click on the negative strand filter you won't see the filter that's added by the positive strand. This fixes the issue described in the ticket but won't resolve the other issues ( https://jira.bioviz.org/browse/IGBF-1247 and the following one). There's another issue that was found during the investigation of this one, the code that currently exists in IGB to do the filtering assumes that the user is going to select a single track only when he does the filtering so whenever the user selects the filter option for multiple tracks that already have separate filters on their own, user won't be able to see all the filters for those tracks instead he will be able to see the filters that are present in the first-selected track. Created a separate ticket for this: https://jira.bioviz.org/browse/IGBF-3746 Updated code is present at the branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3698 . Tested a few scenarios, working as expected. Please review and let me know if there are any issues.
            Hide
            nfreese Nowlan Freese added a comment - - edited

            Tested using Sravani's branch on Mac.

            My only change request is to remove the import java.util.* and replace them with the specific required imports.

            Sravani's branch fixes the specific issue described in this ticket. Note that as Sravani mentioned in her comment, this change does not fix the issue described in 1247. In addition, we have found other issues as described in IGBF-3746. As these are pre-existing issues I do not feel strongly that they should be tackled for this release.

            Once the imports are modified, please create a PR.

            Show
            nfreese Nowlan Freese added a comment - - edited Tested using Sravani's branch on Mac. My only change request is to remove the import java.util.* and replace them with the specific required imports. Sravani's branch fixes the specific issue described in this ticket. Note that as Sravani mentioned in her comment, this change does not fix the issue described in 1247. In addition, we have found other issues as described in IGBF-3746 . As these are pre-existing issues I do not feel strongly that they should be tackled for this release. Once the imports are modified, please create a PR.
            Hide
            jsirigin Jaya Sravani Sirigineedi added a comment -

            Fixed the imports, will raise a PR along with this ticket https://jira.bioviz.org/browse/IGBF-3747. Updated and combined code is present on the branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3747

            Show
            jsirigin Jaya Sravani Sirigineedi added a comment - Fixed the imports, will raise a PR along with this ticket https://jira.bioviz.org/browse/IGBF-3747 . Updated and combined code is present on the branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3747
            Hide
            nfreese Nowlan Freese added a comment -

            Tested using Sravani's branch on Mac.

            The currently applied filters only appear on their respective strands. So if a user applies a filter to the + strand, the filter cannot be seen in the Add/Remove/Edit Filters window on the - strand (and vice versa). Therefore, a filter applied only to the + strand cannot be removed from the - strand.

            This ticket will be included as part of the pull request in IGBF-3747.

            Show
            nfreese Nowlan Freese added a comment - Tested using Sravani's branch on Mac. The currently applied filters only appear on their respective strands. So if a user applies a filter to the + strand, the filter cannot be seen in the Add/Remove/Edit Filters window on the - strand (and vice versa). Therefore, a filter applied only to the + strand cannot be removed from the - strand. This ticket will be included as part of the pull request in IGBF-3747 .
            Hide
            nfreese Nowlan Freese added a comment -

            Tested using early-access installer on Mac.

            Filters applied to a specific strand can now only be removed from the filter menu for that strand.

            Closing ticket.

            Show
            nfreese Nowlan Freese added a comment - Tested using early-access installer on Mac. Filters applied to a specific strand can now only be removed from the filter menu for that strand. Closing ticket.

              People

              • Assignee:
                jsirigin Jaya Sravani Sirigineedi
                Reporter:
                nfreese Nowlan Freese
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: