[Bioperl-l] problem with Bio::SeqIO->write_seq

Brian Osborne brian_osborne at cognia.com
Wed May 7 10:19:10 EDT 2003


Prachi,

It's likely that the value in $r is not matching any keys in your index. See
the section in the online bptutorial on Bio::Index::Fasta, it discusses the
method you need to use to specify substrings in the fasta header as keys.

Brian O.

-----Original Message-----
From: bioperl-l-bounces at bioperl.org [mailto:bioperl-l-bounces at bioperl.org]On
Behalf Of Prachi Shah
Sent: Friday, May 02, 2003 2:28 PM
To: bioperl
Subject: [Bioperl-l] problem with Bio::SeqIO->write_seq

Hi,

I was playing around with the Bio::Index::Fasta
module, but got the following error. I index a Fasta
formatted sequence file and then try to search for
sequences with the fetch function.
I copied the code from the documentation of
Bio::Index::Fasta. The only difference is that the
example code in the documentation prints to STDIO and
I wanted it to write to a file. I have a very silly
mistake. I will really appreciate any help.

thanks,
Prachi.

------------- EXCEPTION  -------------
MSG: Did not provide a valid Bio::PrimarySeqI object
STACK Bio::SeqIO::fasta::write_seq
C:/Perl/site/lib/Bio\SeqIO\fasta.pm:166
STACK toplevel intersectionsequence-cmd.pl:367

--------------------------------------


### snippet of code ###
my $inx1 = Bio::Index::Fasta->new(
'-filename' => $Index_File_Name1,
'-write_flag' => 1);
my $out = Bio::SeqIO->new('-format' => 'Fasta','-file'
=> ">$clusterfile");
my $seq = $inx1->fetch($r);
$out->write_seq($seq);
################





__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
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