[Bioperl-l] STDOUT write_seq
Marc Logghe
Marc.Logghe at devgen.com
Thu May 8 10:26:24 EDT 2003
use IO::String;
my $s;
my $io = IO::String->new(\$s);
my $seqOut = new Bio::SeqIO(-format=>'swiss', -fh => $io);
$seqOut->write_seq($seq1);
print $s; # $s contains the record
HTH,
Marc
> -----Original Message-----
> From: Guido Dieterich [mailto:Guido.Dieterich at gbf.de]
> Sent: Thursday, May 08, 2003 9:00 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] STDOUT write_seq
>
>
> Hi,
> i have a little problem with BioPerl. I want to write a
> Tk-program that
> shows a complete swissProt entry in a text widget.
>
>
> my $gb = new Bio::DB::SwissProt();
> my $seq1 = $gb->get_Seq_by_Acc($id);
> my $seqOut = new Bio::SeqIO(-format=>'swiss');
> $seqOut->write_seq($seq1);
>
> The last line prints the swissprot entry in the dos-window,
> but I want
> to have the file in one variable, so that I later can insert it in a
> text-field of Tk?
>
> How to get the stream ($seqOut->write_seq($seq1)) in a variable.
> Thanks!
> --
>
>
> Dr. Guido Dieterich
> Dipl.-Biologe
>
>
> BioComputing
>
>
>
> SB - Strukturbiologie
> \==-|
> GBF - Gesellschaft fuer Biotechnologische Forschung
> \=/
> 0010010010100101110010
> German Research Centre for Biotechnology
> | /-\
>
> /-==|
> 0010100100111101010010
> WWW: http://www.gbf.de _/_/_/ _/_/_/ _/_/_/
> |==-/
> EMAIL: gdi at gbf.de _/ _/ _/ _/ _/
> \=/
> 0100100100010010010101
> _/ _/ _/ _/
> /\
> Mascheroder Weg 1 _/ _/ _/_/_/ _/_/_/
> /=-\
> 1101001010100101010101
> D-38124 Braunschweig _/ _/ _/ _/ _/
> Tel: +(49) 531 6181 745 _/ _/ _/ _/ _/
> FAX: +(49) 531 2612 388 _/_/_/ _/_/_/ _/
>
> http://struktur.gbf.de/
>
>
> Es ist nicht genug, zu wissen, man muss auch anwenden.
> Es ist nicht genug, zu wollen, man muss auch tun.
> JOHANN WOLFGANG VON GOETHE
> Deutscher Dichter
> (1749 - 1832)
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://pw600a.bioperl.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list