seqloc 0.3 → 0.3.1
raw patch · 2 files changed
+6/−3 lines, 2 files
Files
- seqloc.cabal +1/−1
- src/Bio/SeqLoc/OnSeq.hs +5/−2
seqloc.cabal view
@@ -1,5 +1,5 @@ Name: seqloc-Version: 0.3+Version: 0.3.1 Cabal-Version: >= 1.2 Synopsis: Handle sequence locations for bioinformatics Description: Handle sequence locations for bioinformatics
src/Bio/SeqLoc/OnSeq.hs view
@@ -8,7 +8,7 @@ -} module Bio.SeqLoc.OnSeq ( - SeqLabel(..), unSeqLabel+ SeqLabel(..), toSeqLabel, unSeqLabel , OnSeq(..) @@ -41,6 +41,9 @@ import qualified Bio.SeqLoc.SpliceLocation as SpLoc import Bio.SeqLoc.Strand +toSeqLabel :: BS.ByteString -> SeqLabel+toSeqLabel = SeqLabel . LBS.fromChunks . (: [])+ unSeqLabel :: SeqLabel -> BS.ByteString unSeqLabel = BS.concat . LBS.toChunks . unSL @@ -54,7 +57,7 @@ instance LocRepr s => LocRepr (OnSeq s) where repr (OnSeq name obj) = BS.concat [ unSeqLabel name, at, repr obj ]- unrepr = OnSeq <$> (SeqLabel . LBS.fromChunks . (: []) <$> ZP.takeWhile (/= c2w '@')) <* ZP.string at <*> unrepr+ unrepr = OnSeq <$> (toSeqLabel <$> ZP.takeWhile (/= c2w '@')) <* ZP.string at <*> unrepr type SeqOffset = OnSeq Pos.Offset