Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Getting error while using blosum 62 instead of blosum 50 #307

Open
talhaanwarch opened this issue Feb 27, 2019 · 0 comments
Open

Getting error while using blosum 62 instead of blosum 50 #307

talhaanwarch opened this issue Feb 27, 2019 · 0 comments

Comments

@talhaanwarch
Copy link

Greetings. I want to use blosum 62 instead of blosum50. i have imported blosum62 using following way

from Bio.SubsMat import MatrixInfo as matlist
blosum62 = matlist.blosum62

but i am getting following error
ValueError: One of the sequences contains a character that is not contained in the substitution matrix. Are you using an appropriate substitution matrix for your sequence type (e.g., a nucleotide substitution matrix does not make sense for aligning protein sequences)? Does your sequence contain invalid characters? The offending character(s) is: P, H.

code

from skbio.sequence import Protein
from skbio.alignment import TabularMSA
seq_1 = TabularMSA([seq1])
seq_2 = TabularMSA([seq2])
nw_matrix, traceback_matrix = _compute_score_and_traceback_matrices(
    seq_1, seq_2, 1, 1,blosum62)

sequences are as follows.
seq_1=seq1 = Protein("HEAGAWGHEE")
seq_2 = Protein("PAWHEAE")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant