Which Alphabet should I use for making a substitution matrix
1
0
Entering edit mode
7.1 years ago

Hello,

In order to make a custom substitution matrix I use clastalo to perform a msa and subsequently I use the SubsMat module trying to create a substition matrix.

I have to specify an alphabet and, with the biopython Alphabet and IUPAC modules being though to understand, I haven't been able to find the right alpabet. This results in a python KeyError on '-'.
My msa contains "-", which alphabet should I specify?

Sincerely,

 

biopython alphabet • 1.6k views
ADD COMMENT
0
Entering edit mode
7.0 years ago
Peter 6.0k

Probably something like this (which is a bit horrible, I would agree):

from Bio.Alphabet.IUPAC import ambiguous_dna

from Bio.Alphabet import Gapped

gapped_dna = Gapped(ambiguous_dna, gap_char="-")

ADD COMMENT

Login before adding your answer.

Traffic: 2186 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6