- type FastaFunction z = FastaHeader -> StartPos -> WindowSize -> PeekSize -> TrailSequence -> FastaData -> z
- type StartPos = Int
- type FastaHeader = ByteString
- type FastaData = ByteString
- type WindowSize = Int
- type PeekSize = Int
- type TrailSequence = ByteString
- rollingIter :: (Monad m, Functor m, Nullable z, Monoid z) => (StartPos -> WindowSize -> PeekSize -> TrailSequence -> FastaData -> z) -> WindowSize -> PeekSize -> Enumeratee ByteString z m a
- eneeFasta :: (Monad m, Functor m, Nullable z, NullPoint z, Monoid z) => FastaFunction z -> WindowSize -> PeekSize -> 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
the > header
where in the original sequence to start
how many characters we are looking at
this many characters are from the next window (peeking into)
trailing last window-size characters
the actual sequence data
and what we return as result
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.
conversion from FASTA to data of type
Takes a bytestring sequence, applies
f to each bytestring of windowsize
and returns the results z.
Outer enumeratee. See the two convenience functions for how to use it (just like any enumeratee, basically).
The fasta function
f manipulates small stretches of fasta data and has
arguments: fasta header, fasta data, start position (all filled by
Next we have the window size, how many characters to read at once,
followed by the the number of characters to read in addition.
The work is actually done by
Convenience functions: final data is returned strictly.
From an uncompressed file.