Copyright | (c) HyraxBio 2018 |
---|---|
License | BSD3 |
Maintainer | andre@hyraxbio.co.za, andre@andrevdm.com |
Stability | beta |
Safe Haskell | Safe |
Language | Haskell2010 |
Functionality for reading and parsing AB1 files
e.g.
abif' <- readAbif "example.ab1" case abif' of Left e -> putStrLn $ "error reading ABIF: " <> e Right abif -> print $ clearAbif abif
Synopsis
- readAbif :: FilePath -> IO (Either Text Abif)
- getAbif :: ByteString -> Either Text Abif
- clear :: Directory -> Directory
- clearAbif :: Abif -> Abif
- getDebug :: Directory -> Directory
- getPString :: Get Text
- getCString :: Int -> Get Text
- getHeader :: Get Header
- getRoot :: ByteString -> Get (Header, Directory)
- getDirectories :: ByteString -> [Directory] -> Int -> Get [Directory]
- getDirectory :: ByteString -> Get Directory
Documentation
getAbif :: ByteString -> Either Text Abif Source #
Parse an AB1 from a ByteString
clear :: Directory -> Directory Source #
Removes all data from a directory entry. This will probably only be useful when trying to show an ABIF value
getDebug :: Directory -> Directory Source #
Populate the directory entry with debug data (into dDataDebug
).
This is done for selected types only, e.g. for strings so that printing the structure will display
readable/meaningfull info
getPString :: Get Text Source #
Parse a ElemPString
getCString :: Int -> Get Text Source #
Parse a ElemCString
getDirectories :: ByteString -> [Directory] -> Int -> Get [Directory] Source #
Parse all the directoy entries
getDirectory :: ByteString -> Get Directory Source #
Parse a single Directory
entry and read its data