Skip to content

Commit

Permalink
version 0.1.3.5: fix clean sequence with raw data (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
maksbotan authored May 26, 2020
1 parent 6a3b801 commit 2d67bf7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
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.5] - 2020-05-26
### Fixed
- Correctly clean `BasecalledSequenceWithRawData`, including inner quality.

## [0.1.3.4] - 2020-05-14
### Added
- `instance Cleanable BasecalledSequenceWithRawData`.
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.4
version: 0.1.3.5
github: "biocad/cobot-io"
license: BSD3
category: Bio
Expand Down
1 change: 1 addition & 0 deletions src/Bio/ABI/Clean.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ instance Cleanable BasecalledSequenceWithRawData where
let rightDroppedSequ = S.take (S.length leftDroppedSequ - toDropRight) leftDroppedSequ
let rightDroppedPloc = V.take (V.length leftDroppedPloc - toDropRight) leftDroppedPloc

guard $ checkInner thr rightDroppedSequ
return input { bsSequence = rightDroppedSequ, bsPeakLocations = rightDroppedPloc }

-------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions test/ABISpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ abiCleanSpec =
it "clean with raw data is the same as without" $ do
Right bsWithRaw <- decodeRawSequence <$> BSL.readFile "test/ABI/bad_at_the_end.ab1"
bsSequence <$> clean bsWithRaw `shouldBe` clean (bsSequence bsWithRaw)

it "totally clean bad ABI file with raw data" $ do
Right bsWithRaw <- decodeRawSequence <$> BSL.readFile "test/ABI/bad_quality.ab1"
clean bsWithRaw `shouldBe` Nothing
where
checkFile :: FilePath -> Int -> Int -> String -> IO ()
checkFile path lengthBefore lengthAfter start = do
Expand Down

0 comments on commit 2d67bf7

Please sign in to comment.