Collections:
Pre-defined Sequence Alignment Score Settings
How to Use Pre-defined Sequence Alignment Score Settings?
✍: FYIcenter.com
Biopython provides 3 Pre-defined Sequence Alignment Score Settings: "blastn" and "megablast" for nucleotide alignments, and "blastp" for protein alignments.
Here is an example on how to "blastp" score settings.
fyicenter$ python >>> from Bio import Align >>> aligner = Align.PairwiseAligner(scoring="blastp") >>> print(aligner) Pairwise sequence aligner with parameters substitution_matrix: <Array object at 0x111404eb0> target_internal_open_gap_score: -12.000000 target_internal_extend_gap_score: -1.000000 target_left_open_gap_score: -12.000000 target_left_extend_gap_score: -1.000000 target_right_open_gap_score: -12.000000 target_right_extend_gap_score: -1.000000 query_internal_open_gap_score: -12.000000 query_internal_extend_gap_score: -1.000000 query_left_open_gap_score: -12.000000 query_left_extend_gap_score: -1.000000 query_right_open_gap_score: -12.000000 query_right_extend_gap_score: -1.000000 mode: global >>> target = "AEPNAATNYATEAMDSLKTQAIDLISQTWPVVTTVVVAGLVIRLFKKFSSKA" >>> query = "DGTSTATSYATEAMNSLKTQATDLIDQTWPVVTSVAVAGLAIRLFKKFS" >>> alignments = aligner.align(target, query) >>> print(len(alignments)) 1 >>> print(alignments[0]) target 0 AEPNAATNYATEAMDSLKTQAIDLISQTWPVVTTVVVAGLVIRLFKKFSSKA 52 0 .....||.||||||.||||||.|||.|||||||.|.||||.||||||||--- 52 query 0 DGTSTATSYATEAMNSLKTQATDLIDQTWPVVTSVAVAGLAIRLFKKFS--- 49 >>> print(alignments.score) 166.0
As you see "blastp" score settings eliminated the alignment that has an internal gap, because the internal gap score is set to -12.0, much lower than left or right gaps.
Eliminated alignment: target 0 AEPNAATNYATEAMDSLKTQAIDLISQTWPVVTTVVVAGLVIRLFKKFSSKA 52 0 .....||.||||||.||||||.|||.|||||||.|.||||.|||||||-|-- 52 query 0 DGTSTATSYATEAMNSLKTQATDLIDQTWPVVTSVAVAGLAIRLFKKF-S-- 49
⇒ Get Help Documentation with Biopython
⇐ Too Many Results from align() Function
2023-08-03, 429🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1003679 Names: InChIKey: GZUCKQPYAQFHIC-UHFFFAOYS A-NSMILES: CC(=O)OC(O)CC...
What is Isomer? An Isomer is molecule that has the same the same chemical formula as another molecul...
Molecule Summary: ID: FYI-1001889 SMILES: CCCCCCCCCCCCCC(=O)NC(CCC (N)=O)C(=O)NC(CC(N)=O)C( =O)NC(CO)C...
What Is "obrotate" command? How to use it to batch-rotate dihedral angles matching SMARTS patterns? ...
Molecule Summary: ID: FYI-1001318 SMILES: C/C(C(O)=O)=C\\C=C\\C(C) =C\\C=C\\C=C(C)\\C=C\\C= C(C)\\C(O)...