[Bioperl-l] display ID fasta format

debutant.bioperl joyeux2000 at hotmail.fr
Fri May 20 14:27:28 UTC 2011


Hi,
Thanks a lot Hotz, these links are very useful for me ^^.

Hotz, Hans-Rudolf-2 wrote:
> 
> Hi 'joyeux2000'
> 
> Have you read:
> 
> http://www.bioperl.org/wiki/HOWTO:Beginners
> http://www.bioperl.org/wiki/HOWTO:SeqIO
> 
> 
> 
> Regards, Hans
> 
> 
> On 05/19/2011 11:48 PM, debutant.bioperl wrote:
>>
>> Hello all,
>> I want to display the sequence ID in which case there is an occurrence of
>> the motif. Please, is there a regular expression to display the ID for
>> the
>> fasta format, if not how can I do to display the first word line.
>> excuse me for these questions, but really I'm still a beginner.
>> cordially
>>
>> ................................................................................................................................
>>
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> use Bio::SeqIO;
>>
>> my $file = 'eee.txt';
>> my $in  = Bio::SeqIO->new(-file =>  $file , '-format' =>  'fasta');
>> while ( my $seq = $in->next_seq() ) {
>>      my $seqstring = $seq->seq;
>>      while ( $seqstring =~ m/(ATCGA)/g ) {
>>          my $end = pos($seqstring);
>>          my $start = $end - length($&) + 1;
>>          print "ATCGA commence à la position $start\nse termine juste
>> avant
>> la position $end\n";
>>      }
>> }
>>
>>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 

-- 
View this message in context: http://old.nabble.com/display-ID-fasta-format-tp31659833p31664579.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.





More information about the Bioperl-l mailing list