cobot-io 0.1.3.18 → 0.1.3.19
raw patch · 5 files changed
+16/−7 lines, 5 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Bio.FASTA: fastaLine :: ParsableFastaToken a => (Char -> Bool) -> Parser [a]
+ Bio.FASTA: modificationP :: Parser Modification
+ Bio.FASTA.Parser: fastaLine :: ParsableFastaToken a => (Char -> Bool) -> Parser [a]
+ Bio.FASTA.Parser: modificationP :: Parser Modification
+ Bio.FASTA.Type: instance GHC.Classes.Ord Bio.FASTA.Type.Modification
+ Bio.FASTA.Type: instance GHC.Generics.Generic Bio.FASTA.Type.ModItem
+ Bio.FASTA.Type: instance GHC.Generics.Generic Bio.FASTA.Type.Modification
Files
- ChangeLog.md +4/−0
- cobot-io.cabal +2/−2
- src/Bio/FASTA.hs +2/−0
- src/Bio/FASTA/Parser.hs +5/−3
- src/Bio/FASTA/Type.hs +3/−2
ChangeLog.md view
@@ -2,6 +2,10 @@ ## [Unreleased] +## [0.1.3.19] - 2021-04-30+### Changed +- Exports and instances for Biosset. + ## [0.1.3.18] - 2021-03-09 ### Fixed - Lowercase insertion code parsing in PDB.
cobot-io.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: fe5f3bd32c503a44c34349ccfa5bf4ef5ec52540df5c2ce4637127a0b33394df+-- hash: 543c70618887552cd7833594bf0cb48d233a34c25568ca9cd5ddcf6a3914a5c5 name: cobot-io-version: 0.1.3.18+version: 0.1.3.19 synopsis: Biological data file formats and IO description: Please see the README on GitHub at <https://github.com/biocad/cobot-io#readme> category: Bio
src/Bio/FASTA.hs view
@@ -7,6 +7,8 @@ , toFile , fastaP , fastaPGeneric+ , fastaLine+ , modificationP ) where import Control.Monad.IO.Class (MonadIO, liftIO)
src/Bio/FASTA/Parser.hs view
@@ -3,6 +3,8 @@ module Bio.FASTA.Parser ( fastaP , fastaPGeneric+ , fastaLine + , modificationP ) where import Bio.FASTA.Type (Fasta, FastaItem (..), ModItem (..), Modification (..),@@ -37,10 +39,10 @@ seqName = strip <$> (char '>' *> tabs *> takeWhile (`notElem` ['\n', '\r']) <* tabs <* eol) fastaSeq :: ParsableFastaToken a => (Char -> Bool) -> Parser (BareSequence a)-fastaSeq predicate = bareSequence . mconcat <$> many' (line predicate)+fastaSeq predicate = bareSequence . mconcat <$> many' (fastaLine predicate) -line :: ParsableFastaToken a => (Char -> Bool) -> Parser [a]-line predicate = concat <$> many1' (many1' (parseToken predicate) <* many' (char ' ')) <* eol+fastaLine :: ParsableFastaToken a => (Char -> Bool) -> Parser [a]+fastaLine predicate = concat <$> many1' (many1' (parseToken predicate) <* many' (char ' ')) <* eol eol :: Parser () eol = tabs *> choice [slashN, endOfInput]
src/Bio/FASTA/Type.hs view
@@ -10,6 +10,7 @@ import Bio.Sequence (BareSequence) import Data.Attoparsec.Text (Parser) import Data.Text (Text)+import GHC.Generics (Generic) -- | Type alias for FASTA file. -- satisfies the following format : >(\s|\t)*[^\n\r]+(\s|\t)*(\n|\r)*((\w|\s)(\n|\r)*)*@@ -33,7 +34,7 @@ data ModItem = Mod Modification | Letter Char- deriving (Eq, Show)+ deriving (Eq, Show, Generic) data Modification = Mod_A_Star@@ -124,7 +125,7 @@ | Mod_TTC | Mod_TTT | Unknown String- deriving (Eq, Show)+ deriving (Eq, Show, Ord, Generic) modificationToString :: Modification -> String modificationToString Mod_A_Star = "[A*]"