Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Cleanable a where
- clean :: a -> Maybe a
- cleanWith :: Thresholds -> a -> Maybe a
- data Thresholds = Thresholds {}
- defaultThresholds :: Thresholds
Documentation
class Cleanable a where Source #
Ability to clean initial data.
Returns cleaned variant or Nothing
if it can not be cleaned.
Instances
data Thresholds Source #
Thresholds to clean the data.
ABI file contains sequence with quality. By design of sanger sequencing method start and end of the sequence have bad quality. Moreover, internal part of the sequence can also has bad quality. To clean the data we make 2 steps.
Step 1. Clean edges:
- take frame with
frameSize
and go through the sequence; - on each step evaluate mean value;
- if mean value less than
edgeThreshold
, go further; - if mean value more than
edgeThreshold
stop and cut the sequence from END of this frame; - repeat this algorithm for the right edge.
Step 2. Evaluate quality:
- for cropped sequence evaluate mean value;
- if mean value less then
innerThreshold
, sequence is bad; - if mean value more then
innerThreshold
, sequence is acceptable.
Logic of this algorithm and defaultThresholds
were obtained by taking experiments with read ABI files.
Instances
Show Thresholds Source # | |
Defined in Bio.ABI.Clean showsPrec :: Int -> Thresholds -> ShowS # show :: Thresholds -> String # showList :: [Thresholds] -> ShowS # | |
Eq Thresholds Source # | |
Defined in Bio.ABI.Clean (==) :: Thresholds -> Thresholds -> Bool # (/=) :: Thresholds -> Thresholds -> Bool # |
defaultThresholds :: Thresholds Source #
These thresholds were selected by many experiments on ab1-files.