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

            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/
            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.
            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.
            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.
            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

              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: