Bioperl: trying XML in biology...

Catherine Letondal gensoft@pasteur.fr
Tue, 03 Aug 1999 18:21:21 +0200


Lincoln Stein writes:
> I've just put together an xml2boulder converter (65 lines of code).
> Here's what's nice about it.
> 
> Say you have an XML file that looks like this (real life example):
> 
> <contig>
>  <acc>NT_001817</acc>
>  <name>Hs1_1938</name>
>  <chr>1</chr>
>  <labs>SC</labs>
>  <partslist>
>    <part>
>     <cpos1>0</cpos1>
>     <cpos2>41014</cpos2>
>     <acc>AL049198</acc>
>     <seqlen>41015</seqlen>
>     <clone>590K14</clone>
>     <ctype>pac</ctype>
>    </part>
>    <part>
>     <cpos1>40915</cpos1>
>     <cpos2>125326</cpos2>
>     <acc>AL033533</acc>
>     <seqlen>84412</seqlen>
>     <clone>973M2</clone>
>    </part>
> </contig>
> 
> Then after converting it into boulder format, you can access the bits
> and pieces as methods, like so:
> 
>     $xml = Boulder::XML->new($xmlfile);
>     $chromosome = $xml->chr;
>     @parts = $xml->partslist->parts;
>     for my $part (@parts) {
>        my $accession = $part->acc;
>     }
> 
> I haven't written the corresponding boulder2xml converter, but if
> people are interested, I'll send out what I've got now for beta
> testing and experimentation.

I  haven't used boulder package yet, but I am sure that it's a good idea
to have a boulder2xml converter for people who use your package (because XML
makes parsing easy).


--
Catherine Letondal -- letondal@pasteur.fr -- +33 (1) 40 61 31 91
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================