[Biojava-dev] help (F1 F1) regarding biojava

Mark Schreiber markjschreiber at gmail.com
Wed Oct 31 14:55:44 UTC 2007


Hi -

It's a little hard to see what you are trying to do but one likely error is
using FastaFormat to read something from NCBI or GenBank which is most
likely in Genbank format.

I would also strongly recommend using the equivalent classes from the
org.biojavax packages as many of the classes you are using are not actively
supported any more.

- Mark

On 9/27/07, pranav waila <pranav.waila at gmail.com> wrote:
>
> package org.biojava.bio.seq.db;
>
> import org.biojava.bio.seq.*;
> import org.biojava.bio.seq.io.*;
> import org.biojava.bio.*;
> import org.biojava.bio.seq.db.*;
> import org.biojava.bio.seq.io.*;
> import java.net.*;
> class test{
>     public static SequenceFormat sf;
>
>     public static void main(String args[]){
>
>         System.getProperties().put("proxySet","true");
>
>         System.getProperties().put("proxyPort","3128");
>         System.getProperties().put("proxyHost","172.16.0.6");
>
>         Sequence s;
>         sf=new FastaFormat();
>         //sf=new GenbankXmlFormat();
>                 NCBISequenceDB ncbi = new NCBISequenceDB(
> NCBISequenceDB.DB_PROTEIN,sf);//new FastaFormat());
> //        GenbankSequenceDB gdb=new GenbankSequenceDB();
>         //ncbi.setSequenceFormat(FASTA);
>     try{
>
>
>
> //        Sequence sequenceFromGenbank = ncbi.getSequence("P10659");
> //        System.out.println(sequenceFromGenbank.getName());
>
> // older code
>         s=ncbi.getSequence("P10659");
>
>         //s=gdb.getAddress();//getSequence("P10659");//3789789");
>         System.out.print("check");
>         System.out.println(ncbi.getSequence("190786"));
>
> //
>     }
>     catch(Exception e){
>         e.printStackTrace();
>         //System.out.println("protien name is : zinteminia");
>     }
>
>     }
> }
>
>
> This is my code for fetching the sequence from NCBI but it is giving
> somany
> exceptions. can u provide me some code to do so..
>
> the errors are as follows :
>
> Bio java exception could not read sequence
>
> CAN U PLEASE HELP ME.
>
> waiting for reply
>
> PRANAV WAILA
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>



More information about the biojava-dev mailing list