[Bioperl-l] EPCR module with multiple sequence file

Damien Mattei Damien.Mattei@unice.fr
Thu, 18 Jul 2002 17:05:12 +0200


yes , i was talking of the name of the hit sequence and my question 
wasn't really clear, now that i have the sequence name that was hit it's 
up to me to annotate the right one as there could be more than one 
sequence in the file.

Thanks you.

Damien

Jason Stajich wrote:

> You mean you want the name of the sequence that was hit?
> Do this:
> 
> When you get the feature in your loop call:
> print $feat->seqname(), "\n";
> 
> If you mean that you want to see the seqname in your EMBL annotation
> you'll need to explicitly add that tag to the feature like this -
> NOTE: THIS SHOULD BE BEFORE YOUR $seq->add_Feature($feat) LINE.
> 
> $feat->add_tag_value('seqname',$feat->seqname());
> 
> You can also of course dump the feature a GFF by saying
> 
> print $feat->gff_string(), "\n";
> 
> See Bio::SeqFeature::Generic for the complete list of methods that are
> implemented by the features which are returned from Bio::Tools::EPCR.
> 
> 
> -jason
> On Thu, 18 Jul 2002, Damien Mattei wrote:
> 
> 
>>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/
>>-----------------------------
>>
>>_______________________________________________
>>Bioperl-l mailing list
>>Bioperl-l@bioperl.org
>>http://bioperl.org/mailman/listinfo/bioperl-l
>>
>>
> 
-----------------------------
Damien Mattei
C.N.R.S / U.N.S.A - UMR 6549

mailto:mattei@unice.fr
http://www-iag.unice.fr/
-----------------------------