[Bioperl-l] Bio::Seq::Meta::Array method

Remo Sanges sanges at biogem.it
Tue Jun 1 02:11:16 EDT 2004


On 31-May-04, at PM 06:46, luisa pugliese wrote:

> Hi Bioperlers,
>     I found the  Bio::Seq::Meta::Array method that should  implements
> generic methods for sequences with residue-based meta information.  
> Since I
> would like to link somehow the residue number of a pdb file to the  
> residues
> of its sequence, I thought I got the right method. I tested it with the
> example reported in the synopsis, but I didn't understand what should  
> I do
> in order to see the link between each residue and the corresponding  
> meta
> information.
>

Luisa,

probably I haven't understand your needs but why don't use features?
I never have used structure informations but if all you need is to add
values to some residues in a sequence you can easily use features...

try this:

#!/usr/bin/perl
use strict;
use warnings;
use Bio::Seq;
use Bio::SeqFeature::Generic;

my $seq = Bio::Seq->new(-seq =>'TKLMILVSHIVILSRM');
								
my $feat1 = new Bio::SeqFeature::Generic (	-start => 2, -end => 5,
									-primary => 'structure',
									-source_tag   => 'PDB',
									-display_name => 'loop'   );
						
my $feat2 = new Bio::SeqFeature::Generic (	-start => 8, -end => 15,
									-primary => 'structure',
									-source_tag   => 'PDB',
									-display_name => 'helix'   );
						
$seq->add_SeqFeature($feat1);
$seq->add_SeqFeature($feat2);

foreach my $feat($seq->get_SeqFeatures) {
	
	print	"Residue from: ".$feat->start." to ".$feat->end.
		" structure: ".$feat->display_name.
		" with seq ".$feat->seq->seq."\n"
		if $feat->primary_tag eq 'structure';
}
						

If you need to understand the implementation of feature system in  
bioperl
please read the tutorial and the how-to:
http://www.bioperl.org/Core/Latest/bptutorial.html
http://bioperl.org/HOWTOs/html/Feature-Annotation.html

In order to be compatible with the actual standard please consider the  
definitions:
http://www.ebi.ac.uk/embl/Documentation/FT_definitions/ 
feature_table.html

Hope this help

Remo


---------------------------------------------------------
Remo Sanges - Ph.D. student
Gene Expression Core Lab - BioGeM
CODE Bionformatic Project - Tigem
Via Pietro Castellino 111
80131 Naples - Italy
tel: +390816132 - 339 - 303
fax: +390816132 - 262
sanges at biogem.it
rsanges at tigem.it
---------------------------------------------------------



More information about the Bioperl-l mailing list