[Bioperl-l] GSoC BioPerl Project Page

Jun Yin jun.yin at ucd.ie
Tue May 24 09:49:22 UTC 2011


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





More information about the Bioperl-l mailing list