[Bioperl-l] Interface of the method
Jun Yin
jun.yin at ucd.ie
Thu Jun 17 09:42:08 EDT 2010
BTW, I am a student in the Google Summer of Code 2010. I am currently
working on refactoring the Bio::Align subsystem.
If you are interested in this project, please visit my coding blog:
http://gsoc2010-junyin.blogspot.com/
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 Jun Yin
Sent: Thursday, June 17, 2010 11:25 AM
To: bioperl-l at lists.open-bio.org
Cc: jun.yin at ucd.ie
Subject: [Bioperl-l] Interface of the method
Hi,
I am think of updating the methods in Bio::SimpleAlign to a more usable
form.
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
weak columns
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
select_Seq
select_columns
remove_Seq
remove_columns
mask_columns
.
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
$new_aln=$aln->select_Seq([1,3,5..10,15],"toggle")
Or
$new_aln=$aln->select_columns([2.25,34,52..60])
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.
Cheers,
Jun Yin
Ph.D. student in U.C.D.
Bioinformatics Laboratory
Conway Institute
University College Dublin
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l
__________ Information from ESET Smart Security, version of virus signature
database 5099 (20100509) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature
database 5099 (20100509) __________
The message was checked by ESET Smart Security.
http://www.eset.com
More information about the Bioperl-l
mailing list