1
$\begingroup$

To generate aligned protein sequence truncate to the same length, I use blastp in biopython for MSA. I have multiple queries and one subject sequence. However, the alignment never returns the same length.

How can I align all sequences altogether, thus resulting in a set of sequences of the same length?

$\endgroup$
2
  • 1
    $\begingroup$ Are you using a local alignment over a global alignment for a reason? Also, it sounds like you'd want a MSA of the whole set and not a set of pairwise ones. If global MSA is what you actually want, try ebi.ac.uk/Tools/msa/muscle. Then to trim the ends before phylogeny there are dozens of tools. $\endgroup$ Aug 9, 2020 at 12:18
  • 1
    $\begingroup$ No. Blast aligns locally, i.e. a window, while a global alignment is the whole entirety of the sequence (viz. wiki. $\endgroup$ Aug 10, 2020 at 9:42

1 Answer 1

0
$\begingroup$

BLAST isn't appropriate for multiple sequence alignment. BLAST generates pairwise alignments. Furthermore, the aligning regions shown in a BLAST report only include subsets of the hit sequences.

To create multiple sequence alignment of hits you want to:

  • run blast
  • extract the hit sequences
  • perform multiple-sequence-alignment (e.g., using MAFFT)

Extracting hit sequences can be done using the command-line. Check the docs for blastdbcmd.

If you prefer a point-and-click interface, you can also do this using my lab's SequenceServer BLAST software by simply selecting the hits that you want to retain, and in the Download section, clicking "FASTA of selected hits". Or if you want all of them, click "FASTA of all hits".

Download hits from BLAST report

$\endgroup$
1
  • $\begingroup$ Please add a statement stating that your lab created this software that you're posting about on multiple threads. $\endgroup$
    – Ram RS
    Dec 20, 2021 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.