Skip to content

PAML run method docstrings - return value #1708

Closed

Description

@peterjc

The docstrings for the PAML run methods seem a little confusing/out-of-date about the return values.

https://github.com/biopython/biopython/blob/biopython-172/Bio/Phylo/PAML/_paml.py#L88
"Return a process signal so the user can determine if the execution was successful (return code 0 is successful, -N indicates a failure)."
Actually returns None, but will raise an exception if the return code was non-zero.

https://github.com/biopython/biopython/blob/biopython-172/Bio/Phylo/PAML/codeml.py#L172
https://github.com/biopython/biopython/blob/biopython-172/Bio/Phylo/PAML/baseml.py#L160
"Return a process signal so the user can determine if the execution was successful (return code 0 is successful, -N indicates a failure)."
Actually returns the parsed data, or None if parse=False. Again, should raise an exception if the return code was non-zero.

https://github.com/biopython/biopython/blob/biopython-172/Bio/Phylo/PAML/yn00.py#L97
Missing a docstring, but behaves as above.

Could you look at this please @brandoninvergo - even just to confirm my reading of the code, then we can tag this as an easy-fix issue for a potential new contributor to tackle.

Activity

  1. brandoninvergo commented on Jul 4, 2018

    @brandoninvergo
    Contributor

    Yes, it looks like your reading is correct to me. The doc strings in general look like they could be cleaned up and improved (i.e. read() doesn't say what it returns at all).

    I'm in end-of-postdoc-looking-for-a-job mode so it would be better to suggest this as low-hanging-fruit, I think.

  2. added
    good first issue
    on Jul 4, 2018
  3. peterjc commented on Jul 4, 2018

    @peterjc
    MemberAuthor

    Thanks - let's see if we have any volunteers.

  4. funcylambda commented on Oct 5, 2018

    @funcylambda
    Contributor

    I'll pick this up :)

  5. funcylambda commented on Oct 6, 2018

    @funcylambda
    Contributor

    @peterjc - Done, PR added.

  6. farAtGitHub commented on Jan 3, 2020

    @farAtGitHub
    Contributor

    The last PR is over a year old and still open. Is there anything I can do?

  7. peterjc commented on Jan 3, 2020

    @peterjc
    MemberAuthor

    I think it would be reasonable to start from the work on #1824 (preserving the original commits and authorship if you are comfortably enough with git to to that), and addressing the feedback which stopped it being merged then.

  8. farAtGitHub commented on Jan 4, 2020

    @farAtGitHub
    Contributor

    Problem is: Now I cannot commit because of one
    D100 Missing docstring in public module
    and a ton of
    Q000 Remove bad quotes
    per changed file (baseml.py and codeml.py)
    and one
    Bio/Phylo/PAML/codeml.py:129:80: E501 line too long (83 > 79 characters)
    due to 'heavy' indenting.

  9. farAtGitHub commented on Jan 4, 2020

    @farAtGitHub
    Contributor

    I fixed the D209 issues in #2489 building on #1824's work.

  10. peterjc commented on Jan 4, 2020

    @peterjc
    MemberAuthor

    Strange that you are seeing E501, our .flake8 setting should be ignoring that - we'll likely adopt 88 as part of the black style though:

    https://github.com/biopython/biopython/blob/master/.flake8

  11. peterjc commented on Jan 4, 2020

    @peterjc
    MemberAuthor

    For fixing the quotes automatically, I suggest:

    pip install unify
    unify --quote \" --in-place Bio/Phylo/PAML/*.py
    
  12. peterjc commented on Jan 4, 2020

    @peterjc
    MemberAuthor

    Or, since we've allready applied black to the PAML folder, this would fix the quotes and more:

    pip install black
    black Bio/Phylo/PAML/*.py
    
  13. farAtGitHub commented on Jan 4, 2020

    @farAtGitHub
    Contributor

    Perhaps I need to do some more work on my setup. At least the commit hook is doing fine.
    I'll try your suggestions.
    One thing before I destroy everything: Double quotes are the bad guys, we want single quotes, right?

  14. peterjc commented on Jan 4, 2020

    @peterjc
    MemberAuthor

    No, we're following black and using double quotes.

    P.S. The flake8 plugin ought to see our setting inline-quotes = double

  15. farAtGitHub commented on Jan 5, 2020

    @farAtGitHub
    Contributor

    So I merged a (more) current version of master into the old (+ mine) changes last night, solved resulting conflicts and ran the tests. All flake8 issues are gone, too. :-)
    Of course master has changed again already but I think #2489 is ready for review now.

  16. vishesh-soni commented on Nov 15, 2021

    @vishesh-soni

    Hello community, I am vishesh 2nd-year undergraduate I would like to start my contribution in the repo, Saw this issue open currently, Can someone guide me on where to contribute to this issue, if not then What could be a good first issue for me.

  17. peterjc commented on Nov 18, 2021

    @peterjc
    MemberAuthor

    This issue (and any with the "good first issue" tag) should be fine to tackle as a beginner, but you will need to explore the command line phylogenetic tool PAML to understand the context.

  18. RUCHI21CODES commented on Oct 24, 2022

    @RUCHI21CODES

    Sir, I want to contribute in this project, can you please assign me the issue and could you please tell me briefly what am I supposed to do this because the last update on the issue was done long ago

  19. peterjc commented on Oct 25, 2022

    @peterjc
    MemberAuthor

    @RUCHI21CODES no one else seems to be working on this, so please have a go. You will need to read the work in #1824 and #2489 and importantly the feedback on those pull requests.

    You will need some background knowledge of the phylogenetic tool PAML, and at very least to try running it at the command line yourself.

  20. peterjc commented on Jul 30, 2025

    @peterjc
    MemberAuthor

    Closed by #5034 - thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions