[Bioperl-l] aminoacid properties of a sequence

Remo Sanges sanges at biogem.it
Fri May 28 04:01:48 EDT 2004


On 28-May-04, at PM 03:13, luisa pugliese wrote:

>  Hi bioperlers,
>      I am looking for a method to link somehow the residue number 
> present in
>  the pdb file to the aminoacids of its sequence, so that when I put the
>  sequence into an alignment and I slice the alignment, I can retrieve 
> which
>  are the residue numbers of the aminoacid present in the sliced 
> alignment.
>  Does anybody knows if there is a clean method to do this instead of 
> writing
>  some perl code?
>

I think that at the third post of this message we can assume that the 
answer
to your question is 'no'.

By the way, instead of re-re-re-repost  this message you can try:

-to be more precise about your needs

-to post some code that seems to be ok but give you some error.

If you need to go from the alignment position of a residue to the 
position
in your original seq you can use:

my $loc_seq = $simple_align->get_seq_by_pos($no);   # $no is the number 
of your sequence in the alignment
my $residue = $loc_seq->location_from_column($residue_aln);   # 
$residue_aln is the position of residue in the alignment


 From the documentation of SimpleAlignment:

Methods to map a sequence position into an alignment column and back.
column_from_residue_number() does the former. The latter is really a
property of the sequence object and can done using
Bio::LocatableSeq::location_from_column:

     # select somehow a sequence from the alignment, e.g.
     my $seq = $aln->get_seq_by_pos(1);
     #$loc is undef or Bio::LocationI object
     my $loc = $seq->location_from_column(5);



  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