[Bioperl-l] Interface of the method
jun.yin at ucd.ie
Thu Jun 17 06:24:50 EDT 2010
I am think of updating the methods in Bio::SimpleAlign to a more usable
For example, the current method for remove_columns is:
$aln->remove_columns([0,0],[6,8]); #remove the 1st, and 6th to 8th columns
Or $aln->remove_columns(['mismatch','weak']); #remove the mismatched and
And, select columns is by:
$aln2 = $aln->slice(20,30); #select the 20th to 30th columns
You may notice that even similar methods have difference ways to use, (the
first uses references and the second only defines $start and $end).
This may cause some confusion.So I propose that we should use a more
consistent way for similar functions.
For example, the methods of
should have the same interface.
One solution is
$new_aln=$aln->select_Seq(1,3,5..10,15); #the user can select the first,
third, fifth to tenth and fifteenth sequences at the same time
But the problem is that it is hard to distinguish optional parameters from
the method call.
So I suggest, we can do
So that all the selections are based on an array reference, and the
parameters are strings, thus easy to control the method.
As the package is community based, I am glad to hear your suggestions before
I change the Bio::SimpleAlign package.
Ph.D. student in U.C.D.
University College Dublin
More information about the Bioperl-l