Hi, uh yeah...bioinformatics...sort of :)
In general I think you have to be a bit more precise about the error you get and you might want to append a stacktrace or something. "Version number" error sounds like a "class version number" ? But I have no idea, could be anything. I can confirm though that the data URL is fine http://string-db.org/api/tsv/resolve?identifier=ADD&species=9606 . Here is the method I used to fetch the data: public static void write2File(URL url, File file) throws IOException { FileOutputStream out = null; InputStream in = null; try { in = url.openStream(); out = new FileOutputStream(file); byte[] buff = new byte[4096]; int len = 0; while (-1 != (len = in.read(buff))) { out.write(buff, 0, len); } } finally{ if(out != null)out.close(); if(in != null) in.close(); } } with this and your URL a simple write2File(new URL("http://string-db.org/api/tsv/resolve?identifier=ADD&species=9606 "), new File("/tmp/test.embl")); works as expected. On the other hand, please note that the String-DB guys explicitly state: "Please note that we currently discourage robot access, due to the heavy load on our server. If you require a large portion of the interaction data which is contained in STRING, please contact one of the authors" (http://string.embl.de/newstring_cgi/show_robot_regulations.pl) So if you want to integrate this in some sort of service/agent/robot thingy, a local copy of the database might be a good idea ! cheers, -thasso On Dec 18, 2009, at 18:02 , jitesh dundas wrote: > Dear Sir/Madam, > > I am trying to fetch data from EMBL STRING Database (http://string.embl.de/ > ) for a list of protein interactors. The file is attached with this > email. > > On executing the code, it gives me a "version number" error. The > same code is working fine when I fetch data from NCBI databases. > Thus, I am trying to know what is going wrong here. > > I request your reply. Please let me know if you need anything else > from my side. > > Regards, > Jitesh Dundas > > > > -- > > You received this message because you are subscribed to the Google > Groups "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en > . > <ImportGet.jsp> -- Dipl. Inf. Thasso Griebel-------------------Lehrstuhl fuer Bioinformatik Office 3426--http://bio.informatik.uni-jena.de--Institut fuer Informatik Phone +49 (0)3641 9-46454-----------Friedrich-Schiller-Universitaet Jena Fax +49 (0)3641 9-46452----------Ernst-Abbe-Platz 2, 07743 Jena, Germany -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
