BioJava is an open-source project dedicated to providing a Java framework for processing biological data.

Overview

Welcome to

Build Version License Join the chat at https://gitter.im/biojava/biojava

BioJava is an open-source project dedicated to providing a Java framework for processing biological data. It provides analytical and statistical routines, parsers for common file formats, reference implementations of popular algorithms, and allows the manipulation of sequences and 3D structures. The goal of the biojava project is to facilitate rapid application development for bioinformatics.

Please visit our homepage.

Documentation

The BioJava tutorial is a great place to get started. It is most complete for the biojava-structure module.

The BioJava Cookbook contains an older and slightly outdated collection of simple examples that teach the basics for how to work with BioJava.

Full javadocs are available at the BioJava website.

Maven Repository

BioJava release are available from Maven Central.

Quick Installation

If you are using Maven you can add the BioJava repository by adding the following XML to your project pom.xml file:

    <dependencies>
      <dependency>
        <groupId>org.biojavagroupId>
        <artifactId>biojava-coreartifactId>
        <version>6.0.4version>
      dependency>
      
    dependencies>

Mailing Lists

BioJava has one main mailing list. In order to avoid SPAM the list only accepts postings from list members. Anybody can become a list member, so please subscribe before you post. If you send without being subscribed your mail might get stuck in the moderation loop, which can cause several weeks of delay (no fun to read through all that spam).

biojava-l general discussion list

This list is intended for general discussion, advice, questions, offers of help, announcements, expressions of appreciation, bugs found in release code and requests for features.

biojava-dev developers list

A dev mailing list used to exist, but it has now been shut down. For dev discussions we now use github issues. Please search existing issues and if you don't find the answer to your question submit a new issue.

Please cite

BioJava 5: A community driven open-source bioinformatics library
Aleix Lafita, Spencer Bliven, Andreas Prlić, Dmytro Guzenko, Peter W. Rose, Anthony Bradley, Paolo Pavan, Douglas Myers-Turnbull, Yana Valasatava, Michael Heuer, Matt Larson, Stephen K. Burley, Jose M. Duarte
PLOS Computational Biology 15(2): e1006791
doi

Comments
  • Preparing the 5.0.0 release

    Preparing the 5.0.0 release

    Work in the master branch towards a 5.0.0 version has been going on for quite some time now. In fact we have a bunch of alpha releases in maven central already, the first one almost 2 years ago!

    I'd like to move ahead and release 5.0.0, setting a date in about a month from now: 15th March 2018.

    Please comment on this issue in case you like or dislike the idea. At this time it would be important to include any needed refactoring that would break the API. So please comment if there is something anyone needs more time for.

    As usual there will be a list of tasks to do:

    • [x] Triage current milestone 5.0.0 issues. I'll start doing that.
    • [x] Draft the release notes
    • [x] Declare a code freeze. Proposed date 12th March 2018
    • [x] Ensure all classes contain the license notice (there's a script for that here)
    • [x] Perform release, uploading artifacts to sonatype and maven central (easily done with maven release plugin)
    • [x] Upload new javadocs to biojava.org
    question task 
    opened by josemduarte 27
  • PDB files: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

    PDB files: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

    Sorry if this isn't the right place to post but I am getting an error using the BioJava library when processing PDB files:

    BUILD FAILED
     java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at java.util.Arrays.copyOf(Arrays.java:2367)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
        at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
        at java.lang.StringBuffer.append(StringBuffer.java:237)
        at org.biojava.bio.structure.PDBHeader.printTitle(PDBHeader.java:249)
        at org.biojava.bio.structure.PDBHeader.toPDB(PDBHeader.java:105)
        at org.biojava.bio.structure.io.FileConvert.toPDB(FileConvert.java:196)
        at org.biojava.bio.structure.StructureImpl.toPDB(StructureImpl.java:559)
        at org.intermine.bio.dataconversion.PdbConverter.processPDBFile(PdbConverter.java:171)
        at org.intermine.bio.dataconversion.PdbConverter.process(PdbConverter.java:104)
    
    1. I was using biojava3-structure-3.0.7.jar this morning but I also tried biojava-structure-4.1.0.jar.
    2. I downloaded the PDB files from pdb.org
    3. I am getting the error for 1i9o.pdb. I skipped that one but got the same error on 1i9p.pdb. I looked at both files and they don't seem weird, but what do I know.
    4. My settings are:

    -server -XX:MaxPermSize=512M -Xmx32G -XX:+UseParallelGC -Xms2G -XX:SoftRefLRUPolicyMSPerMB=1 -XX:MaxHeapFreeRatio=99 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp

    Any ideas on how I can fix this? Thanks!!

    opened by julie-sullivan 27
  • Please vote: Major refactoring of package names (2nd attempt)

    Please vote: Major refactoring of package names (2nd attempt)

    See original vote in #240 . Now we are extending the vote to include all proposed solutions.

    Please vote on one of these solutions. If you are happy with more than one of them, then write down all solutions you like sorted from most ideal to least ideal (e.g. 3, 2, 1), I think that can help taking a final decision.

    1. Keep existing situation: a mix of org.biojava3.modulename.* and org.biojava.bio.structure.* (in structure and structure-gui modules)
    2. In structure/structure-gui modules rename org.biojava3.* to org.biojava.bio.structure.* so that all other modules are org.biojava3.* while structure/structure-gui are org.biojava.bio.structure.*, proposed by @dmyersturnbull
    3. Rename org.biojava.bio.structure.* to org.biojava3.structure : i.e. keep the biojava3 naming but making the whole project consistently use the org.biojava3.modulename.* scheme
    4. Rename all packages to org.biojava.modulename.* , original solution proposed by @andreasprlic. This has issues with transitivity, as explained by @heuermh
    5. Rename all packages to org.biojava4.modulename.* and do the same for every major release, proposed by @paolopavan
    6. Rename all packages to a new namespace that was never used before, e.g. org.biojavax.modulename.* : this avoids the transitivity issues and avoids renaming at every major release. UPDATED apparently org.biojavax.modulename.* was actually used before (see @heuermh 's comment below), a better name proposed by @sbliven is org.biojava.nbio.modulename.*
    question urgent 
    opened by josemduarte 26
  • Host biojava release jars from Maven Central

    Host biojava release jars from Maven Central

    It would be easier to work with BioJava to have our release jars distributed from Maven Central. I am in the process of setting this up.

    This will go via the Sonatype OSS repo.

    Step 1 was to create an account at Sonatype: https://issues.sonatype.org/browse/OSSRH-10253

    Next steps:

    Deploy snapshot artifacts into repository https://oss.sonatype.org/content/repositories/snapshots Deploy release artifacts into the staging repository https://oss.sonatype.org/service/local/staging/deploy/maven2 Promote staged artifacts into repository 'Releases' Download snapshot and release artifacts from group https://oss.sonatype.org/content/groups/public Download snapshot, release and staged artifacts from staging group https://oss.sonatype.org/content/groups/staging

    enhancement 
    opened by andreasprlic 25
  • Make loading of structures more consistent

    Make loading of structures more consistent

    Right now, loading of data from SCOP, CATH, and AtomCaches is handled very differently. It would be nice to have 1) an interface that is more consistent between SCOP and CATH, and 2) a more robust way to load arbitrary "structures" given unique identifiers.

    enhancement 
    opened by dmyersturnbull 25
  • Support extended pdbid

    Support extended pdbid

    I added PDBId class to replace the current String PdbId with conversation methods to and from short format. I will write the documentation later, as soon as the API is approved and finalized. Fixes #930.

    opened by aalhossary 23
  • Cannot parse pdb file.

    Cannot parse pdb file.

    Hi,

    it seems that I cannot parse any pdb file using PDBFileReader. This simple code fails for me (2src_off.pdb is official 2src PDB file from RCSB):

        PDBFileReader pdbReader = new PDBFileReader();
        //pdbReader.getFileParsingParameters().setCreateAtomCharges(false);
        String path = "~/pranklib/2src_off.pdb";
        Structure structure = null;
        try {
          structure = pdbReader.getStructure(path);
          System.out.println(structure);
        } catch (IOException e) {
          e.printStackTrace();
        } 
    

    with error:

    20:22:57 [main] ERROR org.biojava.nbio.structure.io.mmcif.SimpleMMcifParser - This does not look like a valid mmCIF file! The first line should start with 'data_', but is: 'null'
    Exception in thread "main" java.lang.NullPointerException
            at org.biojava.nbio.structure.io.ChargeAdder.addCharges(ChargeAdder.java:55)
            at org.biojava.nbio.structure.io.PDBFileParser.addCharges(PDBFileParser.java:2772)
            at org.biojava.nbio.structure.io.PDBFileParser.parsePDBFile(PDBFileParser.java:2760)
            at org.biojava.nbio.structure.io.PDBFileParser.parsePDBFile(PDBFileParser.java:2622)
            at org.biojava.nbio.structure.io.PDBFileReader.getStructure(PDBFileReader.java:307)
            at org.biojava.nbio.structure.io.LocalPDBDirectory.getStructure(LocalPDBDirectory.java:337)
            at org.biojava.nbio.structure.io.LocalPDBDirectory.getStructure(LocalPDBDirectory.java:321)
            at hello.HelloWorld.main(HelloWorld.java:22)
    

    Weird thing is that it didn't fail before. How is that possible? Also we do I get so many ERROR from MMcifParser when I am parsing PDB and not mmCIF?

    Thanks in advance for any help.

    Lukas

    opened by jendelel 23
  • Finish implementation of secondary structure detection

    Finish implementation of secondary structure detection

    The SecStruc.java class contains the beginnings of some code that can detect secondary structure in proteins, according to the DSSP rules. However there are still some numerical differences and probably bugs and I could not get it yet to produce exactly the same results as is shown e.g. in http://www.pdb.org/pdb/files/5pti.dssp

    enhancement new feature 
    opened by andreasprlic 22
  • Hsp class is not typesafe

    Hsp class is not typesafe

    The Hsp class and classes that use it (e.g. BlastXMLParserTest) give lots of 'Raw type' warnings. In this case these are not benign warnings, but flag a real possibility for some type errors. The problem is that we're trying to instantiate a sequence from a string without knowing what type of sequence that is. For instance, if you built an Hsp<ProteinSequence, AminoAcidCompound> with a string like "ACTG" then it would actually create a DNASequence, potentially causing errors.

    I'm not sure what the best pattern to avoid this is. Maybe the constructor to Hsp needs to take a pair of SequenceReader objects, which can be supplied by the calling code (e.g. BlastHspBuilder).

    Original author: @paolopavan

    bug wontfix 
    opened by sbliven 21
  • mmCIF parsing support for missing SEQRES information

    mmCIF parsing support for missing SEQRES information

    The current PDBParser supports parsing SEQRES records from a PDB file header; however, the MMCIFParser does not yet support parsing sequence information from a mmCIF file.

    The current implementation in SimpleMMCIFConsumer is not using the mmCIF-equivalent SEQRES records; it uses ATOM group equivalents to construct the current component list.

    The SimpleMMCIFParser should parse the analogous records from an mmCIF file (_pdbx_poly_seq_scheme)--the direct equivalent to the SEQRES record--and construct a component list representing the SEQRES sequence as does the PDBParser (this is required for passing existing integration tests: HeaderOnlyTest>MMcifTest.testLoad:63->MMcifTest.comparePDB2cif).

    opened by darnells 20
  • Please vote: Rename module names

    Please vote: Rename module names

    Along with the package names discussed in ~#240~ #245, this thread also discussed renaming the modules and maven artifact IDs.

    Question:

    Should modules and maven artifact IDs be renamed to remove the biojava3 version?

    Option in favor of renaming (+1):

    • Change all modules to use biojava- as a prefix, e.g. biojava-core and biojava-integrationtest

    Option for partial renaming (-1):

    • Change all modules to use biojava3- as the prefix to match the package name. Only effects the integrationtest and protein-comparison-tool packaging modules, so won't impact any downstream projects

    Clarification: If the consensus from #245 is to update package names for each version (biojava4, biojava5, etc), then the module names will also be updated.

    Option for no renaming (-2):

    • Leave everything as it is.
    opened by sbliven 20
  • [SECURITY] Fix Temporary File Information Disclosure Vulnerability

    [SECURITY] Fix Temporary File Information Disclosure Vulnerability

    Security Vulnerability Fix

    This pull request fixes a Temporary File Information Disclosure Vulnerability, which existed in this project.

    Preamble

    The system temporary directory is shared between all users on most unix-like systems (not MacOS, or Windows). Thus, code interacting with the system temporary directory must be careful about file interactions in this directory, and must ensure that the correct file posix permissions are set.

    This PR was generated because a call to File.createTempFile(..) was detected in this repository in a way that makes this project vulnerable to local information disclosure. With the default uname configuration, File.createTempFile(..) creates a file with the permissions -rw-r--r--. This means that any other user on the system can read the contents of this file.

    Impact

    Information in this file is visible to other local users, allowing a malicious actor co-resident on the same machine to view potentially sensitive files.

    Other Examples

    The Fix

    The fix has been to convert the logic above to use the following API that was introduced in Java 1.7.

    File tmpDir = Files.createTempFile("temp dir").toFile();
    

    The API both creates the file securely, ie. with a random, non-conflicting name, with file permissions that only allow the currently executing user to read or write the contents of this file. By default, Files.createTempFile("temp dir") will create a file with the permissions -rw-------, which only allows the user that created the file to view/write the file contents.

    :arrow_right: Vulnerability Disclosure :arrow_left:

    :wave: Vulnerability disclosure is a super important part of the vulnerability handling process and should not be skipped! This may be completely new to you, and that's okay, I'm here to assist!

    First question, do we need to perform vulnerability disclosure? It depends!

    1. Is the vulnerable code only in tests or example code? No disclosure required!
    2. Is the vulnerable code in code shipped to your end users? Vulnerability disclosure is probably required!

    Vulnerability Disclosure How-To

    You have a few options options to perform vulnerability disclosure. However, I'd like to suggest the following 2 options:

    1. Request a CVE number from GitHub by creating a repository-level GitHub Security Advisory. This has the advantage that, if you provide sufficient information, GitHub will automatically generate Dependabot alerts for your downstream consumers, resolving this vulnerability more quickly.
    2. Reach out to the team at Snyk to assist with CVE issuance. They can be reached at the Snyk's Disclosure Email.

    Detecting this and Future Vulnerabilities

    This vulnerability was automatically detected by GitHub's CodeQL using this CodeQL Query.

    You can automatically detect future vulnerabilities like this by enabling the free (for open-source) GitHub Action.

    I'm not an employee of GitHub, I'm simply an open-source security researcher.

    Source

    This contribution was automatically generated with an OpenRewrite refactoring recipe, which was lovingly hand crafted to bring this security fix to your repository.

    The source code that generated this PR can be found here: SecureTempFileCreation

    Opting-Out

    If you'd like to opt-out of future automated security vulnerability fixes like this, please consider adding a file called .github/GH-ROBOTS.txt to your repository with the line:

    User-agent: JLLeitschuh/security-research
    Disallow: *
    

    This bot will respect the ROBOTS.txt format for future contributions.

    Alternatively, if this project is no longer actively maintained, consider archiving the repository.

    CLA Requirements

    This section is only relevant if your project requires contributors to sign a Contributor License Agreement (CLA) for external contributions.

    It is unlikely that I'll be able to directly sign CLAs. However, all contributed commits are already automatically signed-off.

    The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin (see https://developercertificate.org/ for more information).

    - Git Commit Signoff documentation

    If signing your organization's CLA is a strict-requirement for merging this contribution, please feel free to close this PR.

    Sponsorship & Support

    This contribution is sponsored by HUMAN Security Inc. and the new Dan Kaminsky Fellowship, a fellowship created to celebrate Dan's memory and legacy by funding open-source work that makes the world a better (and more secure) place.

    This PR was generated by Moderne, a free-for-open source SaaS offering that uses format-preserving AST transformations to fix bugs, standardize code style, apply best practices, migrate library versions, and fix common security vulnerabilities at scale.

    Tracking

    All PR's generated as part of this fix are tracked here: https://github.com/JLLeitschuh/security-research/issues/18

    opened by JLLeitschuh 0
  • [SECURITY] Fix Temporary File Information Disclosure Vulnerability

    [SECURITY] Fix Temporary File Information Disclosure Vulnerability

    Security Vulnerability Fix

    This pull request fixes a Temporary File Information Disclosure Vulnerability, which existed in this project.

    Preamble

    The system temporary directory is shared between all users on most unix-like systems (not MacOS, or Windows). Thus, code interacting with the system temporary directory must be careful about file interactions in this directory, and must ensure that the correct file posix permissions are set.

    This PR was generated because a call to File.createTempFile(..) was detected in this repository in a way that makes this project vulnerable to local information disclosure. With the default uname configuration, File.createTempFile(..) creates a file with the permissions -rw-r--r--. This means that any other user on the system can read the contents of this file.

    Impact

    Information in this file is visible to other local users, allowing a malicious actor co-resident on the same machine to view potentially sensitive files.

    Other Examples

    The Fix

    The fix has been to convert the logic above to use the following API that was introduced in Java 1.7.

    File tmpDir = Files.createTempFile("temp dir").toFile();
    

    The API both creates the file securely, ie. with a random, non-conflicting name, with file permissions that only allow the currently executing user to read or write the contents of this file. By default, Files.createTempFile("temp dir") will create a file with the permissions -rw-------, which only allows the user that created the file to view/write the file contents.

    :arrow_right: Vulnerability Disclosure :arrow_left:

    :wave: Vulnerability disclosure is a super important part of the vulnerability handling process and should not be skipped! This may be completely new to you, and that's okay, I'm here to assist!

    First question, do we need to perform vulnerability disclosure? It depends!

    1. Is the vulnerable code only in tests or example code? No disclosure required!
    2. Is the vulnerable code in code shipped to your end users? Vulnerability disclosure is probably required!

    Vulnerability Disclosure How-To

    You have a few options options to perform vulnerability disclosure. However, I'd like to suggest the following 2 options:

    1. Request a CVE number from GitHub by creating a repository-level GitHub Security Advisory. This has the advantage that, if you provide sufficient information, GitHub will automatically generate Dependabot alerts for your downstream consumers, resolving this vulnerability more quickly.
    2. Reach out to the team at Snyk to assist with CVE issuance. They can be reached at the Snyk's Disclosure Email.

    Detecting this and Future Vulnerabilities

    This vulnerability was automatically detected by GitHub's CodeQL using this CodeQL Query.

    You can automatically detect future vulnerabilities like this by enabling the free (for open-source) GitHub Action.

    I'm not an employee of GitHub, I'm simply an open-source security researcher.

    Source

    This contribution was automatically generated with an OpenRewrite refactoring recipe, which was lovingly hand crafted to bring this security fix to your repository.

    The source code that generated this PR can be found here: SecureTempFileCreation

    Opting-Out

    If you'd like to opt-out of future automated security vulnerability fixes like this, please consider adding a file called .github/GH-ROBOTS.txt to your repository with the line:

    User-agent: JLLeitschuh/security-research
    Disallow: *
    

    This bot will respect the ROBOTS.txt format for future contributions.

    Alternatively, if this project is no longer actively maintained, consider archiving the repository.

    CLA Requirements

    This section is only relevant if your project requires contributors to sign a Contributor License Agreement (CLA) for external contributions.

    It is unlikely that I'll be able to directly sign CLAs. However, all contributed commits are already automatically signed-off.

    The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin (see https://developercertificate.org/ for more information).

    - Git Commit Signoff documentation

    If signing your organization's CLA is a strict-requirement for merging this contribution, please feel free to close this PR.

    Sponsorship & Support

    This contribution is sponsored by HUMAN Security Inc. and the new Dan Kaminsky Fellowship, a fellowship created to celebrate Dan's memory and legacy by funding open-source work that makes the world a better (and more secure) place.

    This PR was generated by Moderne, a free-for-open source SaaS offering that uses format-preserving AST transformations to fix bugs, standardize code style, apply best practices, migrate library versions, and fix common security vulnerabilities at scale.

    Tracking

    All PR's generated as part of this fix are tracked here: https://github.com/JLLeitschuh/security-research/issues/18

    opened by JLLeitschuh 0
  • Test Smell: it is not a good test practice to use the loop in the test

    Test Smell: it is not a good test practice to use the loop in the test

    Hi!

    We notice that you use the loop structure in your test cases. For example, testQualityScoresIntArray() in FastqToolsTest.java 截屏2022-08-17 下午5 17 26

    However, using the loop in test cases is not a good test practice. We analyzed the relevant Stack Overflow posts and summarized four potential negatives it brings:

    1. Loops make the test case more complex
    2. In most cases, a loop can be replaced with a data-driven test that is more readable.
    3. Loops break the assert-for-one-thing thumb rule. I don't mean a single assert statement.
    4. When a test fails, knowing the reason is more complicated.

    Solution: To avoid using the loop in the test, JUnit provides an annotation (i.e., @ParameteredTest), enabling a test case to run multiple times with different parameters. We provide a usage example here: image

    opened by TestSmell 1
  • New release based on Java 11

    New release based on Java 11

    I'd like to propose that we make our first Java 11 release and call it 6.1.0. That will mean that BioJava won't be possible to use under a JRE 8 from that moment on.

    Is there anything against that?

    opened by josemduarte 10
  • NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException

    NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException

    I am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors):

    <!-- https://mvnrepository.com/artifact/org.biojava/biojava -->
    <dependency>
       <groupId>org.biojava</groupId>
       <artifactId>biojava</artifactId>
       <version>6.0.5</version>
       <type>pom</type>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.biojava/biojava-ws -->
    <dependency>
       <groupId>org.biojava</groupId>
       <artifactId>biojava-ws</artifactId>
       <version>6.0.4</version>
    </dependency>
    

    I'm trying to submit blast requests to NCBI. To do this, I have largely followed this guide: https://biojava.org/wiki/BioJava:CookBook3:NCBIQBlastService

    My relevant code is as follows:

    private NCBIQBlastAlignmentProperties inputProperties = new NCBIQBlastAlignmentProperties();
    private NCBIQBlastService service = new NCBIQBlastService();
    
    ...
    
    inputProperties.setBlastDatabase("swissprot");
    inputProperties.setBlastExpect(Double.parseDouble("1e-10"));
    inputProperties.setBlastProgram(BlastProgramEnum.blastp);
    inputProperties.setAlignmentOption(BlastAlignmentParameterEnum.ENTREZ_QUERY, "<redacted>");   //Note this redaction is not in my original code.
    
    ...
    
    System.out.println("Submitting " + inputSequences.getSize() + " requests");
    for(int i=0; i<inputSequences.getSize(); i++)
    {
       try
       {
          rids.add(this.service.sendAlignmentRequest(inputSequences.getSequence(i), inputProperties));
       }
       catch (Exception e)
       {
          e.printStackTrace();
       }
    }
    

    Note that "rids" is an ArrayList for storing rid strings and inputSequences is an instance of a class which stores sequence data as String.

    When executed, the following error is thrown on each iteration of the for loop:

    java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at org.biojava.nbio.ws.alignment.qblast.NCBIQBlastService.sendAlignmentRequest(NCBIQBlastService.java:223)
    

    Note that this error is not being thrown by my code, but by the NCBIQBlastService module. Going to this point in the code leads to the following block in NCBIQBlastService:

    BlastJob job = new BlastJob();
    String line;
    while ((line = reader.readLine()) != null) {
       if (!line.contains("class=\"error\"") && !line.contains("Message ID#")) {
          // if there is no error, capture RID and RTOE
          if (line.contains("RID = ")) {
             String[] arr = line.split("=");
             job.setId(arr[1].trim());
          } else if (line.contains("RTOE = ")) {
             String[] arr = line.split("=");
             job.setStartTimestamp(System.currentTimeMillis());
             job.setExpectedExecutionTime(Long.parseLong(arr[1].trim()) * 1000);
          }
          jobs.put(job.getId(), job);
       } else {
          // handle QBlast error message
    
          // Capture everything to the left of this HTML statement...
          String[] tmp = line.split("</p></li></ul>");
    
          // Only the error message is on the right side of this...
          String[] moreTmp = tmp[0].split("<p class=\"error\">");
          throw new Exception("NCBI QBlast refused this request because: " + moreTmp[1].trim());
       }
    
    }
    

    Specifically, the line "throw new Exception("NCBI QBlast refused this request because: " + moreTmp[1].trim());" is throwing the ArrayIndexOutOfBoundsException. Evidently there is something wrong with my request, hence why I'm getting the error handler, but I can't determine what that reason is is because moreTmp[1] is out of moreTmp's bounds (according to the error message it only has one element). Consequently, the exception the code is trying to throw doesn't get thrown and the reason for the refusal of the request is lost.

    opened by FC123321 1
Releases(biojava-6.1.0)
SWE5003 - Achitecting Real Time Systems for Data Processing - Code Base

ARTS2022 SWE5003 - Achitecting Real Time Systems for Data Processing (ISS NUS Offering) - Code Base This module is part of the ISS MTech Graduate Cert

Suria R Asai 5 Apr 2, 2022
Jalgorithm is an open-source Java library which has implemented various algorithms and data structure

We loved Java and algorithms, so We made Jalgorithm ❤ Jalgorithm is an open-source Java library which has implemented various algorithms and data stru

Muhammad Karbalaee 35 Dec 15, 2022
Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.

English | 中文 | Deutsch | Español | Ελληνικά | Français | 日本語 | Norsk (bokmål) | Português-Brasil | Русский | हिंदी Eclipse Collections is a comprehens

Eclipse Foundation 2.1k Dec 29, 2022
The Java collections framework provides a set of interfaces and classes to implement various data structures and algorithms.

Homework #14 Table of Contents General Info Technologies Used Project Status Contact General Information Homework contains topics: Sorting an ArrayLis

Mykhailo 1 Feb 12, 2022
Zero is a core test automation project that can be used as a basis for any kind of test automation project (API, Browser, Mobile)

Zero Zero is our feature rich, core test automation framework, that can be used as an underlying automation framework for any/and all kind of test aut

Pramod Kumar Yadav 10 Dec 16, 2022
High Performance data structures and utility methods for Java

Agrona Agrona provides a library of data structures and utility methods that are a common need when building high-performance applications in Java. Ma

Real Logic 2.5k Jan 5, 2023
An embedded database implemented in pure java based on bitcask which is a log-structured hash table for K/V Data.

Baka Db An embedded database implemented in pure java based on bitcask which is a log-structured hash table for K/V Data. Usage import cn.ryoii.baka.B

ryoii 3 Dec 20, 2021
A beginner's guide to Learn Java Collections Framework

Collections-Framework A beginner's guide to Learn Java Collections Framework Topics included: Collection Interface ArrayList Iterator Stack Queue and

Anuj Kumar Sharma 97 Dec 30, 2022
A buildable source of master7720's Perry's Phobos.

A buildable source of master7720's Perry's Phobos.

noat 15 Dec 15, 2022
Clojure's data structures modified for use outside of Clojure

This library has been extracted from the master branch of Clojure (http://clojure.org) version 1.5.1 (as of October 2013) http://github.com/richhick

Karl Krukow 221 Oct 6, 2022
Reading Dalta Lake data from Beam

Reading Delta Lake Data from Beam General Info: All files, except org.apache.beam.sdk.io.DeltaFileIO are from Daltalake Standalone Reader. I was not a

Michael 6 Nov 21, 2022
Dremio - the missing link in modern data

Dremio Dremio enables organizations to unlock the value of their data. Documentation Documentation is available at https://docs.dremio.com. Quickstart

Dremio 1.2k Dec 31, 2022
Kameleon - project scaffolding for Apache Camel

Kameleon - project scaffolding for Apache Camel This is a project generator for Apache Camel. It generates maven-based Java project with preconfigured

The Apache Software Foundation 31 Dec 14, 2022
Bloofi: A java implementation of multidimensional Bloom filters

Bloofi: A java implementation of multidimensional Bloom filters Bloom filters are probabilistic data structures commonly used for approximate membersh

Daniel Lemire 71 Nov 2, 2022
A high performance caching library for Java

Caffeine is a high performance, near optimal caching library. For more details, see our user's guide and browse the API docs for the latest release. C

Ben Manes 13k Jan 5, 2023
Chronicle Bytes has a similar purpose to Java NIO's ByteBuffer with many extensions

Chronicle-Bytes Chronicle-Bytes Chronicle Bytes contains all the low level memory access wrappers. It is built on Chronicle Core’s direct memory and O

Chronicle Software : Open Source 334 Jan 1, 2023
High performance Java implementation of a Cuckoo filter - Apache Licensed

Cuckoo Filter For Java This library offers a similar interface to Guava's Bloom filters. In most cases it can be used interchangeably and has addition

Mark Gunlogson 161 Dec 30, 2022
An advanced, but easy to use, platform for writing functional applications in Java 8.

Getting Cyclops X (10) The latest version is cyclops:10.4.0 Stackoverflow tag cyclops-react Documentation (work in progress for Cyclops X) Integration

AOL 1.3k Dec 29, 2022