BiobaseInfernal-0.7.0.0: Infernal data structures and tools

Safe HaskellNone

Biobase.SElab.HMM.Import

Contents

Description

Import HMMER3 HMM models.

Synopsis

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.

test :: IO ()Source

Simple test for the HMMer parser.