Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar, Spring 5 : 16 Mar to 27 Mar

      Description

      Situation: Because the bai file does not include the chromosome information, we have been assuming that the order of the bai file chromosomes are the same as that in IGB. However, many bai files are not ordered exactly the same as IGB. The only way to know for sure the order of the bai file is to look at the header of the bam file. However, because we allow the user to load a bai file directly, there may not be a readable bam file.

      Task: If a bam header was retrieved successfully, use the chromosome order from the bam header instead of the genome.txt order to assign chromosome values to the bai data. For example, if the order in the bam header is chr3, chr1, chr2, then this is the order that the data will be retrieved from the bai file. You do not need to sort the data.

        Attachments

          Issue Links

            Activity

            nfreese Nowlan Freese created issue -
            nfreese Nowlan Freese made changes -
            Field Original Value New Value
            Epic Link IGBF-1919 [ 18010 ]
            nfreese Nowlan Freese made changes -
            Link This issue is blocked by IGBF-2220 [ IGBF-2220 ]
            nfreese Nowlan Freese made changes -
            Link This issue relates to IGBF-2210 [ IGBF-2210 ]
            nfreese Nowlan Freese made changes -
            Description Situation: Because the bai file does not include the chromosome information, we have been assuming that the order of the bai file chromosomes are the same as that in IGB. However, many bai files are not ordered exactly the same as IGB. The only way to know for sure the order of the bai file is to look at the header of the bam file. However, because we allow the user to load a bai file directly, there may not be a readable bam file.

            Task: Within the BAI index visualization handler plugin, write code to identify if there is a readable bam file. The bam file should be located in the same directory as the bai file and should have the same name as the bai file, but with a .bam extension. Note that the bai itself may have .bam in front of the .bai extension (EXAMPLE.bam.bai). If a bam file is present, use the appropriate Samtools method to retrieve the bam header.
            Situation: Because the bai file does not include the chromosome information, we have been assuming that the order of the bai file chromosomes are the same as that in IGB. However, many bai files are not ordered exactly the same as IGB. The only way to know for sure the order of the bai file is to look at the header of the bam file. However, because we allow the user to load a bai file directly, there may not be a readable bam file.

            Task: If a bam header was retrieved successfully, use the chromosome order from the bam header instead of the genome.txt order to assign chromosome values to the bai data. For example, if the order in the bam header is chr3, chr1, chr2, then this is the order that the data will be retrieved from the bai file. You do not need to sort the data.
            ann.loraine Ann Loraine made changes -
            Sprint Spring 3 : 3 Feb to 14 Feb [ 86 ] Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 21 Feb [ 86, 87 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            nfreese Nowlan Freese made changes -
            Attachment galaxy_outOfOrder.bam [ 14656 ]
            Attachment galaxy_outOfOrder.bam.bai [ 14657 ]
            nfreese Nowlan Freese made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            nfreese Nowlan Freese made changes -
            Sprint Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb [ 86, 87 ] Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar [ 86, 87, 89 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked higher
            nfreese Nowlan Freese made changes -
            Attachment sorted.bam [ 14664 ]
            Attachment sorted.bam.bai [ 14665 ]
            Attachment sorted.sam [ 14666 ]
            Attachment unsorted.bam [ 14667 ]
            Attachment unsorted.bam.bai [ 14668 ]
            Attachment unsorted.sam [ 14669 ]
            Hide
            nfreese Nowlan Freese added a comment -

            sorted and unsorted files are from 2009 human version

            Show
            nfreese Nowlan Freese added a comment - sorted and unsorted files are from 2009 human version
            Show
            pbole Pawan Bole (Inactive) added a comment - Pushed the changes to my branch https://bitbucket.org/pawanbole/integrated-genome-browser-pawan/src/IGBF-2269/
            pbole Pawan Bole (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            pbole Pawan Bole (Inactive) made changes -
            Assignee Pawan Bole [ pbole ] Nowlan Freese [ nfreese ]
            pbole Pawan Bole (Inactive) made changes -
            Story Points 3 5
            nfreese Nowlan Freese made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            nfreese Nowlan Freese made changes -
            Attachment sorted.bam [ 14664 ]
            nfreese Nowlan Freese made changes -
            Attachment sorted.bam.bai [ 14665 ]
            nfreese Nowlan Freese made changes -
            Attachment sorted.sam [ 14666 ]
            nfreese Nowlan Freese made changes -
            Attachment unsorted.bam [ 14667 ]
            nfreese Nowlan Freese made changes -
            Attachment unsorted.bam.bai [ 14668 ]
            nfreese Nowlan Freese made changes -
            Attachment unsorted.sam [ 14669 ]
            nfreese Nowlan Freese made changes -
            Attachment galaxy_outOfOrder.bam [ 14656 ]
            nfreese Nowlan Freese made changes -
            Attachment galaxy_outOfOrder.bam.bai [ 14657 ]
            Hide
            nfreese Nowlan Freese added a comment - - edited

            Example files found in google drive: https://drive.google.com/open?id=1Y9krI6VX3vBzTKEcneGy1McnMJEK739m

            Note that chr1_3_2.bam.bai has data for the first three chromosomes in the order of 1,3,2. Chromosome 3 has no data for the majority of the chromosome.

            Show
            nfreese Nowlan Freese added a comment - - edited Example files found in google drive: https://drive.google.com/open?id=1Y9krI6VX3vBzTKEcneGy1McnMJEK739m Note that chr1_3_2.bam.bai has data for the first three chromosomes in the order of 1,3,2. Chromosome 3 has no data for the majority of the chromosome.
            Hide
            nfreese Nowlan Freese added a comment -

            Loading the out of order bai file (chr1_3_2.bai) locally while the bam file is in the same directory works correctly, the data is loaded for the correct chromosomes.

            Loading the bai file via url does not work, with or without the bam file in the same directory.

            Moving the bam file out of the same directory locally causes the bai file to fail to load (null pointer exception).

            Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at org.lorainelab.igb.bai.BaiToBedgraphConverter.initializeChromosomes(BaiToBedgraphConverter.java:178)
            at org.lorainelab.igb.bai.BaiToBedgraphConverter.<init>(BaiToBedgraphConverter.java:57)
            at org.lorainelab.igb.bai.BaiFileHandler.createSymLoader(BaiFileHandler.java:38)
            at com.affymetrix.genometry.util.ServerUtils.determineLoader(ServerUtils.java:31)
            at com.affymetrix.igb.view.load.GeneralLoadUtils.getDataSet(GeneralLoadUtils.java:1128)
            at com.affymetrix.igb.view.load.GeneralLoadUtils.openURI(GeneralLoadUtils.java:972)
            at com.affymetrix.igb.IgbServiceImpl.openURI(IgbServiceImpl.java:347)
            at com.affymetrix.igb.shared.OpenURIAction.openURI(OpenURIAction.java:89)
            at com.affymetrix.igb.action.LoadFileAction.actionPerformed(LoadFileAction.java:192)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
            at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
            at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
            at java.awt.MenuItem.processEvent(MenuItem.java:628)
            at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
            at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
            at java.awt.EventQueue.access$500(EventQueue.java:97)
            at java.awt.EventQueue$3.run(EventQueue.java:709)
            at java.awt.EventQueue$3.run(EventQueue.java:703)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
            at java.awt.EventQueue$4.run(EventQueue.java:733)
            at java.awt.EventQueue$4.run(EventQueue.java:731)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

            Show
            nfreese Nowlan Freese added a comment - Loading the out of order bai file (chr1_3_2.bai) locally while the bam file is in the same directory works correctly, the data is loaded for the correct chromosomes. Loading the bai file via url does not work, with or without the bam file in the same directory. Moving the bam file out of the same directory locally causes the bai file to fail to load (null pointer exception). Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.lorainelab.igb.bai.BaiToBedgraphConverter.initializeChromosomes(BaiToBedgraphConverter.java:178) at org.lorainelab.igb.bai.BaiToBedgraphConverter.<init>(BaiToBedgraphConverter.java:57) at org.lorainelab.igb.bai.BaiFileHandler.createSymLoader(BaiFileHandler.java:38) at com.affymetrix.genometry.util.ServerUtils.determineLoader(ServerUtils.java:31) at com.affymetrix.igb.view.load.GeneralLoadUtils.getDataSet(GeneralLoadUtils.java:1128) at com.affymetrix.igb.view.load.GeneralLoadUtils.openURI(GeneralLoadUtils.java:972) at com.affymetrix.igb.IgbServiceImpl.openURI(IgbServiceImpl.java:347) at com.affymetrix.igb.shared.OpenURIAction.openURI(OpenURIAction.java:89) at com.affymetrix.igb.action.LoadFileAction.actionPerformed(LoadFileAction.java:192) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125) at java.awt.MenuItem.processActionEvent(MenuItem.java:669) at java.awt.MenuItem.processEvent(MenuItem.java:628) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
            Hide
            nfreese Nowlan Freese added a comment -

            Check if span is null on line 178 and 199

            Show
            nfreese Nowlan Freese added a comment - Check if span is null on line 178 and 199
            Show
            nfreese Nowlan Freese added a comment - - edited Test URL: https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/chr1_3_2.bam.bai https://data.cyverse.org/dav-anon/iplant/home/nowlanf/SmokeTesting/H_sapiens_Dec_2013/chr1_3_2.bam http://igbquickload.org/smokeTestingQuickload/H_sapiens_Dec_2013/Bam/Bam_HomoSapien.bai http://igbquickload.org/smokeTestingQuickload/H_sapiens_Dec_2013/Bam/Bam_HomoSapien.bam ONLY the bai file (no bam file in same location) https://data.cyverse.org/dav-anon/iplant/home/nowlanf/testThree/chr1_3_2.bam.bai
            Hide
            nfreese Nowlan Freese added a comment -

            Checking span for null allows the bai file to load via URL and if the bam file is not located within the same directory locally.

            When the bai file is located in the same directory as the bam file and loaded via URL, it is not loaded correctly, most likely due to the bam file not being found. Pawan is aware of this issue and is working on it.

            Recommend checking span is null and fixing issue with bam not found in URL.

            Show
            nfreese Nowlan Freese added a comment - Checking span for null allows the bai file to load via URL and if the bam file is not located within the same directory locally. When the bai file is located in the same directory as the bam file and loaded via URL, it is not loaded correctly, most likely due to the bam file not being found. Pawan is aware of this issue and is working on it. Recommend checking span is null and fixing issue with bam not found in URL.
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ] Pawan Bole [ pbole ]
            nfreese Nowlan Freese made changes -
            Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
            nfreese Nowlan Freese made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            nfreese Nowlan Freese made changes -
            Sprint Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar [ 86, 87, 89 ] Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar, Spring 5 : 16 Mar to 27 Mar [ 86, 87, 89, 90 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked higher
            Hide
            pbole Pawan Bole (Inactive) added a comment -

            https://bitbucket.org/pawanbole/integrated-genome-browser-pawan/commits/3945d1a325f8a8cca61b042787243750ecc45d71?at=IGBF-2269

            Pushed the changes related for the files present on the internet and also handled the missing null checks.

            Show
            pbole Pawan Bole (Inactive) added a comment - https://bitbucket.org/pawanbole/integrated-genome-browser-pawan/commits/3945d1a325f8a8cca61b042787243750ecc45d71?at=IGBF-2269 Pushed the changes related for the files present on the internet and also handled the missing null checks.
            pbole Pawan Bole (Inactive) made changes -
            Assignee Pawan Bole [ pbole ] Nowlan Freese [ nfreese ]
            pbole Pawan Bole (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            nfreese Nowlan Freese made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            Hide
            nfreese Nowlan Freese added a comment -

            Loading the bai file via url works correctly with or without the bam file in the same directory.

            Loading the bai file locally works correctly with or without the bam file in the same directory.

            Recommend pull request.

            Show
            nfreese Nowlan Freese added a comment - Loading the bai file via url works correctly with or without the bam file in the same directory. Loading the bai file locally works correctly with or without the bam file in the same directory. Recommend pull request.
            nfreese Nowlan Freese made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ] Pawan Bole [ pbole ]
            Show
            pbole Pawan Bole (Inactive) added a comment - Nowlan Freese Pull request generated. https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/776/igbf-2269/diff
            pbole Pawan Bole (Inactive) made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            pbole Pawan Bole (Inactive) made changes -
            Assignee Pawan Bole [ pbole ] Nowlan Freese [ nfreese ]
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ] Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: