[DAS] DAS
Saju Joseph
saju_peruvachira@hotmail.com
Sat, 21 Dec 2002 15:15:26 +0530
This is a multi-part message in MIME format.
------=_NextPart_000_00FB_01C2A903.CA51CDF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Jansen,=20
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 =3D =
"http://genome.cse.ucsc.edu/cgi-bin/das/hg10/features?segment=3Dchr1:1,19=
000";
//Connect to the url
URL url =3D new URL(urlString);
HttpURLConnection conn =3D (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 =3D conn.getOutputStream();
out.flush();
//Read data
BufferedReader reader =3D new BufferedReader(new =
InputStreamReader(conn.getInputStream()));
=20
char[] buff =3D new char[20000];
=20
int bytes =3D reader.read(buff,0,20000);
String strResult =3D new String(buff);
System.out.println(strResult);
out.close();
conn.disconnect();]
Thaks in advance,
Saju Joseph
----- Original Message -----=20
From: Thorsten Jansen=20
To: Saju Joseph=20
Cc: DAS=20
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
------=_NextPart_000_00FB_01C2A903.CA51CDF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Jansen, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> I would like to =
retrieve the=20
feature types( Annotation) available for a segment. Below is the code =
segment I=20
used to retrieve XML information from DAS severs. But due to some =
unforeseen=20
reasons, I am getting only a small portion from the beginning of XML =
document.=20
It will be apreciated if you could provide me with some insight =
into=20
rectifying this.</DIV>
<DIV></FONT><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
String urlString =3D "<A=20
href=3D"http://genome.cse.ucsc.edu/cgi-bin/das/hg10/features?segment=3Dch=
r1:1,19000">http://genome.cse.ucsc.edu/cgi-bin/das/hg10/features?segment=3D=
chr1:1,19000</A>";</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> =
//Connect to=20
the url<BR> =
URL url=20
=3D new URL(urlString);<BR> =
=20
HttpURLConnection conn =3D (HttpURLConnection) =
url.openConnection();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p;//Set=20
Http request properties<BR> =20
=20
conn.setDoOutput(true);<BR> =20
=20
conn.setDoInput(true);<BR> =20
=20
conn.setRequestMethod("GET");<BR> &nbs=
p; =20
conn.setRequestProperty("Content-Language",=20
"en-US");<BR> =
=20
conn.setRequestProperty("Content-Type", =
"application/xml");<BR></FONT><FONT=20
face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> =
//Write=20
data<BR> =
OutputStream out=20
=3D=20
conn.getOutputStream();<BR> &nbs=
p; =20
out.flush();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> =
//Read=20
data<BR> =
BufferedReader=20
reader =3D new BufferedReader(new=20
InputStreamReader(conn.getInputStream()));<BR></FONT><FONT face=3DArial=20
size=3D2> </FO=
NT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p;char[]=20
buff =3D new char[20000];</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p;</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p; int=20
bytes =3D reader.read(buff,0,20000);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p; </FONT><FONT=20
face=3DArial size=3D2>String strResult =3D new =
String(buff);</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p; </FONT><FONT=20
face=3DArial size=3D2>System.out.println(strResult);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
=20
out.close();<BR> &nb=
sp;=20
conn.disconnect();]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thaks in advance,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Saju Joseph</DIV>
<DIV><BR></DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Dthorsten.jansen@lionbioscience.com=20
href=3D"mailto:thorsten.jansen@lionbioscience.com">Thorsten Jansen</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dsaju_peruvachira@hotmail.com=20
href=3D"mailto:saju_peruvachira@hotmail.com">Saju Joseph</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A title=3DDAS@biodas.org=20
href=3D"mailto:DAS@biodas.org">DAS</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, December 20, 2002 =
3:57=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: [DAS] DAS</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff size=3D2>The=20
biojava library contains classes for connecting to the das server and =
for=20
converting the results. They should provide everything you=20
need.</FONT></SPAN></DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff size=3D2>Hope=20
that helps</FONT></SPAN></DIV>
<DIV><SPAN class=3D761372410-20122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Thorsten Jansen</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> <A=20
href=3D"mailto:das-admin@biodas.org">das-admin@biodas.org</A>=20
[mailto:das-admin@biodas.org]<B>On Behalf Of </B>Saju =
Joseph<BR><B>Sent:</B>=20
Friday, December 20, 2002 8:07 AM<BR><B>To:</B> <A=20
href=3D"mailto:das@biodas.org">das@biodas.org</A><BR><B>Subject:</B> =
[DAS]=20
DAS<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Gurus,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>We have implemented a genome =
browser. We would=20
like to download external genome annotation data from the DAS =
servers with=20
minimum effort. With an http Request made to the DAS server, XML =
data will=20
be obtained. How is it possible to convert this XML data using the =
DAS=20
standard. If any of you could provide me with a detailed input on =
this, it=20
is highly appreciatable.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Saju=20
Joseph</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_00FB_01C2A903.CA51CDF0--