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, 789🔥, 0💬
Popular Posts:
What is chemwriter.com? chemwriter.com is a Website that offers ChemWriter as commercial software an...
Molecule Summary: ID: FYI-1004047 Names: InChIKey: CLKOFPXJLQSYAH-ABRJDSQDS A-NSMILES: CC[C@H](C)[C@...
How to change the display command on Open Babel GUI? By default, Open Babel GUI uses Firefox to disp...
Molecule Summary: ID: FYI-1000994 SMILES: Received at FYIcenter.com on: 2021-09-13
Molecule Summary: ID: FYI-1001234 SMILES: O=C(CCCCCCC(=O)Nc2ccc(NC (=S)c1ccccn1)cc2)NOReceived at FY...