packages feed

bio 0.5.2 → 0.5.3

raw patch · 12 files changed

+33/−34 lines, 12 files

Files

Bio/Alignment/ACE.hs view
@@ -41,7 +41,7 @@ import Bio.Alignment.AlignData (Dir(..), Gaps, Alignment, extractGaps)  import qualified Data.ByteString.Lazy.Char8 as B-import Data.ByteString.Lazy.Char8 (ByteString,words,pack,unpack,readFile,unwords)+import Data.ByteString.Lazy.Char8 (ByteString,words,pack,unpack,unwords)  import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Pos (newPos)
Bio/GFF3/FeatureHier.hs view
@@ -15,7 +15,6 @@ import Data.List hiding (insert, delete) import qualified Data.List as List (delete) import qualified Data.Map as M-import Data.Maybe import qualified Data.Set as S  import Bio.GFF3.Feature
Bio/GFF3/FeatureHierSequences.hs view
@@ -15,8 +15,8 @@ import qualified Data.Map as M import Data.Maybe import qualified Data.Set as S--import Bio.Sequence.SeqData+import System.IO.Error (catchIOError)+import Bio.Sequence.SeqData hiding (seqmap) import Bio.Sequence.Fasta  import qualified Bio.GFF3.Feature as F@@ -72,7 +72,7 @@                            return $ Seq seqname sequ Nothing  catchIOErrors :: IO a -> ErrorT String IO a-catchIOErrors m = ErrorT { runErrorT = liftM Right m `catch` (return . Left . show) }+catchIOErrors m = ErrorT { runErrorT = liftM Right m `catchIOError` (return . Left . show) }  runGFF :: FilePath -> (ErrorT String (Reader FeatureHierSequences) a) -> ErrorT String IO a runGFF gffname m = do gff <- catchIOErrors $ LBS.readFile gffname
Bio/GFF3/SGD.hs view
@@ -8,7 +8,6 @@  import Control.Arrow ((&&&)) import Control.Monad.Error-import Control.Monad.Reader import qualified Data.ByteString.Lazy.Char8 as LBS import Data.List import Data.Maybe
Bio/Location/Test.hs view
@@ -1,11 +1,11 @@+{-# Language BangPatterns #-}+ module Bio.Location.Test (tests)     where  import Control.Monad import Control.Monad.Error import qualified Data.ByteString.Lazy.Char8 as LBS-import Data.Char-import Data.Either import Data.Int (Int64) import Data.Ix (inRange) import Data.List@@ -132,7 +132,7 @@ test_Contig_RevCompl = test_revCompl  property_ContigIntoOutof :: CLoc.ContigLoc -> Pos.Pos -> Property-property_ContigIntoOutof contig pos+property_ContigIntoOutof contig pos      = let !mInpos = CLoc.posInto pos contig           !mOutpos = mInpos >>= flip CLoc.posOutof contig                            in (isJust mInpos) ==> mOutpos == (Just pos)
Bio/Sequence/AminoProperties.hs view
@@ -11,7 +11,10 @@  type AAProp = Amino -> Bool +oneOf :: [Amino] -> Amino -> Bool oneOf = flip elem++or :: (t -> Bool) -> (t -> Bool) -> t -> Bool or f g = \x -> f x || g x    aliphatic, aromatic, hydrophobic, polar, small, tiny, charged, negative, positive :: AAProp
Bio/Sequence/HashWord.lhs view
@@ -12,7 +12,6 @@ import Bio.Sequence.SeqData import Data.List (sort) import Data.Char (toUpper)-import Data.Int  import qualified Data.ByteString.Lazy.Char8 as B @@ -143,7 +142,7 @@                                    key2 = n2k k' (B.reverse $ B.map complement s')                                in  (min key1 key2,i) : c_keys'' (key1,key2) (i+(B.length . head) ss) (tail ss) -    c_keys'' (c1,c2) i [] = []+    c_keys'' (_c1,_c2) _i [] = []     c_keys'' (c1,c2) i (s:ss)          | isN $ B.head s = c_keys' (i + (sum . map B.length) (s:take k' ss)) ss         | otherwise = let s1 = B.head s@@ -197,6 +196,7 @@ k2n :: (Integral k, Show k, Eq k) => Int -> k -> SeqData k2n k = fromStr . k2n' k +k2n' :: (Integral a, Integral a1, Show a, Show a1) => a -> a1 -> String k2n' k i = if k==1 then [unval i]            else let (q,r) = i `divMod` klim in unval q : k2n' (k-1) r              where klim = let v = 4^(k-1) in if v==0 then error ("HashWord: word size of k="++show k++" too large for this data type.") else v
Bio/Sequence/Phd.hs view
@@ -30,7 +30,7 @@ mkPhd inp =    let (hd:fs) = filter (not . B.null) . B.lines $ inp       (comment,sd) = break (==B.pack "BEGIN_DNA") fs-      (sd', td) = break (==B.pack "END_DNA") sd+      (sd', _td) = break (==B.pack "END_DNA") sd       (magic,label) = B.splitAt 15 hd       more_magic = magic == B.pack "BEGIN_SEQUENCE "       fields = B.words . B.unlines
Bio/Sequence/SFF_filters.hs view
@@ -120,6 +120,7 @@  -- These are used for mate-pair libraries, should be located around the middle of the read: +flx_linker,ti_linker,rna_adapter,rna_adapter2,rna_adapter3,rapid_adapter,ti_adapter_b :: String flx_linker = "GTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAAC"  -- Celera ti_linker  = "TCGTATAACTTCGTATAATGTATGCTATACGAAGTTATTACG"  -- 20K cod jump 
Bio/Sequence/TwoBit.hs view
@@ -20,7 +20,7 @@      hWrite2Bit    ) where -+import Prelude hiding (seq) import Bio.Sequence.SeqData import qualified Data.ByteString.Lazy as BB import qualified Data.ByteString.Lazy.Char8 as B@@ -87,7 +87,7 @@                             then bswap 4                             else error "2bit decode: incorrect magic number"        return (Header (m /= default_magic) (s v) (s c) (s r))-    put (Header m v c r) = do+    put (Header _m _v c _r) = do        put default_magic        put default_version        put c@@ -105,14 +105,14 @@ instance Binary Entry where     get = do        len <- getWord8-       name <- replicateM (fromIntegral len) getWord8-       offset <- get-       return (Entry (BB.pack name) offset)-    put (Entry byteString offset) = do+       my_name <- replicateM (fromIntegral len) getWord8+       my_offset <- get+       return (Entry (BB.pack my_name) my_offset)+    put (Entry byteString my_offset) = do        let len = fromIntegral $ B.length byteString :: Word8        put len          mapM_ put $ BB.unpack byteString-       put offset+       put my_offset   @@ -267,12 +267,8 @@        go (pos,[],[],d:ds)        = Just (dec1 d, (pos+1,[],[],ds)) --    go x = error (show x) ---toSR :: B.ByteString -> SR-toSR bs = undefined--+-- toSR :: B.ByteString -> SR+-- toSR bs = undefined  splits :: [Int64] -> B.ByteString -> [B.ByteString]  splits [] cs = [cs]@@ -323,17 +319,17 @@ encode2Bit ss = let                     buildHeader :: [Sequence a] -> Header-                   buildHeader ss = Header {swap = True, +                   buildHeader ss' = Header {swap = True,                                              version = default_version, -                                            count = sequenceListLength ss, +                                            count = sequenceListLength ss',                                              reserved = 0}                      -- Build the list of 2Bit Entries                     buildEntries :: [TwoBitData] -> Offset -> [Entry]                    buildEntries [] _ = []-                   buildEntries ((label, length, _):xs) currentOffset = Entry {name=label, -                                                                               offset=fromIntegral $ currentOffset} : buildEntries xs (currentOffset+length)   +                   buildEntries ((label, length', _):xs) currentOffset = Entry {name=label, +                                                                               offset=fromIntegral $ currentOffset} : buildEntries xs (currentOffset+length')                        -- Build a 2Bit Sequence Record!!                    buildSR :: TwoBitData -> SR@@ -351,12 +347,12 @@                    -- Total # of sequences present                    sequenceListLength :: [Sequence a] -> Word32                    sequenceListLength [] = 0-                   sequenceListLength (s:ss) = 1 + sequenceListLength ss+                   sequenceListLength (_:ss') = 1 + sequenceListLength ss'                        -- Build a list of vital data to do 2Bit marshalling                    sequenceListExtract :: [Sequence a] -> [TwoBitData]-                   sequenceListExtract ss = map (\seq -> (seqlabel seq, seqlength seq, seqdata seq)) ss+                   sequenceListExtract ss' = map (\seq -> (seqlabel seq, seqlength seq, seqdata seq)) ss'                        -- Map a nucleotide to its respective 2Bit encoding
Bio/Util/TestBase.hs view
@@ -71,10 +71,11 @@     where chooseInteger :: (Integer, Integer) -> Gen Integer           chooseInteger = choose -+{- instance Random Word8 where     randomR = integralRandomR     random = randomR (minBound,maxBound)+-}  instance Arbitrary Nucleotide where     arbitrary = elements (map N "aaacccgggtttn")
bio.cabal view
@@ -1,5 +1,5 @@ Name:                bio-Version:             0.5.2+Version:             0.5.3 License:             LGPL License-file:        LICENSE Cabal-Version:       >= 1.6@@ -25,7 +25,7 @@                      The Darcs repository is at: <http://malde.org/~ketil/biohaskell/biolib>. Homepage:            http://biohaskell.org/Libraries/Bio -Tested-With:         GHC==6.12.1+Tested-With:         GHC==7.6.2 Build-Type:          Simple Data-Files:          README, Makefile