You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve documentation of Bio.codonalign.build() function #1840
Apparently, this Biopython function was developed to help with similar tasks. However, the example from this function documentation may be a bit confusing because the final nucleotide alignment has a single gap while I would only expect triple-gaps in a codon alignment:
>>> print(codon_aln)
CodonAlphabet(Standard) CodonAlignment with 2 rows and 69 columns (23 codons)
TCAGGGACTGCGAGAACCAAGCTACTGCTGCTGCTGGCTGCGCTCTGCGCCGCAGGT...GAG pro1
TCAGGGACTTCGAGAACCAAGCG-CTCCTGCTGCTGGCTGCGCTCGGCGCCGCAGGT...GAG pro2
I think that the original idea of this example was to demonstrate that the function is able to handle frameshifts caused by single nucleotide insertions. At the same time this may not be the most important feature of the function and an example that converts a single gap from a protein alignment into triple gaps in the nucleotide one may be more informative.
That sounds good - do you fancy turning this into a pull request? You can do it all from the GitHub website if you like (without running git at the command line).
Activity
peterjc commentedon Nov 1, 2018
Which bit of the Biopython documentation specifically are you referring to?
vanya-antonov commentedon Nov 1, 2018
Hello Peter,
I am talking about this part from the "biopython/Bio/codonalign/init.py" file:
biopython/Bio/codonalign/__init__.py
Lines 33 to 64 in 868b63d
peterjc commentedon Nov 1, 2018
Could you contribute a more typical example to insert above this one?
vanya-antonov commentedon Nov 1, 2018
Well, we can even use the sequences from the Biostars question:
vanya-antonov commentedon Nov 1, 2018
BTW, there are also some typos in the documentation.
The second argument of the function is
nucl_seqs, however in the documentation it is callednucl_align:biopython/Bio/codonalign/__init__.py
Line 37 in 868b63d
I believe
nucl_alignshould be changed tonucl_seqsin documentation.The documentation mentions the
frameshiftargument:biopython/Bio/codonalign/__init__.py
Line 43 in 868b63d
However, there is no such argument in the function definition..
peterjc commentedon Nov 1, 2018
That sounds good - do you fancy turning this into a pull request? You can do it all from the GitHub website if you like (without running git at the command line).
Documentation to the build() function