[Biopython-dev] pypaml
Brandon Invergo
b.invergo at gmail.com
Fri Jul 1 12:28:09 EDT 2011
Hi Eric,
I lied. I took a moment to at least implement the kwargs change:
https://github.com/brandoninvergo/biopython/commit/533b06476899b631ec28a6e4cc97a2e669a45ea0
It seems to work swimmingly but I haven't tested it extensively yet.
There was already exception-handling in place.
Ok, *now* I'm off for the weekend!
Cheers,
Brandon
On Fri 01 Jul 2011 06:20:30 PM CEST, Brandon Invergo wrote:
> Hi Eric,
> You're right, I had the functionality of kwargs mixed up in my head
> (I've rarely used it) and I forgot that it's passed in as a dict. In
> that case, it's relatively straight-forward to do. Something like this:
>
> def set_options(self, **kwargs):
> for option, value in kwargs.items():
> if option in self._options:
> self._options[option] = value
> # else:
> # Raise exception
>
> Not sure if raising an exception would really be necessary here. (ps - I
> haven't tested that code, I just typed it up quickly now)
>
> Regarding the splitting of functionality, to an extent it makes sense
> but I wonder if it's worth it, since the PAML commandline programs only
> take a single argument, the path to the control file. However, if the
> main advantages lie in code readability and standardization with the
> rest of the applications framework, then I think it's ok.
>
> Unfortunately I'll be unavailable all weekend (starting in about 3
> minutes) but I should be free on Monday to work on it.
>
> Cheers, Brandon
>
> On Fri 01 Jul 2011 04:17:26 AM CEST, Eric Talevich wrote:
>> Hi Brandon,
>>
>> Looks good, thanks! It's just enough to get the point across, and the
>> wiki is a fine place for extended examples.
>>
>> Reading this, I notice that the cml.set_option(key, value) gets kind
>> of tedious when a lot of options need to be set. It would be nice to
>> be able to set them all in one go, as keyword arguments:
>>
>> cml.set_options(
>> seqtype=1,
>> verbose=0,
>> noisy=0,
>> RateAncestor=0,
>> model=0,
>> NSsites=[0, 1, 2],
>> CodonFreq=2,
>> cleandata=1,
>> fix_alpha=1,
>> kappa=4.54006,
>> )
>>
>> What do you think? Worth implementing?
>>
>> Cheers,
>> Eric
>>
>>
>> On Wed, Jun 29, 2011 at 11:27 AM, Brandon Invergo <b.invergo at gmail.com
>> <mailto:b.invergo at gmail.com>> wrote:
>>
>> Well, it's not much, but how's this?
>> https://github.com/brandoninvergo/biopython/tree/doc-branch
>> Do you want me to go more into detail about the options available like
>> in the wikior is this sufficient as a tutorial? Just let me know...
>>
>> Cheers,
>> Brandon
>>
>> On Mon, Jun 27, 2011 at 5:26 PM, Brandon Invergo
>> <b.invergo at gmail.com <mailto:b.invergo at gmail.com>> wrote:
>> > Hi Eric,
>> > No problem, I'll start writing something up now.
>> > Cheers,
>> > -brandon
>> >
>> > On Sun, Jun 26, 2011 at 7:32 PM, Eric Talevich
>> <eric.talevich at gmail.com <mailto:eric.talevich at gmail.com>> wrote:
>> >> Hi Brandon,
>> >>
>> >> I just added a stub for Bio.Phylo.PAML to the main Tutorial:
>> >>
>> https://github.com/biopython/biopython/commit/190a85c5bde9c079fa5cee4ab9f8ee3362538cb8
>>
>> >>
>> >> Do you think you could add some more to that section, maybe
>> pulling a chunk
>> >> of content from the wiki page you just wrote? If you're not
>> comfortable with
>> >> LaTeX you can just point me to some text and I'll add it.
>> >>
>> >> Thanks,
>> >> Eric
>> >>
>> >> On Thu, Jun 16, 2011 at 11:34 AM, Brandon Invergo
>> <b.invergo at gmail.com <mailto:b.invergo at gmail.com>>
>> >> wrote:
>> >>>
>> >>> Ok, the documentation is finished:
>> >>> http://biopython.org/wiki/PAML
>> >>>
>> >>> Cheers,
>> >>> Brandon
>> >>>
>> >>> On Wed, Jun 15, 2011 at 1:54 PM, Brad Chapman
>> <chapmanb at 50mail.com <mailto:chapmanb at 50mail.com>> wrote:
>> >>> > Brandon;
>> >>> >
>> >>> >> Ok I've just sent the email to the main list.
>> >>> >
>> >>> > Awesome, thanks for this. Hope this convinces some other folks to
>> >>> > take a look.
>> >>> >
>> >>> >> I can write up some documentation this week. What is the
>> official
>> >>> >> procedure for adding documentation to the wiki, if any? Or
>> can I just
>> >>> >> create an account and start writing?
>> >>> >
>> >>> > Create an account and start writing. Nothing official except that
>> >>> > documentation is good.
>> >>> >
>> >>> >> Also, just to double-check, are my docstrings all sufficient
>> or should
>> >>> >> I expand those?
>> >>> >
>> >>> > Your code comments looked great to me. The end user documentation
>> >>> > seems to be the main thing at this point: describing how
>> someone can
>> >>> > pick up and get started with the code.
>> >>> >
>> >>> > Thanks again for all the work,
>> >>> > Brad
>> >>> > _______________________________________________
>> >>> > Biopython-dev mailing list
>> >>> > Biopython-dev at lists.open-bio.org
>> <mailto:Biopython-dev at lists.open-bio.org>
>> >>> > http://lists.open-bio.org/mailman/listinfo/biopython-dev
>> >>> >
>> >>> _______________________________________________
>> >>> Biopython-dev mailing list
>> >>> Biopython-dev at lists.open-bio.org
>> <mailto:Biopython-dev at lists.open-bio.org>
>> >>> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>> >>
>> >>
>> >
More information about the Biopython-dev
mailing list