Skip to content

Documentation to the build() function - #1841

Merged
peterjc merged 2 commits into
biopython:masterfrom
vanya-antonov:patch-1
Nov 2, 2018
Merged

peterjc merged 2 commits into
biopython:masterfrom
vanya-antonov:patch-1

Conversation

@vanya-antonov

@vanya-antonov vanya-antonov commented Nov 1, 2018 •

Copy link
Copy Markdown
Contributor

This pull request addresses issue #1840

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file and understand that AppVeyor and
    TravisCI will be used to confirm the Biopython unit tests and flake8 style
    checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

The commit solves this issue: #1840
* a more relevant example is used in the function documentation
* The argument documentation was updated to match the function definition -- "nucl_align" was changed to "nucl_seqs"; "frameshift" argument was removed
Comment thread Bio/codonalign/__init__.py Outdated
>>> from Bio.Alphabet import IUPAC

This example answers this Biostarts question: https://www.biostars.org/p/89741/
>>> from Bio.Alphabet import IUPAC, generic_protein

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put a blank line here please? Partly for consistent style, but also IIRC, one of the API docstring processing tools wants this too.

Comment thread Bio/codonalign/__init__.py Outdated
>>> pro2 = SeqRecord(Seq('SGTSRTKRLLLLAALGAAGGALE', alphabet=IUPAC.protein),id='pro2')
>>> from Bio.codonalign import build
>>> seq1 = SeqRecord(Seq('ATGTCTCGT', alphabet=IUPAC.IUPACUnambiguousDNA()), id='pro1')
>>> seq2 = SeqRecord(Seq('ATGCGT', alphabet=IUPAC.IUPACUnambiguousDNA()), id='pro2')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use alphabet=generic_dna rather than alphabet=IUPAC.IUPACUnambiguousDNA() please, and add the import from Bio.Alphabet import generic_dna, generic_protein (which you need for the next line too).

Comment thread Bio/codonalign/__init__.py Outdated
Return a CodonAlignment object

>>> from Bio.Alphabet import IUPAC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some trailing white space here which is what the flake8 check on TravisCI is complaining about:

$ flake8 Bio/
Bio/codonalign/__init__.py:45:1: W293 blank line contains whitespace

@peterjc

peterjc commented Nov 2, 2018 •

Copy link
Copy Markdown
Member

With minor tweaks I think this would be a nice improvement - any comments @zruan ?

* Added a blank line before the example
* Removed trailing white spaces on the empty line to comply with TravisCI flake8 check
* alphabet=generic_dna is used rather than alphabet=IUPAC.IUPACUnambiguousDNA()
@codecov

codecov Bot commented Nov 2, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #1841 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1841      +/-   ##
==========================================
- Coverage   85.46%   85.46%   -0.01%     
==========================================
  Files         301      301              
  Lines       49308    49308              
==========================================
- Hits        42140    42139       -1     
- Misses       7168     7169       +1
Impacted Files Coverage Δ
Bio/codonalign/__init__.py 73.5% <ø> (ø) ⬆️
Bio/Align/__init__.py 84.3% <0%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 868b63d...ff7dd0e. Read the comment docs.

@peterjc
peterjc merged commit d9132b1 into biopython:master Nov 2, 2018
@peterjc

peterjc commented Nov 2, 2018

Copy link
Copy Markdown
Member

Thank you!

P.S. Just let us know if you change your mind and want to be added to the contributor lists.

@vanya-antonov

vanya-antonov commented Nov 2, 2018 •

Copy link
Copy Markdown
Contributor Author

Thank you!

P.S. Just let us know if you change your mind and want to be added to the contributor lists.

No problem. It would be great to see my name in the contributor list:)

@vanya-antonov
vanya-antonov deleted the patch-1 branch November 17, 2018 12:13
peterjc added a commit that referenced this pull request Nov 19, 2018
See pull request #1841 for Bio/codonalign/__init__.py
peterjc added a commit to peterjc/biopython that referenced this pull request Feb 5, 2024
Original author Zheng Ruan and contributors since as tracked
by version control have agreed:

 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Rands (@chris-rands)
   biopython#1301
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Emmanuel Noutahi (@maclandrol)
   biopython#898 (comment)
 - Ivan Antonov (@vanya-antonov)
   biopython#1841
 - Michiel de Hoon (@mdehoon)
   biopython#898 (comment)
 - @morrme
   biopython#1172 (comment)
 - Nick Negretti (@nimne)
   biopython#1768 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
 - Zheng Ruan (@zruan)
   biopython#898 (comment)
peterjc added a commit that referenced this pull request Feb 5, 2024
Original author Zheng Ruan and contributors since as tracked
by version control have agreed:

 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Chris Rands (@chris-rands)
   #1301
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Emmanuel Noutahi (@maclandrol)
   #898 (comment)
 - Ivan Antonov (@vanya-antonov)
   #1841
 - Michiel de Hoon (@mdehoon)
   #898 (comment)
 - @morrme
   #1172 (comment)
 - Nick Negretti (@nimne)
   #1768 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430
 - Travis Wrightsman (@twrightsman)
   #898 (comment)
 - Zheng Ruan (@zruan)
   #898 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants