data(TULASequences)
TULAMList <- motifModelSet(TULASequences, width=6, motifNumber=4,
type="fixed")
plot(TULAMList)
plot(TULAMList@motifs[[1]])
print(TULAMList@motifs[[1]])
small.mlist <- motifModelSet(TULASequences, motifNumber=2,
type="fixed")
ll <- logLik(small.mlist)
print(ll)
large.mlist <- motifModelSet(TULASequences, motifNumber=5,
type="optional")
ll <- logLik(large.mlist)
print(ll)
#split the dataset
training.size <- nrow(TULASequences) * 2 / 3
training.indices <- sample(nrow(TULASequences), training.size)
testing.indices <- setdiff(1:nrow(TULASequences), training.indices)
training <- new("Sequences", TULASequences[training.indices,],
alphabet=TULASequences@alphabet)
testing <- new("Sequences", TULASequences[testing.indices,],
alphabet=TULASequences@alphabet)
#Now we have two sets of sequences
training.mlist <- motifModelSet(training, width=6,
motifNumber=3)
classes <- classify(training.mlist, testing)
#Now we have the classes on the unseen dataRun the code above in your browser using DataLab