Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More HMM stuff

  • Loading branch information...
commit e430d539ebf095463296f9223d8cd2e2d557f416 1 parent d7b5c22
@mikeizbicki authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 BioHMM.hs
View
17 BioHMM.hs
@@ -7,12 +7,15 @@ import HMM
bpList = "AGCT"
- -- | bpCP enumerates the cross product of all the base pairs. This is used to initialize the states for our HMM
+DNA = "ACAAGATGCCATTGTCCCCCGGCCTCCTGCTGCTGCTGCTCTCCGGGGCCACGGCCACCGCTGCCCTGCCCCTGGAGGGTGGCCCCACCGGCCGAGACAGCGAGCATATGCAGGAAGCGGCAGGAATAAGGAAAAGCAGCCTCCTGACTTTCCTCGCTTGGTGGTTTGAGTGGACCTCCCAGGCCAGTGCCGGGCCCCTCATAGGAGAGGAAGCTCGGGAGGTGGCCAGGCGGCAGGAAGGCGCACCCCCCCAGCAATCCGCGCGCCGGGACAGAATGCCCTGCAGGAACTTCTTCTGGAAGACCTTCTCCTCCTGCAAATAAAACCTCACCCATGAATGCTCACGCAAGTTTAATTACAGACCTGAA"
+
+ -- | enumerates the cross product of the language order number of times. This is used to initialize the states for our HMM
-bpCP :: Int -> [String]
-bpCP x = bpCP' x [[]]
+-- enumerateStates :: a -> Int -> [[a]]
+enumerateStates :: String -> Int -> [String]
+enumerateStates language order = enumerateStates' order [[]]
where
- bpCP' :: Int -> [String] -> [String]
- bpCP' x list
- | x == 0 = list
- | otherwise = bpCP' (x-1) [bp:l | l <- list, bp <- bpList]
+ enumerateStates' :: Int -> [String] -> [String]
+ enumerateStates' order list
+ | order == 0 = list
+ | otherwise = enumerateStates' (order-1) [symbol:l | l <- list, symbol <- language]
Please sign in to comment.
Something went wrong with that request. Please try again.