- type FastaFunction z = FastaHeader -> FastaData -> StartPos -> z
- type StartPos = Int
- type FastaHeader = ByteString
- type FastaData = ByteString
- rollingIter :: (Monad m, Functor m, Nullable z, Monoid z) => (ByteString -> StartPos -> z) -> Int -> Int -> Enumeratee ByteString z m a
- eneeFasta :: (Monad m, Functor m, Nullable z, NullPoint z, Monoid z) => (ByteString -> ByteString -> StartPos -> z) -> Int -> Int -> Enumeratee ByteString z m a
- fromFile :: (Monoid z, Nullable z) => FastaFunction z -> Int -> Int -> FilePath -> IO z
- fromFileZip :: (Monoid z, Nullable z) => FastaFunction z -> Int -> Int -> FilePath -> IO z
Documentation
type FastaFunction z = FastaHeader -> FastaData -> StartPos -> zSource
This is the type of the conversion function from FASTA data to the data
z
. Make certain that all input is used strictly! BangPatterns are the
easiest to do. In order, the function expects the current FASTA header, then
a data segment, and finally the starting position of the data segment within
the full FASTA data.
If you need the conversion to run in constant time, do not use the convenience functions and replace the final conversion to a strict stream by your own conversion (or output) function.
type FastaHeader = ByteStringSource
Current header (the line starting with >
)
type FastaData = ByteStringSource
FASTA data
conversion from FASTA to data of type z
.
rollingIter :: (Monad m, Functor m, Nullable z, Monoid z) => (ByteString -> StartPos -> z) -> Int -> Int -> Enumeratee ByteString z m aSource
Takes a bytestring sequence, applies f
to each bytestring of windowsize
and returns the results z.
eneeFasta :: (Monad m, Functor m, Nullable z, NullPoint z, Monoid z) => (ByteString -> ByteString -> StartPos -> z) -> Int -> Int -> Enumeratee ByteString z m aSource
Outer enumeratee. See the two convenience functions for how to use it (just like any enumeratee, basically).
Convenience functions: final data is returned strictly.
fromFile :: (Monoid z, Nullable z) => FastaFunction z -> Int -> Int -> FilePath -> IO zSource
From an uncompressed file.
fromFileZip :: (Monoid z, Nullable z) => FastaFunction z -> Int -> Int -> FilePath -> IO zSource
From a gzip-compressed file.