[Bioperl-l] PARSE GENBANK SEQUENCE FILES

Melissa L. Kimball mkimball@med.unc.edu
Mon, 10 Jun 2002 12:40:39 -0400


I am very new to bioperl.

I need to selectively convert *.seq files from Genbank into fasta format.
Bio::SeqIO has this capability.  Though, I am having a problem writing the
sequence to a local file.  Here is the error:


>Filehandle GEN1 opened only for input at /Library/Perl/Bio/Root/IO.pm line 305,
>        <GEN0> line 1174524 (#1)
>    (W io) You tried to write on a read-only filehandle.  If you intended it
>    to be a read-write filehandle, you needed to open it with "+<" or "+>"
>    or "+>>" instead of with "<" or nothing.  If you intended only to write
>    the file, use ">" or ">>".  See perlfunc/open.


I have looked in the IO.pm module to fix the problem on line 305, but I
don't know perl well enough to interpret what it is doing.  This is what is
on line 305:


>sub _print {
>    my $self = shift;
>    my $fh = $self->_fh || \*STDOUT;
>>>  print $fh @_;   <<<<---------------THIS IS LINE 305<<<<<<<------------


The other thing is, that I don't want to convert the entire *.seq file into
fasta.  I need to be selective.  The conditions lie within the annotation
part of the sequence.  I have been able to acquire the species by using:

>Bio::SeqIO->next_seq()  //RETURNS RichSeq
>RichSeq->species()      //RETURNS Species
>Species->species()      //RETURNS String

But I also need to retrieve sequences based on other information in the
annotation.  The methods provided in SeqIO, Seq, Annotation, Species, and so
forth are not enough!  The values returned from the methods are of no use
for me.  Maybe I am not implementing them properly, I am only using the
doc.bioperl.org documentation site as my guide.  Are there any other modules
that parse genbank *.seq files, so that I can obtain any part of the
annotation of a sequence?

SPECS
-----
OS = Mac OSX
MACHINE = POWERBOOK
PERL = v. 5.8.0
BIOPERL = 1.0 stable (I think)

Thanks for all the help in advance ;-)

.........................................................
Melissa Kimball
University of North Carolina
Giddings Bioinformatics Group - Microbiology & Immunology
mkimball@med.unc.edu
.........................................................