packages feed

cobot-io 0.1.5.1 → 0.1.5.2

raw patch · 6 files changed

+37/−34 lines, 6 filesdep ~megaparsecPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: megaparsec

API changes (from Hackage documentation)

- Bio.ABI.Decode: instance Bio.Sequence.Class.SequenceDecodable Data.ByteString.Internal.ByteString Bio.Sequence.Basecalled.Type.BasecalledSequence
+ Bio.ABI.Decode: instance Bio.Sequence.Class.SequenceDecodable Data.ByteString.Internal.Type.ByteString Bio.Sequence.Basecalled.Type.BasecalledSequence
+ Bio.FASTA.Type: instance GHC.Classes.Ord a => GHC.Classes.Ord (Bio.FASTA.Type.FastaItem a)
+ Bio.Sequence.Class: instance (GHC.Classes.Ord a, GHC.Classes.Ord mk, GHC.Classes.Ord w) => GHC.Classes.Ord (Bio.Sequence.Class.Sequence mk w a)
+ Bio.Sequence.Range: instance GHC.Classes.Ord Bio.Sequence.Range.Border
+ Bio.Sequence.Range: instance GHC.Classes.Ord Bio.Sequence.Range.Range
+ Bio.Sequence.Range: instance GHC.Classes.Ord Bio.Sequence.Range.RangeBorder

Files

ChangeLog.md view
@@ -2,6 +2,9 @@  ## [Unreleased] +## [0.1.5.2] - 2023-11-09+- Add Ord for Fasta and related types.+ ## [0.1.5.1] - 2023-01-17 - Update dependencies for Haskell LTS-20.4. 
cobot-io.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.35.3. -- -- see: https://github.com/sol/hpack  name:           cobot-io-version:        0.1.5.1+version:        0.1.5.2 synopsis:       Biological data file formats and IO description:    Please see the README on GitHub at <https://github.com/biocad/cobot-io#readme> category:       Bio@@ -20,8 +20,7 @@ tested-with:     GHC ==8.10.7  || ==9.0.2- || ==9.2.5- || ==9.4.4+ || ==9.2.8  extra-source-files:     README.md@@ -254,7 +253,7 @@     , hyraxAbif >=0.2.3.27 && <0.2.5.0     , lens >=4.16 && <5.3     , linear-    , megaparsec >=9.0.1+    , megaparsec <9.3     , mtl >=2.2.1 && <2.4     , neat-interpolation >=0.3     , parser-combinators >=1.2.1
src/Bio/FASTA/Type.hs view
@@ -27,7 +27,7 @@       , sequ :: BareSequence a         -- ^ bare sequence       }-  deriving (Eq, Show, Functor)+  deriving (Eq, Ord, Show, Functor)  class ParsableFastaToken a where     parseToken :: (Char -> Bool) -> Parsec Void Text a
src/Bio/Sequence/Class.hs view
@@ -73,7 +73,7 @@       , _weights  :: Vector w         -- ^ weights for all elements in sequence       }-  deriving (Eq, Show, Generic, NFData, Functor)+  deriving (Eq, Ord, Show, Generic, NFData, Functor)  instance Semigroup (Sequence mk w a) where   sequA <> sequB = res
src/Bio/Sequence/Range.hs view
@@ -35,7 +35,7 @@ data Border   = Precise   | Exceeded-  deriving (Eq, Show, Generic, NFData)+  deriving (Eq, Ord, Show, Generic, NFData)  -- | The end point of a range with indication whether it is @Precise@ of @Exceeded@ (see @Border@). --@@ -44,7 +44,7 @@       { _borderType     :: Border       , _borderLocation :: Int       }-  deriving (Eq, Show, Generic, NFData)+  deriving (Eq, Ord, Show, Generic, NFData)  makeLenses ''RangeBorder @@ -80,7 +80,7 @@       }   -- ^ Indicates that the range is complementary.   -- Example in GB:  rep             complement(69..420)-  deriving (Eq, Show, Generic, NFData)+  deriving (Eq, Ord, Show, Generic, NFData)  makeLenses ''Range 
test/FASTASpec.hs view
@@ -43,36 +43,37 @@ badFasta8 = Left "input.fasta:21:5:\n   |\n21 | CMV + enhMCK + prcTnT-2\r\n   |     ^^\nunexpected \"+ \"\nexpecting end of input, end of line, or letter\n"  fastaSpec :: Spec-fastaSpec = describe "Fasta files parser." $ do-    parseFile "test/FASTA/order1.fasta" correctFasta1-    writeFile "test/FASTA/input.fasta" correctFasta1-    parseBadFile "test/FASTA/order2.fasta" badFasta2-    parseFile "test/FASTA/order3.fasta" correctFasta3-    writeFile "test/FASTA/input.fasta" correctFasta3-    parseBadFile "test/FASTA/order4.fasta" badFasta4-    parseFile  "test/FASTA/order5.fasta" correctFasta5-    writeFile "test/FASTA/input.fasta" correctFasta5-    parseBadFile "test/FASTA/order6.fasta" badFasta6-    parseBadFile "test/FASTA/order7.fasta" badFasta7-    parseBadFile "test/FASTA/order8.fasta" badFasta8+fastaSpec = describe "Fasta files parser" $ do+    describe "fromFile" $ do+      parseFile "test/FASTA/order1.fasta" correctFasta1+      parseBadFile "test/FASTA/order2.fasta" badFasta2+      parseFile "test/FASTA/order3.fasta" correctFasta3+      parseBadFile "test/FASTA/order4.fasta" badFasta4+      parseFile  "test/FASTA/order5.fasta" correctFasta5+      parseBadFile "test/FASTA/order6.fasta" badFasta6+      parseBadFile "test/FASTA/order7.fasta" badFasta7+      parseBadFile "test/FASTA/order8.fasta" badFasta8 +    describe "toFile" $ do+      writeFile "test/FASTA/input.fasta" correctFasta5+      writeFile "test/FASTA/input.fasta" correctFasta1+      writeFile "test/FASTA/input.fasta" correctFasta3+ parseFile :: FilePath -> Fasta Char -> Spec-parseFile path cf = do-    describe "fromFile" $ do-        it "correctly parses fasta from file" $ do-            fasta <- fromFile path-            fasta `shouldBe` cf+parseFile path cf =+    it ("correctly parses good fasta from file " <> path) $ do+        fasta <- fromFile path+        fasta `shouldBe` cf  parseBadFile :: FilePath -> Either String (Fasta Char) -> Spec-parseBadFile path cf = do-    describe "fromFile" $ do-         it "correctly parses fasta from file" $ do-            res <- liftIO (readFile path)-            let badRes = parseOnly fastaP res-            badRes `shouldBe` cf+parseBadFile path cf =+    it ("correctly parses bad fasta from file " <> path) $ do+        res <- liftIO (readFile path)+        let badRes = parseOnly fastaP res+        badRes `shouldBe` cf  writeFile :: FilePath -> Fasta Char -> Spec-writeFile path cf = describe "writeFile" $ do+writeFile path cf =     it "correctly write fasta into file" $ do         toFile cf path         fasta <- fromFile path