Safe Haskell | None |
---|
Import HMMER3 HMM models.
- parseHMM3 :: Monad m => Pipe ByteString ByteString o u m HMM3
- legalHMM :: Maybe ByteString -> Bool
- readBoolean :: ByteString -> Bool
- readAlph :: ByteString -> Alphabet
- readBS :: Read c => ByteString -> c
- headerMap :: [ByteString] -> Map ByteString ByteString
- parseBegin :: Monad m => t -> Pipe l ByteString o u m Node
- parseNodes :: Monad m => Int -> Pipe ByteString ByteString o u m [Node]
- readNLP :: String -> NegLogProb
- compoLine :: Monad m => Pipe ByteString ByteString o u m [NegLogProb]
- sathLines :: Monad m => Pipe l ByteString o u m ([ByteString], [ByteString])
- headerLines :: Monad m => Pipe ByteString ByteString o u m [ByteString]
- test :: IO ()
Different HMMer parsers
HMMER3 / b
parseHMM3 :: Monad m => Pipe ByteString ByteString o u m HMM3Source
TODO not everything is currently being parsed. Notably the rf,cs,alignmap annotations.
legalHMM :: Maybe ByteString -> BoolSource
Check, if we have a legal HMMER3 model.
Helper functions
readBoolean :: ByteString -> BoolSource
Read boolean flags.
readAlph :: ByteString -> AlphabetSource
Determine which alphabet is in use by the HMM.
readBS :: Read c => ByteString -> cSource
Read from a bytestring into a structure.
headerMap :: [ByteString] -> Map ByteString ByteStringSource
create associative map of the key/value data.
parseBegin :: Monad m => t -> Pipe l ByteString o u m NodeSource
Parse the two beginning lines.
parseNodes :: Monad m => Int -> Pipe ByteString ByteString o u m [Node]Source
Parse all individual nodes, except the first one, which uses parseBegin
.
readNLP :: String -> NegLogProbSource
Read a HMMER negated log-probability.
compoLine :: Monad m => Pipe ByteString ByteString o u m [NegLogProb]Source
Read the optional COMPO line.
sathLines :: Monad m => Pipe l ByteString o u m ([ByteString], [ByteString])Source
Read the alphabet and transition lines.
headerLines :: Monad m => Pipe ByteString ByteString o u m [ByteString]Source
All the header lines until we see HMM.