[Bioperl-l] Sequence recognition

Ewan Birney birney@ebi.ac.uk
Sat, 16 Mar 2002 13:05:13 +0000 (GMT)


On Mon, 18 Mar 2002, David wrote:

> Hello,
> Is there any module in Bioperl where you can input a sequence and
> reformat it as you want. Let's say that the user gives a sequence to a
> program and that the module automatically recognizes this format and
> reformat it to another specific format.
> For the output format I know how to do it with SeqIO but I don't know
> how to recognize the format given by the user.
> There is a program available on the web called readseq which does
> exactly what I want but I was just wondering if such a module exists in
> Bioperl.

We don't have this really in Bioperl because to do this effectively one
has to buffer the file internally. This leads to other performance
problems.


If you *would* like to help however, the pattern I would have is as
follows:

  (a) write a function in SeqIO.pm which takes a filename as a argument
and returns the "guess" of the format

  (b) when the SeqIO system is provided with a "file" argument as a
opposed to a "fh" argument and no explicit format, it calls this guess
function and then closes the file and opens it in the guessed format


it would be nice.


> 
> Thanks,
> David.
> 
> 
> _______________________________________________
> 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>. 
-----------------------------------------------------------------