This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Define own alphabet and perform MultipleSequenceAlignment in biopython

I want to do a MultipleSequenceAlignment in biopython but with a self defined Alphabet. The Background is: My sequences are sequences of numeric states and there are up to 5000 states. Thus I need an alphabet with 5000 letters, e.g. '0001', '0042', '4999'. Those sequences are up to 50 states/letters long.

So my main questions are:

  • How can I define such an Alphabet?
  • How can I use this Alphabet with the MultipleSequenceAlignment?

Alternatively: Is it possible to perform a MultipleSequenceAlignment on Lists/Arrays instead of Sequences?

Thanks for you Time & Help!

python biopython sequence-alignment

Have you had any success here? I am very much interested in your solution.

1 answer

While the Biopython Alphabet class system could probably mostly handle this, the Seq, SeqRecord and MultipleSequenceAlignment objects all focus on single-letter character representations. You might have some success with the array based MutableSeq object, but I think you would have to write some new subclasses if you really wanted to go down this route.

Log in to answer this question.