[Bioperl-l] GSoC BioPerl Project Page

Kevin Brown Kevin.M.Brown at asu.edu
Tue May 24 15:17:15 UTC 2011


use List::Util qw(min max);

Now you don't need to code them up.

Kevin Brown
Center for Innovations in Medicine
Biodesign Institute
Arizona State University 
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Jun Yin
> Sent: Tuesday, May 24, 2011 2:49 AM
> To: 'Lorenzo Carretero Paulet'; bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] GSoC BioPerl Project Page
> 
> Hi, Lorenzo,
> 
> I don't think there is such function in SimpleAlign to get the minimal
> and
> maximal length for the alignment at the moment.
> 
> You can try:
> 
> my @lengths;
> foreach my $seq ($aln->each_seq) {
> 	push @lengths,$seq->_ungapped_len;  #Get the ungapped length of a
> sequence
> }
> 
> my $minlen=min(@lengths);
> my $maxlen=max(@lengths);
> 
> Of course, you need to write your own subroutines for min and max.
> 
> Cheers,
> Jun Yin
> Ph.D. student in U.C.D.
> 
> Bioinformatics Laboratory
> Conway Institute
> University College Dublin
> 
> 
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Lorenzo
> Carretero
> Paulet
> Sent: Monday, May 23, 2011 5:44 PM
> To: bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] GSoC BioPerl Project Page
> 
> Hi all,
> I have created a MSA SimpleAlign object and I'd like to get the number
> of aligned residues of a given sequences (e.g. the sequence with the
> maximum or the minimum length). I have been playing with
> $aln->num_residues() (which returns the total number of residues in the
> alignment) and $aln->length() (which returns the maximum length of the
> alignment) but didn't found a way. Anyone knows how to to do this?.
> Thanks,
> Lorenzo
> 
> --
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> *-*-*
> Lorenzo Carretero Paulet
> Institute for Plant Molecular and Cell Biology - IBMCP (CSIC-UPV)
> Integrative Systems Biology Group
> C/ Ingeniero Fausto Elio s/n.
> 46022 Valencia, Spain
> 
> Phone:  +34 963879934
> Fax:    +34 963877859
> e-mail: locarpau at upvnet.upv.es
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> *-*-*
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list