cjfields / Bio-Tools-Primer3Redux

A reimplementation of BioPerl's Primer3-related code for primer3 v1 and v2
http://bioperl.org
10 stars 5 forks source link

PRIMER_TASKs as method names #11

Closed fschwach closed 13 years ago

fschwach commented 13 years ago

This is my suggestion for a slight extension to the API so that primer3 can be run with an explicit task name as used by the PRIMER_TASK parameter. Like so:

$results = $primer3->pick_pcr_primers( $seq );

or

$results $primer3->check_primers();

This branch has all the modifications of my master branch for which I already sent you a pull request. In addition I generate synonyms for 'run', one for each allowed value of PRIMER_TASK. These forward to a private method _do_run. The old way of running primer3 ($primer3->run( $seq ) ) is also still there, so there should be no issues with backwards compatibility. I think this makes the module more intuitive to use. I'm not sure if the auto-generation of methods is ok with the general BioPerl coding style? If not I can turn them into explicit subs with PODs. I also updated the tests to use this new interface. I have also taken the liberty to add my name to the list of contributors. I hope you don't mind this shameless act of vanity.... :)