packages feed

BiobaseFasta 0.0.0.3 → 0.0.0.4

raw patch · 2 files changed

+14/−5 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Biobase.Fasta.Import: type TrailSequence = ByteString
- Biobase.Fasta.Import: rollingIter :: (Monad m, Functor m, Nullable z, Monoid z) => (StartPos -> WindowSize -> PeekSize -> FastaData -> z) -> WindowSize -> PeekSize -> Enumeratee ByteString z m a
+ Biobase.Fasta.Import: rollingIter :: (Monad m, Functor m, Nullable z, Monoid z) => (StartPos -> WindowSize -> PeekSize -> TrailSequence -> FastaData -> z) -> WindowSize -> PeekSize -> Enumeratee ByteString z m a
- Biobase.Fasta.Import: type FastaFunction z = FastaHeader -> StartPos -> WindowSize -> PeekSize -> FastaData -> z
+ Biobase.Fasta.Import: type FastaFunction z = FastaHeader -> StartPos -> WindowSize -> PeekSize -> TrailSequence -> FastaData -> z

Files

Biobase/Fasta/Import.hs view
@@ -35,6 +35,7 @@   -> StartPos       -- ^ where in the original sequence to start   -> WindowSize     -- ^ how many characters we are looking at   -> PeekSize       -- ^ this many characters are from the next window (peeking into)+  -> TrailSequence  -- ^ trailing last window-size characters   -> FastaData      -- ^ the actual sequence data   -> z              -- ^ and what we return as result @@ -58,7 +59,12 @@  type PeekSize = Int +-- | Last window-size characters as a bytestring +type TrailSequence = ByteString+++ -- * conversion from FASTA to data of type 'z'.  -- | Takes a bytestring sequence, applies 'f' to each bytestring of windowsize@@ -66,17 +72,20 @@  rollingIter   :: (Monad m, Functor m, Nullable z, Monoid z)-  => (StartPos -> WindowSize -> PeekSize -> FastaData -> z)+  => (StartPos -> WindowSize -> PeekSize -> TrailSequence -> FastaData -> z)   -> WindowSize   -> PeekSize   -> Enumeratee ByteString z m a-rollingIter f windowSize peekSize = unfoldConvStream go 0 where-  go start = do+rollingIter f windowSize peekSize = unfoldConvStream go (0,"") where+  go (start,trail) = do     yss <- roll (windowSize+peekSize) windowSize     case yss of       [ys] -> do let xs = BS.filter (/='\n') ys                  let l = BS.length xs-                 return $ (start + l, f start windowSize peekSize xs)+                 let trail = BS.drop (max 0 $ l-windowSize) xs+                 return $ ( ( start + l , trail )+                          , f start windowSize peekSize trail xs+                          )       _ -> error "rollingIter: error" {-# INLINE rollingIter #-} 
BiobaseFasta.cabal view
@@ -1,5 +1,5 @@ name:           BiobaseFasta-version:        0.0.0.3+version:        0.0.0.4 author:         Christian Hoener zu Siederdissen maintainer:     choener@tbi.univie.ac.at homepage:       http://www.tbi.univie.ac.at/~choener/