packages feed

diversity 0.7.0.3 → 0.7.1.0

raw patch · 3 files changed

+14/−4 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Math.Diversity.Diversity: chao1 :: Ord a => Map a Int -> Double
+ Math.Diversity.Diversity: chao1 :: (Ord a) => Map a Int -> Double
- Math.Diversity.Diversity: diversity :: Ord a => Double -> [a] -> Double
+ Math.Diversity.Diversity: diversity :: (Ord a) => Double -> [a] -> Double
- Math.Diversity.Diversity: diversityOfMap :: Ord a => Double -> Map a Int -> Double
+ Math.Diversity.Diversity: diversityOfMap :: (Ord a) => Double -> Map a Int -> Double
- Math.Diversity.GenerateDiversity: generatePositionMap :: Bool -> Int -> Int -> Bool -> Window -> FastaSequence -> PositionMap
+ Math.Diversity.GenerateDiversity: generatePositionMap :: Bool -> Bool -> Int -> Int -> Bool -> Window -> FastaSequence -> PositionMap

Files

diversity.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                diversity-version:             0.7.0.3+version:             0.7.1.0 synopsis:            Return the diversity at each position by default for all sequences in a fasta file description:         Find the diversity of a collection of entities, mainly for use with fasta sequences. homepage:            https://github.com/GregorySchwartz/diversity
src/src-exec/Main.hs view
@@ -33,6 +33,7 @@                        , inputG                 :: Double                        , fastBin                :: Bool                        , runs                   :: Int+                       , gapsFlag               :: Bool                        , removeNBool            :: Bool                        , wholeSeq               :: Bool                        , list                   :: Bool@@ -131,6 +132,13 @@                  \ rarefaction is automatically enabled (individual based only,\                  \ not for sample based)" )       <*> switch+          ( long "keep-gaps"+         <> short 'G'+         <> help "Do not remove '.' and '-' characters from the analysis. This\+                 \ flag will thus treat these characters as additional entities\+                 \ rather than be ignored as artificial biological gaps in\+                 \ a sequence" )+      <*> switch           ( long "remove-N"          <> short 'n'          <> help "Remove 'N' and 'n' characters" )@@ -198,6 +206,7 @@           $ P.fromHandle h         >-> toFastaSequence (list opts) h         >-> P.map ( generatePositionMap+                    (gapsFlag opts)                     (sample opts)                     (inputSampleField opts)                     (inputCountField opts)
src/src-lib/Math/Diversity/GenerateDiversity.hs view
@@ -15,7 +15,6 @@ import Data.List import Data.Fasta.String import qualified Data.Sequence as Seq-import Debug.Trace  -- Cabal import qualified Data.List.Split as Split@@ -50,13 +49,15 @@  -- | Generate the frequency from a FastaSequence generatePositionMap :: Bool+                    -> Bool                     -> Int                     -> Int                     -> Bool                     -> Window                     -> FastaSequence                     -> PositionMap-generatePositionMap !sample !sampleField !countField !whole !win = posSeqList+generatePositionMap !gapsFlag !sample !sampleField !countField !whole !win =+    posSeqList   where     posSeqList !x       = Map.fromList                         . map ( \(!p, !f) -> ( p@@ -68,6 +69,6 @@                         . zip [1..]                         . fastaSeq                         $ x-    noGaps y            = y /= '-' && y /= '.'+    noGaps y            = (y /= '-' && y /= '.') || gapsFlag     sampleIt True !s !f = (getField sampleField s, f)     sampleIt False _ !f = ("Sample", f)