Collections:
Calculate Pairwise Sequence Alignment
How to Calculate Pairwise Sequence Alignment?
✍: FYIcenter.com
You can use the Bio.Align.PairwiseAligner() function
to Calculate Pairwise Sequence Alignment.
It uses the Needleman-Wunsch, Smith-Waterman, Gotoh (three-state),
and Waterman-Smith-Beyer global and local pairwise alignment algorithms.
Here is an example on how to calculate the alignment score using the score() function.
fyicenter$ python
>>> from Bio import Align
>>> aligner = Align.PairwiseAligner()
>>> score = aligner.score("GAACT", "GAT")
>>> score
3.0
You can also use the align() function to see how two sequences can be aligned.
>>> alignments = aligner.align("GAACT", "GAT")
>>> for alignment in alignments:
... print(alignment)
...
target 0 GAACT 5
0 ||--| 5
query 0 GA--T 3
target 0 GAACT 5
0 |-|-| 5
query 0 G-A-T 3
The output shows 2 alignments (2 ways to align the given 2 sequences).
In both alignments, the alignment score is 3.0, which calculated with 2 default scoring rules:
For example, the following Pairwise Sequence Alignment will get a score of 3.0.
target 0 G A A C T 5
0 | | - - | 5
query 0 G A - - T 3
---------
score 1 1 0 0 1 = 3.0
⇒ Pairwise Sequence Alignment Score Settings
⇐ Parse PDB Entry with Bio.PDB.MMCIFParser.parser Module
2023-05-09, 1438🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1004350 Names: InChIKey: ROSMEMOQKKZVSZ-WUKNDPDIS A-NSMILES: CCC(C)C(N)C(=...
Molecule Summary: ID: FYI-1003671 Names: InChIKey: IAWQHJBMHBLBEN-UHFFFAOYS A-NSMILES: O=CNc1nc(CCl)...
Molecule Summary: ID: FYI-1003764 Names: InChIKey: TVEQULQKHHXQRC-UHFFFAOYS A-NSMILES: COC(c1ccc(CCC...
Molecule Summary: ID: FYI-1006725 Names: InChIKey: WCUHTHVUZQCBTI-KBAYOESNS A-NSMILES: O[C@@H]4Cc2c(...
Molecule Summary: ID: FYI-1001105 SMILES: C=CCN1CCC23C4C(=O)CCC2(C 1CC5=C3C(=C(C=C5)OC6C(C( C(C(O6)C(=...