[Bioperl-l] PARSE GENBANK SEQUENCE FILES
Stefan Kirov
skirov@utk.edu
Mon, 10 Jun 2002 13:40:40 -0500
Did you read the tutorial? Are you using write->seq method? What is the code you use
to write to a local file? You also did not say based upon what you need to select
the subsequence(?) you need. Look at Bio::SeqFeature and Bio::Annotation. The
tutorial is at http://www.bioperl.org/Core/bptutorial.html.
But you usually do not mess with the Bioperl modules code, unless you know very well
what you are doing. And the code is working fine. Are trying to write to the same
place you are reading from?
Try also to do a simple sequence conversion as written in the Bioperl tutorial.
Stefan
"Melissa L. Kimball" wrote:
> 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
> .........................................................
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
Please Note: New area code 865, effective NOW!
Stefan A. Kirov, Ph.D.
Dept Biochemistry and Cellular and Molecular Biology
F233 Walters Life Sciences Building
1414 Cumberland Avenue
University of Tennessee
Knoxville, TN 37996-0840
Tel: 865-974-6710