Repository navigation
Documentation to the build() function - #1841
Conversation
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
| >>> from Bio.Alphabet import IUPAC | ||
|
|
||
| This example answers this Biostarts question: https://www.biostars.org/p/89741/ | ||
| >>> from Bio.Alphabet import IUPAC, generic_protein |
There was a problem hiding this comment.
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.
| >>> 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') |
There was a problem hiding this comment.
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).
| Return a CodonAlignment object | ||
|
|
||
| >>> from Bio.Alphabet import IUPAC | ||
|
|
There was a problem hiding this comment.
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
|
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 Report
@@ 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
Continue to review full report at Codecov.
|
|
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:) |
See pull request #1841 for Bio/codonalign/__init__.py
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)
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)
nucl_alignwas changed tonucl_seqs;frameshiftargument was removedThis 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.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)