[Bioperl-l] mzef parser

Ewan Birney birney@ebi.ac.uk
Mon, 31 Jul 2000 15:59:26 +0100 (GMT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--1052845764-474540613-965055566=:4922
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 31 Jul 2000, Jason Stajich wrote:

> I need a MZEF parser/annotator as well as some other prediction software.

So - I have attached the Ensembl genscan parser. For reasons
waaaaaaaaaaaaay too complicated to say here, this parser needs the DNA
sequence to parse the file completely. (It is to do with the phase problem
on reverse strands. If anyone can figure this out for us - boy that would
be a help). 

The business with the phase here is pretty nasty. Otherwise it is
reasonably clean. I believe. 

> 
> I have thinking about Analysis objects in the big sense.  A Bioperl object
> that could generically add annotations parsed from various analysis
> procedures would be the idea.  I am thinking about this model being used
> for both Biocorba objects (to make distributing analysis easy) and the
> ensembl-lite analysis pipeline.
> 

Hmmm. I see where you are coming from. From an Ensembl perspective I think
this is something like a

	SeqFeatureProducerI

which is-a RunnableDB object. What do you think? (PS biojava seems to have
solved this one relatively well. We might do better stealing some design
from over there)



Don't use the word the "Analysis" in the object name --- we already have
too many of these about. 


Something for BOSC...


> So I'd be happy to work with you to design something and put it into play.
> 
> -Jason
> 
> Jason Stajich
> jason@chg.mc.duke.edu
> http://galton.mc.duke.edu/~jason/
> (919)684-1806 (office) 
> (919)684-2275 (fax) 
> Center for Human Genetics - Duke University Medical Center
> http://wwwchg.mc.duke.edu/ 
> 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------

--1052845764-474540613-965055566=:4922
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="Genscan.pm"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.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BwdXNoKEBzcWxsaW5lcywkdG1wKTsNCg0KICAgICAgIyBmZWF0
dXJlc2V0IHNxbA0KDQogICAgICAkdG1wID0gImluc2VydCBpbnRvIGZlYXR1
cmVzZXQoZmVhdHVyZSxpZCkgdmFsdWVzKFwnIiAuICRjb250aWcgLiANCiAg
ICAgICAgIlwnLFwnJGZlYXR1cmVzZXRcJyk7XG4iOw0KICAgICAgcHVzaChA
c3FsbGluZXMsJHRtcCk7DQogICAgfQ0KICAgICRnY291bnQrKzsNCiAgfQ0K
ICByZXR1cm4gQHNxbGxpbmVzOw0KfQ0KDQogICAgDQoxOw0K
--1052845764-474540613-965055566=:4922--