<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Dear BioPerl developers,<br>
<br>
I come with a question regarding the </tt><tt><tt>get_PrimarySeq_stream</tt>
!<br>
<br>
I am using the Bio::DB:Fasta module to access my fasta sequences
and i am facing some problem with the </tt><tt><tt>get_PrimarySeq_stream()</tt>.</tt><br>
<tt><tt>When i check the content of the db object, all the sequences
are indexed (i mean that i can see all the sequences ids in the
offsets hash).<br>
<br>
</tt>I then use the get_PrimarySeq_stream to loop over all my
sequences, but only 1 sequence is retrieved from the stream
object.<br>
I tried to look for some explanations, and the only thing i could
find is that it seems that my seq_ids are considered as undef.
during the while($dbstream->next_seq()) statement when reaching<br>
IndexedBase.pm line 1116<br>
<br>
I tried to loop over all sequence ids using my @seq_ids =
$self->{fastaObj}->get_all_primary_ids; and it works very
well.<br>
<br>
I don't understand why the stream object does not retrieve all the
sequences whereas get_all_primary_ids does!<br>
Is there something wrong with my input FASTA (my ids are very
long...) or am i missing something?<br>
<br>
I am really interested in finding out why i am not able to use </tt><tt><tt><tt>get_PrimarySeq_stream
!<br>
<br>
Many thanks in advance :)<br>
<br>
Regards,<br>
<br>
Helene<br>
</tt></tt></tt><tt><tt><tt><br>
<tt><tt>#----------------------------------<br>
# </tt></tt></tt></tt>here is the part of code that
causes problem:</tt><tt><tt><br>
</tt># initialize db::fasta object<br>
$self->{fastaObj} = Bio::DB::Fasta->new("test2.fna",
-reindex => 1);<br>
<br>
# create stream object<br>
my $seq_stream = $self->{fastaObj}->get_PrimarySeq_stream();<br>
$self->{nbSeqFetchedInStream}=0;<br>
<br>
# loop over all seq in BioDBFasta obj using stream obj.<br>
while ($self->{seq} = $seq_stream->next_seq()){<br>
#foreach my $seq_id (@seq_ids){<br>
#$self->{seq} =
$self->{fastaObj}->get_Seq_by_id($seq_id); # to use with
foreach loop<br>
<br>
print (" New sequence: ", Dumper $self->{seq});<br>
$self->{nbSeqFetchedInStream}++;<br>
}<br>
</tt><tt><tt>print </tt>(" Fetched sequences in _PrimarySeq_stream:
$self->{nbSeqFetchedInStream}");<br>
#----------------------------------<br>
<br>
<br>
<br>
<br>
<br>
</tt>
<div class="moz-signature">-- <br>
<p><b>--> Nouvelle adresse e-mail: <a class="moz-txt-link-abbreviated" href="mailto:helene.rimbert@inra.fr">helene.rimbert@inra.fr</a>
<--</b></p>
<pre>Hélène RIMBERT
Bioinformatic Engineer
<a class="moz-txt-link-abbreviated" href="mailto:helene.rimbert@inra.fr">helene.rimbert@inra.fr</a>
UMR 1095 INRA/UBP – Site de Crouel
Tèl. : +33 (0)4 73 62 43 49
5 chemin de beaulieu
63039 Clermont-Ferrand Cedex 2
France
<a class="moz-txt-link-freetext" href="https://www6.ara.inra.fr/umr1095_eng/">https://www6.ara.inra.fr/umr1095_eng/</a></pre>
</div>
</body>
</html>