fasta 0.10.4.0 → 0.10.4.1
raw patch · 6 files changed
+31/−6 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- fasta.cabal +1/−1
- src/Data/Fasta/ByteString/Lazy/Utility.hs +6/−1
- src/Data/Fasta/ByteString/Utility.hs +6/−1
- src/Data/Fasta/String/Utility.hs +6/−1
- src/Data/Fasta/Text/Lazy/Utility.hs +6/−1
- src/Data/Fasta/Text/Utility.hs +6/−1
fasta.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.10.4.0+version: 0.10.4.1 -- A short (one-line) description of the package. synopsis: A simple, mindless parser for fasta files.
src/Data/Fasta/ByteString/Lazy/Utility.hs view
@@ -10,8 +10,10 @@ ) where -- Built in+import Data.Maybe -- Cabal+import Control.Lens import qualified Data.ByteString.Lazy.Char8 as BL -- Local@@ -21,7 +23,10 @@ -- | Gets a 1 indexed field from the header of a fasta sequence using a certain -- delimiter. getField :: Int -> Char -> FastaSequence -> BL.ByteString-getField field delim = (!! (field - 1)) . BL.split delim . fastaHeader+getField field delim = fromMaybe (error "getField: Field out of bounds in fasta header")+ . preview (ix $ field - 1)+ . BL.split delim+ . fastaHeader -- | Gets the complement of the sequence. compl :: FastaSequence -> FastaSequence
src/Data/Fasta/ByteString/Utility.hs view
@@ -10,8 +10,10 @@ ) where -- Built in+import Data.Maybe -- Cabal+import Control.Lens import qualified Data.ByteString.Char8 as B -- Local@@ -21,7 +23,10 @@ -- | Gets a 1 indexed field from the header of a fasta sequence using a certain -- delimiter. getField :: Int -> Char -> FastaSequence -> B.ByteString-getField field delim = (!! (field - 1)) . B.split delim . fastaHeader+getField field delim = fromMaybe (error "getField: Field out of bounds in fasta header")+ . preview (ix $ field - 1)+ . B.split delim+ . fastaHeader -- | Gets the complement of the sequence. compl :: FastaSequence -> FastaSequence
src/Data/Fasta/String/Utility.hs view
@@ -10,8 +10,10 @@ ) where -- Built in+import Data.Maybe -- Cabal+import Control.Lens import qualified Data.List.Split as Split -- Local@@ -21,7 +23,10 @@ -- | Gets a 1 indexed field from the header of a fasta sequence using a certain -- delimiter. getField :: Int -> Char -> FastaSequence -> String-getField field delim = (!! (field - 1)) . Split.splitWhen (== delim) . fastaHeader+getField field delim = fromMaybe (error "getField: Field out of bounds in fasta header")+ . preview (ix $ field - 1)+ . Split.splitWhen (== delim)+ . fastaHeader -- | Gets the complement of the sequence. compl :: FastaSequence -> FastaSequence
src/Data/Fasta/Text/Lazy/Utility.hs view
@@ -10,8 +10,10 @@ ) where -- Built in+import Data.Maybe -- Cabal+import Control.Lens import qualified Data.Text.Lazy as T -- Local@@ -21,7 +23,10 @@ -- | Gets a 1 indexed field from the header of a fasta sequence using a certain -- delimiter. getField :: Int -> Char -> FastaSequence -> T.Text-getField field delim = (!! (field - 1)) . T.split (== delim) . fastaHeader+getField field delim = fromMaybe (error "getField: Field out of bounds in fasta header")+ . preview (ix $ field - 1)+ . T.split (== delim)+ . fastaHeader -- | Gets the complement of the sequence. compl :: FastaSequence -> FastaSequence
src/Data/Fasta/Text/Utility.hs view
@@ -10,8 +10,10 @@ ) where -- Built in+import Data.Maybe -- Cabal+import Control.Lens import qualified Data.Text as T -- Local@@ -21,7 +23,10 @@ -- | Gets a 1 indexed field from the header of a fasta sequence using a certain -- delimiter. getField :: Int -> Char -> FastaSequence -> T.Text-getField field delim = (!! (field - 1)) . T.split (== delim) . fastaHeader+getField field delim = fromMaybe (error "getField: Field out of bounds in fasta header")+ . preview (ix $ field - 1)+ . T.split (== delim)+ . fastaHeader -- | Gets the complement of the sequence. compl :: FastaSequence -> FastaSequence