Entering edit mode
3.6 years ago
anasjamshed
▴
140
I have 3 fasta files of the human, mouse, and goat sequences and I want to align them by using Hidden Markov Model
I tried this :
import Bio
from Bio import SeqIO
from Bio import Seq
seq1 = SeqIO.read("Human.fasta","fasta")
seq2 = SeqIO.read("Mouse.fasta","fasta")
seq3= SeqIO.read("Goat.fasta","fasta")
print(seq1)
from Bio import Align
aligner.mode = 'global'
score = aligner.score(seq1, seq2)
score
alignments = aligner.align(seq1, seq2)
for alignment in alignments:
print(alignment)
But it is giving me the error: ValueError: sequence has unexpected format
although the format is fasta I don't know why it is giving me this error
after that, I want to use HMM like :
from Bio.HMM import MarkovModel
a= MarkovModel.MarkovModelBuilder(seq1,seq2)
plt.plot(str(a))
But I am not getting the model which I required.
Can anyone help me to solve these 2 issues?