[Bioperl-l] display ID fasta format
debutant.bioperl
joyeux2000 at hotmail.fr
Thu May 19 21:48:41 UTC 2011
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";
}
}
--
View this message in context: http://old.nabble.com/display-ID-fasta-format-tp31659833p31659833.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l
mailing list