This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Biojava - import org.biojava.bio in maven

I want to read multiple FASTA sequences from a FASTA file in Java. I found that BioJava can help with that(Eg:Solution 1): http://biojava.org/wiki/BioJava%3ACookbook%3ASeqIO%3AReadFasta

However, I am getting an error saying "Package org.biojava.bio does not exist" even though I imported following packages in maven:

<dependency>
        <groupId>org.biojava</groupId>
        <artifactId>biojava-core</artifactId>
        <version>4.2.4</version>
    </dependency>
    <dependency>
        <groupId>org.biojava</groupId>
        <artifactId>biojava-ws</artifactId>
        <version>4.2.4</version>
    </dependency>
    <dependency>
        <groupId>org.biojava</groupId>
        <artifactId>biojava3-core</artifactId>
        <version>3.0</version>
    </dependency>
    <dependency>
        <groupId>org.biojava</groupId>
        <artifactId>biojava-alignment</artifactId>
        <version>4.2.4</version>
    </dependency>

My Questions are:

  1. What is the dependency missing here?
  2. is BioJava outdated? Why so many "Page not found" ? if so, what is the latest java library for bioinformatics?
fasta biojava maven

1 answer

BioJava recently had to change the website to a new hosting, and the wiki-pages are not yet full up-to-date. The page you are looking it is a BioJava1 - example.

In BioJava 3 and newer, check out the FastaReaderHelper class. Here a link to the BioJava tutorial:

https://github.com/biojava/biojava-tutorial/blob/master/core/readwrite.md

Log in to answer this question.