[Bioperl-l] EPCR module with multiple sequence file

Damien Mattei Damien.Mattei@unice.fr
Thu, 18 Jul 2002 16:06:55 +0200


i have two questions about EPCR module.

First is it able to parse .epcr files generated with a sequence file 
containing many fasta sequence.

Second how can i retrieve the name of the sequence .

if it's not clear here is how i work:

e-PCR stsfile many_seq_in_one_file.nt > output.epcr

and i run this program:

#!/usr/bin/perl -w
# A simple parser for ePCR data
# assuming ePCR data is already generated in file output.epcr


use Bio::Tools::EPCR;
use Bio::SeqIO;
my $parser = new Bio::Tools::EPCR(-file => 'output.epcr');
my $seqio = new Bio::SeqIO(-format => 'fasta', -file => 
'many_seq_in_one_file.nt');
my $seq = $seqio->next_seq || die("cannot get a seq object from SeqIO");

while( my $feat = $parser->next_feature ) {
     # add EPCR annotation to a sequence
     $seq->add_SeqFeature($feat);
     print "Feature from ", $feat->start, " to ",
     $feat->end, " Primary tag  ", $feat->primary_tag,
     ", produced by ", $feat->source_tag(), "\n";

     foreach $tag ( $feat->all_tags() ) {
	print "Feature has tag ", $tag, " with values, ",
	join(' ',$feat->each_tag_value($tag)), "\n";
     }
     print "new feature\n" if $feat->has_tag('new');
     # features can have sub features
     my @subfeat = $feat->sub_SeqFeature();

     print "\n";

}

my $seqout = new Bio::SeqIO(-format => 'embl');
#$seqout->write_seq($seq);

this will print all the info in output.epcr
but not the sequence name.

Damien.

-----------------------------
Damien Mattei
C.N.R.S / U.N.S.A - UMR 6549
mailto:mattei@unice.fr
http://www-iag.unice.fr/
-----------------------------