biopython / biopython

Official git repository for Biopython (originally converted from CVS)
http://biopython.org/
Other
4.37k stars 1.75k forks source link

How to use Gotoh algorithm? #3762

Closed bonaventuredossou closed 2 years ago

bonaventuredossou commented 3 years ago

Hello, the following algorithm is intended to use the Gotoh algorithm

aligner = PairwiseAligner() # for example aligner.mode = 'global' aligner.query_extend_gap_score = x aligner.query_open_gap_score = y # st x != y aligner.align(X, Y)

Is it sufficient to set x != y ? Because I went through the code but there are no real standard/default values in there. Please help me with standard/usual values for this. I am relatively new so I am trying to learn. Thanks

mdehoon commented 3 years ago

@bonaventuredossou You can use

>>> aligner.algorithm

to find out which algorithm is being used. It will change depending on how you set the gap scores.

MarkusPiotrowski commented 3 years ago

@bonaventuredossou You may want to have a look at https://www.ebi.ac.uk/Tools/psa/emboss_needle/ , select DNA or Protein and have a look at the default settings under "More Options".

mdehoon commented 2 years ago
>>> from Bio.Align import PairwiseAligner
>>> aligner = PairwiseAligner()
>>> aligner.algorithm
'Needleman-Wunsch'
>>> aligner.query_extend_gap_score = -3
>>> aligner.query_open_gap_score = -4
>>> aligner.algorithm
'Gotoh global alignment algorithm'
>>> aligner.query_open_gap_score = -3
>>> aligner.algorithm
'Needleman-Wunsch'
>>> aligner.mode = 'local'
>>> aligner.algorithm
'Smith-Waterman'
>>> aligner.query_open_gap_score = -7
>>> aligner.algorithm
'Gotoh local alignment algorithm'