[Biojava-l] how can i read a genbank

Mark Schreiber markjschreiber at gmail.com
Wed Oct 11 13:33:28 UTC 2006


This sounds like a problem with your classpath. For advice on setting
your classpath take a look at
http://biojava.org/wiki/BioJava:GetStarted

- Mark

On 10/11/06, Rajeswari <rajeee_sss at yahoo.com> wrote:
> Dear developers.,
>
>   I got the biojava program to read a genbank file from biojava.org.
>
>   it is as follows:
>
>   import org.biojava.bio.seq.*;
> import org.biojava.bio.seq.io.*;
> import java.io.*;
> import org.biojava.bio.*;
> import java.util.*;
>
> public class genbank1
>  {
>   public static void main(String[] args)
>   {
>     BufferedReader br = null;
>
>     try
>     {
>          FileReader f=new FileReader(mygen.java);
>         br = new BufferedReader(f);
>
>     }
>     catch (FileNotFoundException ex)
>     {
>          ex.printStackTrace();
>       System.exit(-1);
>     }
>
>
>     SequenceIterator sequences = SeqIOTools.readGenbank(br);
>
>          while(sequences.hasNext())
>          {
>       try
>         {
>
>         Sequence seq = sequences.nextSequence();
>
>
>       }
>       catch(BioException ex)
>       {
>        ex.printStackTrace();
>       }
>       catch(NoSuchElementException ex)
>         {
>         ex.printStackTrace();
>       }
>     }
>   }
> }
>
>
>   And i saved it as genbank1.java
>
>   it was compiled with javac genbank1.java
>
>
>   and when i try to execute  it shows no classfoundException.
>
>
>   i run the pro as follows:
>
>   c:\jdk1.4\bin\java genbank1 mygen.java
>
>   mygen.java consists of the genbank file.
>
>
>
>   i think the error may be deu to the genbank file.
>
>
>   can anybody tell me how to do this pro correct? and provide me the exact format of a genbank file with extension.
>
>
>
>   regards
>   s.rajee
>
>
> ---------------------------------
> Do you Yahoo!?
>  Everyone is raving about the  all-new Yahoo! Mail.
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>



More information about the Biojava-l mailing list