[DAS] DAS

Ethan Cerami ecerami@yahoo.com
Mon, 23 Dec 2002 08:39:22 -0800 (PST)


Also...

If you would rather reader everything in via a buffer,
this also works:

char[] buffer = new char[1000];
while (true) {
   int bytesRead = reader.read(buffer, 0, 1000);
   if (bytesRead == -1) break;
   String str = new String (buffer, 0, bytesRead);
   System.out.println (str);
}

Ethan

--- Saju Joseph <saju_peruvachira@hotmail.com> wrote:
> Hi Jansen, 
>     I would like to retrieve the feature types(
> Annotation) available for a segment. Below is the
> code segment I used to retrieve XML information from
> DAS severs. But due to some unforeseen reasons, I am
> getting only a small portion from the beginning of
> XML document. It will be apreciated if you could
> provide me with some insight into rectifying this.
> 
>             String urlString =
>
"http://genome.cse.ucsc.edu/cgi-bin/das/hg10/features?segment=chr1:1,19000";
> 
>            //Connect to the url
>            URL url = new URL(urlString);
>            HttpURLConnection conn =
> (HttpURLConnection) url.openConnection();
> 
>            //Set Http request properties
>            conn.setDoOutput(true);
>            conn.setDoInput(true);
>            conn.setRequestMethod("GET");
>           
> conn.setRequestProperty("Content-Language",
> "en-US");
>            conn.setRequestProperty("Content-Type",
> "application/xml");
> 
>            //Write data
>            OutputStream out =
> conn.getOutputStream();
>            out.flush();
> 
>            //Read data
>            BufferedReader reader = new
> BufferedReader(new
> InputStreamReader(conn.getInputStream()));
>           
>            char[] buff = new char[20000];
>            
>             int bytes = reader.read(buff,0,20000);
> 
>             String strResult = new String(buff);
>             System.out.println(strResult);
> 
>             out.close();
>             conn.disconnect();]
> 
> Thaks in advance,
> Saju Joseph
> 
> 
>   ----- Original Message ----- 
>   From: Thorsten Jansen 
>   To: Saju Joseph 
>   Cc: DAS 
>   Sent: Friday, December 20, 2002 3:57 PM
>   Subject: RE: [DAS] DAS
> 
> 
>   Hi,
> 
>   The biojava library contains classes for
> connecting to the das server and for converting the
> results. They should provide everything you need.
> 
>   Hope that helps
>   Thorsten Jansen
>     -----Original Message-----
>     From: das-admin@biodas.org
> [mailto:das-admin@biodas.org]On Behalf Of Saju
> Joseph
>     Sent: Friday, December 20, 2002 8:07 AM
>     To: das@biodas.org
>     Subject: [DAS] DAS
> 
> 
>     Gurus,
>     We have implemented a genome browser. We would
> like to download external genome annotation data
> from the DAS servers with minimum effort. With an
> http Request made to the DAS server, XML data will
> be obtained. How is it possible to convert this XML
> data using the DAS standard. If any of you could
> provide me with a detailed input on this, it is
> highly appreciatable.
>     Thanks in advance,
>     Saju Joseph
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com