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

Fix error when re-running InterProScan job through ProtAnnot

    Details

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

      Description

      Situation: If a user attempts to re-run a InterProScan job through ProtAnnot an error is thrown in the logs (see below).

      Task: Investigate and fix the issue.

      Steps to reproduce: Follow the IGB ProtAnnot SmokeTesting instructions. The error should appear after the step: Run the InterProScan again by selecting Run InterProScan under the InterProScan tab.

      Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
      	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
      	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
      	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
      	at java.base/java.util.Objects.checkIndex(Objects.java:385)
      	at java.base/java.util.ArrayList.get(ArrayList.java:427)
      	at org.lorainelab.igb.protannot.model.InterProScanTableModel.getValueAt(InterProScanTableModel.java:90)
      	at java.desktop/javax.swing.JTable.getValueAt(JTable.java:2769)
      

        Attachments

        1. CopyToClipboard.txt
          50 kB
        2. Error_Log (2).txt
          10 kB
        3. log_.txt
          10 kB
        4. log.txt
          8 kB
        5. log.txt
          8 kB
        6. target.zip
          670 kB
        7. ViewLogs.txt
          26 kB

          Issue Links

            Activity

            Hide
            uchinta Udaya Chinta (Inactive) added a comment -

            I observed that the issue occurred when the first InterProScan run was performed using the "ProtAnnot -> Run InterProScan" option, and the second run was done via the "InterProScan tab -> Run InterProScan." However, I did not encounter any issues when both the first and second InterProScan runs were performed using the "InterProScan tab -> Run InterProScan" option.

            Attaching the log files:
            log.txt
            Error_Log (2).txt

            Instead of receiving the error "java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0," mentioned in the ticket. I got the error "Server returned HTTP response code: 400 for URL: http://www.ebi.ac.uk/Tools/services/rest/iprscan5/run."

            Show
            uchinta Udaya Chinta (Inactive) added a comment - I observed that the issue occurred when the first InterProScan run was performed using the "ProtAnnot -> Run InterProScan" option, and the second run was done via the "InterProScan tab -> Run InterProScan." However, I did not encounter any issues when both the first and second InterProScan runs were performed using the "InterProScan tab -> Run InterProScan" option. Attaching the log files: log.txt Error_Log (2).txt Instead of receiving the error "java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0," mentioned in the ticket. I got the error "Server returned HTTP response code: 400 for URL: http://www.ebi.ac.uk/Tools/services/rest/iprscan5/run ."
            Hide
            uchinta Udaya Chinta (Inactive) added a comment -

            Yesterday, I looked into the codebase and understood that there is a separate repository for protAnnot after reviewing the entire IGB codebase and its commits on Bitbucket. I forked the protAnnot repository and attempted to run it. Initially, I failed to get it running. However, after going through the documentation provided, I was able to successfully run the protAnnot repository.
            Documentation: https://wiki.bioviz.org/confluence/display/igbdevelopers/Hello+World+IGB+App
            Now, I am wondering if it is possible to run and debug protAnnot. I need to explore ways to achieve that.

            Additionally, I observed an issue with the View Logs tab. When I clicked on the View Logs tab, it opened a new .txt file on my local machine, but the errors were not displayed in the logs. However, the Copy to Clipboard functionality is working correctly and copies all the errors and proper logs as expected. I am attaching the log files below for reference.
            ViewLogs : ViewLogs.txt
            CopyToClipboard: CopyToClipboard.txt

            Show
            uchinta Udaya Chinta (Inactive) added a comment - Yesterday, I looked into the codebase and understood that there is a separate repository for protAnnot after reviewing the entire IGB codebase and its commits on Bitbucket. I forked the protAnnot repository and attempted to run it. Initially, I failed to get it running. However, after going through the documentation provided, I was able to successfully run the protAnnot repository. Documentation: https://wiki.bioviz.org/confluence/display/igbdevelopers/Hello+World+IGB+App Now, I am wondering if it is possible to run and debug protAnnot. I need to explore ways to achieve that. Additionally, I observed an issue with the View Logs tab. When I clicked on the View Logs tab, it opened a new .txt file on my local machine, but the errors were not displayed in the logs. However, the Copy to Clipboard functionality is working correctly and copies all the errors and proper logs as expected. I am attaching the log files below for reference. ViewLogs : ViewLogs.txt CopyToClipboard: CopyToClipboard.txt
            Hide
            uchinta Udaya Chinta (Inactive) added a comment - - edited
            1. The issue occurred because two threads were simultaneously accessing the list. One thread was reading data from the list, while the other was clearing it. If the thread clearing the list removed the data before the reading thread could access it, an IndexOutOfBoundsException was thrown.
            2. To resolve this issue, I introduced a locking mechanism using ReentrantReadWriteLock. This lock allows multiple threads to read the data concurrently as long as no thread holds the write lock.

            Steps to reproduce the issue:

            1. Install the ProtAnnot plugin through the IGB App Manager (Tools > Open App Manager)
            2. It may be helpful to watch this How to use ProtAnnot YouTube video if you are unfamiliar with using ProtAnnot.
            3. Open the A_thaliana_Jun_2009 genome.
            4. Navigate to the following gene: Chr1:2,257,247-2,260,234
            5. Select the AT1G07350.1 and AT1G07350.2 gene models by shift-clicking both models. Make sure that the full model is selected, and not an individual exon.
            6. Select the Tools Menu.
            7. Select Start ProtAnnot.
            8. Click the Run InterProScan button under the InterProScan tab to start InterProScan.
            9. Wait for the status to change to "Finished."
            10. Move the cursor over the table under the Run InterProScan button and quickly click the Run InterProScan button.
            11. Repeat the process from step 8 until the issue occurs.
            Show
            uchinta Udaya Chinta (Inactive) added a comment - - edited The issue occurred because two threads were simultaneously accessing the list. One thread was reading data from the list, while the other was clearing it. If the thread clearing the list removed the data before the reading thread could access it, an IndexOutOfBoundsException was thrown. To resolve this issue, I introduced a locking mechanism using ReentrantReadWriteLock. This lock allows multiple threads to read the data concurrently as long as no thread holds the write lock. Steps to reproduce the issue: Install the ProtAnnot plugin through the IGB App Manager (Tools > Open App Manager) It may be helpful to watch this How to use ProtAnnot YouTube video if you are unfamiliar with using ProtAnnot. Open the A_thaliana_Jun_2009 genome. Navigate to the following gene: Chr1:2,257,247-2,260,234 Select the AT1G07350.1 and AT1G07350.2 gene models by shift-clicking both models. Make sure that the full model is selected, and not an individual exon. Select the Tools Menu. Select Start ProtAnnot. Click the Run InterProScan button under the InterProScan tab to start InterProScan. Wait for the status to change to "Finished." Move the cursor over the table under the Run InterProScan button and quickly click the Run InterProScan button. Repeat the process from step 8 until the issue occurs.
            Show
            uchinta Udaya Chinta (Inactive) added a comment - Commit : https://bitbucket.org/lorainelab_udaya/protannot_udaya/branch/IGBF-3949 Ann Loraine , Nowlan Freese Please verify the commit.
            Hide
            uchinta Udaya Chinta (Inactive) added a comment -

            Steps to test:
            1. Open protannot repo in intellij. Pull the IGBF-3949 branch changes. On top right corner of intellij click edit configurations and choose maven and run (clean install -DskipTests=true) command. It produces a jar file.
            2. Now open IGB, Navigate to Tools->Open App Manager>Manage Repositories click add and open the target folder of protannot repo and install the protAnnot to test the changes.
            (OR)
            1. Open IGB, Navigate to Tools->Open App Manager>Manage Repositories click add and open the below attached target folder and install the protAnnot. target.zip

            Show
            uchinta Udaya Chinta (Inactive) added a comment - Steps to test: 1. Open protannot repo in intellij. Pull the IGBF-3949 branch changes. On top right corner of intellij click edit configurations and choose maven and run (clean install -DskipTests=true) command. It produces a jar file. 2. Now open IGB, Navigate to Tools->Open App Manager>Manage Repositories click add and open the target folder of protannot repo and install the protAnnot to test the changes. (OR) 1. Open IGB, Navigate to Tools->Open App Manager>Manage Repositories click add and open the below attached target folder and install the protAnnot. target.zip
            Hide
            pkulzer Paige Kulzer added a comment -

            Using the steps outlined in Udaya's comments above to reproduce this issue and test it, I was able to run InterProScan twice in a row without any errors appearing in the log. During testing, I had to disable all other Plugin Repositories for this to work.

            Suggestion for Udaya: Change your commit message to be a bit more specific to your work on this ticket. Since you were fixing an issue with re-running ProtAnnot, I would say something like "Fix IndexOutOfBoundsException when re-running InterProScan." instead.

            Ready for PR!

            Show
            pkulzer Paige Kulzer added a comment - Using the steps outlined in Udaya's comments above to reproduce this issue and test it, I was able to run InterProScan twice in a row without any errors appearing in the log. During testing, I had to disable all other Plugin Repositories for this to work. Suggestion for Udaya : Change your commit message to be a bit more specific to your work on this ticket. Since you were fixing an issue with re-running ProtAnnot, I would say something like "Fix IndexOutOfBoundsException when re -running InterProScan." instead. Ready for PR!
            Hide
            uchinta Udaya Chinta (Inactive) added a comment - - edited

            Paige Kulzer,You do not have to disable all other Plugin Repositories for this to work. I tested the changes without disabling the other plugin repositories. If you would like to recheck this again we can connect and discuss more about it.

            As suggested I changed the commit message as "Fix IndexOutOfBoundsException when re-running InterProScan".

            Show
            uchinta Udaya Chinta (Inactive) added a comment - - edited Paige Kulzer ,You do not have to disable all other Plugin Repositories for this to work. I tested the changes without disabling the other plugin repositories. If you would like to recheck this again we can connect and discuss more about it. As suggested I changed the commit message as "Fix IndexOutOfBoundsException when re-running InterProScan".
            Show
            uchinta Udaya Chinta (Inactive) added a comment - PR submitted : https://bitbucket.org/lorainelab/protannot/pull-requests/24/overview
            Hide
            ann.loraine Ann Loraine added a comment -

            PR is merged.

            Prior to testing, we need to increment the ProtAnnot version to 10.0.2.

            This is required so that anyone who has ProtAnnot version 10.0.1 (or lower) installed will learn via the IGB interface or via the App Store interface that a new version of the software is available.

            Show
            ann.loraine Ann Loraine added a comment - PR is merged. Prior to testing, we need to increment the ProtAnnot version to 10.0.2. This is required so that anyone who has ProtAnnot version 10.0.1 (or lower) installed will learn via the IGB interface or via the App Store interface that a new version of the software is available.
            Hide
            ann.loraine Ann Loraine added a comment -

            Update:

            • The new bug-fixed version of ProtAnnot had the same version number as before (10.0.1), which caused the automatic bitbucket pipeline to run and over-write the old, non-fixed ProtAnnot jar file with version, so I re-ran the pipeline with commit f3f5934 as the target
            • Meanwhile, I edited the pom.xml file using the bitbucket edit interface and changed the version to 10.0.2
            • Saving the pom.xml edit triggered the pipeline and caused it to build a new jar with version 10.0.2
            • Downloads section of the repository now has restored 10.0.1 jar file and the all-new 10.0.2 jar file

            Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Update: The new bug-fixed version of ProtAnnot had the same version number as before (10.0.1), which caused the automatic bitbucket pipeline to run and over-write the old, non-fixed ProtAnnot jar file with version, so I re-ran the pipeline with commit f3f5934 as the target Meanwhile, I edited the pom.xml file using the bitbucket edit interface and changed the version to 10.0.2 Saving the pom.xml edit triggered the pipeline and caused it to build a new jar with version 10.0.2 Downloads section of the repository now has restored 10.0.1 jar file and the all-new 10.0.2 jar file Ready for testing.
            Hide
            ann.loraine Ann Loraine added a comment -

            To test, using the ProtAnnot repository:

            • Launch IGB
            • Just to be on the safe side, de-activate all existing App repositories (using Preferences window, probably)
            • Use the IGB interface (also the Preferences window, probably) to add this location as a new "app repository" : https://bitbucket.org/lorainelab/protannot/downloads/
            • Check that ProtAnnot appears as an option to install. Check that it is shown as version 10.0.2
            • Install it.
            • Repeat "steps to reproduce" - see Description section above
            • Confirm that the reported bug is no longer an issue.
            Show
            ann.loraine Ann Loraine added a comment - To test, using the ProtAnnot repository: Launch IGB Just to be on the safe side, de-activate all existing App repositories (using Preferences window, probably) Use the IGB interface (also the Preferences window, probably) to add this location as a new "app repository" : https://bitbucket.org/lorainelab/protannot/downloads/ Check that ProtAnnot appears as an option to install. Check that it is shown as version 10.0.2 Install it. Repeat "steps to reproduce" - see Description section above Confirm that the reported bug is no longer an issue.
            Hide
            ann.loraine Ann Loraine added a comment -

            Request for Paige Kulzer:

            • Please take a look - is the bug fixed ?
            Show
            ann.loraine Ann Loraine added a comment - Request for Paige Kulzer : Please take a look - is the bug fixed ?
            Hide
            pkulzer Paige Kulzer added a comment -

            This new version of ProtAnnot installs successfully and shows up correctly as version 10.0.2. I've confirmed that the reported bug is no longer an issue, ProtAnnot can be re-run multiple times without throwing an error in the Log.

            For next steps, I will create a new ticket for releasing this new version of ProtAnnot to the IGB App Store. Marking this issue as complete!

            Show
            pkulzer Paige Kulzer added a comment - This new version of ProtAnnot installs successfully and shows up correctly as version 10.0.2. I've confirmed that the reported bug is no longer an issue, ProtAnnot can be re-run multiple times without throwing an error in the Log. For next steps, I will create a new ticket for releasing this new version of ProtAnnot to the IGB App Store. Marking this issue as complete!

              People

              • Assignee:
                pkulzer Paige Kulzer
                Reporter:
                nfreese Nowlan Freese
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: