In R, I need to fit an HMM with two hidden states to a set of sequences. There are 2 classes, with sets of sequences for each. I need to find out which class a certain test sequence is from, and what the hidden state sequence is for it. Here are subsets of the classes:
Class 1
QCQRPCWQVFYMWSMSLKEC
CHHVHHVIWYSMEPIWLGIY
HQGYGCSIKYGMYCDLYQLG
CTISQVDCAYPQGDLCGVCQ
QDGDGVWIMGKDMYISCYCK
Class 2
SESQQYWLAEPCEHGWWQCP
QNYSGMLVGWCHTQLSLQIF
QDGYLWWNALPHEDLSGFCQ
QCGGYNHNAEIHEKLSIWDF
GFGKMVWNPGPWESDSLDCF
Test sequence
YYCDGCWIAYHDQDLLVCCV
I have tried using the HMM package but I keep getting subscript out of bounds errors in Rstudio.