<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, my name is Antonio and I am a beginner in bioperl. I have an
indexed Swiss-Prot flat file, with Bio::Index::Swissprot and I would
like to get a complete entry from an ID. I have this code working:<br>
<font color="#3333ff"> my ($id, $file, $format) = @_;<br>
my $string;<br>
<br>
my $stringio = IO::String->new($string);<br>
my $out = Bio::SeqIO->new(-format => $format, -fh =>
$stringio);<br>
my $index = Bio::Index::Swissprot->new (-filename => $file,
-write_flag => 1);<br>
my $record = $index->fetch($id);<br>
<br>
$out->write_seq($record);<br>
print $string;</font><br>
<br>
It works but the IO::String accumulates memory when I run several
searches. I would like to not use the IO::String module, but I don't
get the complete entry in a variable. For example, it is showed by the
screen with this code:<br>
<font color="#3333ff"> my ($id, $file, $format) = @_;<br>
my $string;<br>
<br>
my $out = Bio::SeqIO->new(-format => $format);<br>
my $index = Bio::Index::Swissprot->new (-filename => $file,
-write_flag => 1);<br>
my $record = $index->fetch($id);<br>
<br>
my $string = $out->write_seq($record);<br>
</font><br>
But I need store the swissprot entry in the $string variable. Please
how could I get it? Thanks in advance,<br>
<br>
Antonio.<br>
<br>
<pre class="moz-signature" cols="72">--
Antonio J. Pérez Pulido, PhD
Instituto Nacional de Bioinformática (INB)
Integrated Bioinformatics Node (GNV-5)
Facultad de Ciencias (Dpto. de Genética)
Campus Universitario de Teatinos
29071 Málaga (Spain)
<a class="moz-txt-link-freetext" href="http://www.ajperez.cjb.net">http://www.ajperez.cjb.net</a> / <a class="moz-txt-link-abbreviated" href="mailto:antoniojperez@uma.es">antoniojperez@uma.es</a>
Tfno. +34 952 131 957
--------------------------------------------------------
Try the server for protein function assigment (AnaGram):
<a class="moz-txt-link-freetext" href="http://jaguar.genetica.uma.es/anagram.htm">http://jaguar.genetica.uma.es/anagram.htm</a>
--------------------------------------------------------
</pre>
</body>
</html>