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

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

@talhaanwarch

Description

@talhaanwarch

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions