Skip to content

Commit

Permalink
Vks4git/fasta (#55)
Browse files Browse the repository at this point in the history
* Version 0.1.3.20: fixed Fasta parser.

* Fix

* Some fixes
  • Loading branch information
vks4git authored Jun 7, 2021
1 parent 073cdc9 commit 4087055
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [0.1.3.20] - 2021-06-04
### Changed
- YLAB2-629: Fasta parser is now able to parse empty lines in the beginning.

## [0.1.3.19] - 2021-04-30
### Changed
- Exports and instances for Biosset.
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cobot-io
version: 0.1.3.19
version: 0.1.3.20
github: "biocad/cobot-io"
license: BSD3
category: Bio
Expand Down
4 changes: 2 additions & 2 deletions src/Bio/FASTA/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Bio.FASTA.Type (Fasta, FastaItem (..), ModItem (..), Modification (
import Bio.Sequence (BareSequence, bareSequence)
import Control.Applicative ((<|>))
import Data.Attoparsec.Text (Parser, char, choice, endOfInput, endOfLine, many', many1', satisfy,
skipWhile, string, takeWhile, try)
skipWhile, space, string, takeWhile, try)
import Data.Char (isAlphaNum, isLetter, isSpace)
import Data.Text (Text, strip)
import Prelude hiding (takeWhile)
Expand All @@ -27,7 +27,7 @@ instance ParsableFastaToken ModItem where
-- | Parser of .fasta file.
--
fastaP :: ParsableFastaToken a => Parser (Fasta a)
fastaP = fastaPGeneric isLetter
fastaP = many' space *> fastaPGeneric isLetter

fastaPGeneric :: ParsableFastaToken a => (Char -> Bool) -> Parser (Fasta a)
fastaPGeneric = many' . item
Expand Down

0 comments on commit 4087055

Please sign in to comment.