packages feed

tlynx 0.7.0.1 → 0.7.1.0

raw patch · 11 files changed

+33/−11 lines, 11 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -5,6 +5,13 @@ ## Unreleased changes  +## Version 0.7.1.0++-   Be less strict with quoted identifiers/names in phylogenetic trees.+-   Be less strict with FASTA identifiers.+-   Update tooling (GHC 9.2.4).++ ## Version 0.7.0.1  -   Random 1.2: Parallel functions now require an \`IOGenM\` random number
src/TLynx/Compare/Compare.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}  -- | -- Module      :  TLynx.Compare.Compare
src/TLynx/Compare/Options.hs view
@@ -88,4 +88,4 @@         "Compare intersections; i.e., before comparison, drop leaves that are not present in the other tree"  file :: Parser [FilePath]-file = some $ strArgument $ metavar "NAMES" <> help "Tree files"+file = some $ strArgument $ metavar "NAMES" <> help "Tree files" <> action "file"
src/TLynx/Connect/Connect.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}  -- | -- Module      :  TLynx.Connect.Connect
src/TLynx/Distance/Distance.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskellQuotes #-}  -- | -- Description :  Compute distances between trees
src/TLynx/Distance/Options.hs view
@@ -98,6 +98,7 @@         <> short 'm'         <> metavar "MASTER-TREE-File"         <> help "Compare all trees to the tree in the master tree file."+        <> action "file"  inFilesArg :: Parser FilePath inFilesArg =@@ -105,6 +106,7 @@     metavar "INPUT-FILES"       <> help         "Read tree(s) from INPUT-FILES; if more files are given, one tree is expected per file"+      <> action "file"  symmetric :: AC.Parser DistanceMeasure symmetric = do
src/TLynx/Examine/Examine.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}  -- | -- Description :  Analyze trees@@ -16,12 +15,14 @@   ) where +import Control.Comonad import Control.Monad (unless) import Control.Monad.IO.Class import Control.Monad.Trans.Reader (ask) import qualified Data.ByteString.Lazy.Char8 as BL import Data.Containers.ListUtils (nubOrd)-import Data.List ((\\))+import Data.List (foldl', (\\))+import qualified Data.Map as M import ELynx.Tools.ByteString import ELynx.Tools.ELynx import ELynx.Tools.Environment@@ -65,9 +66,27 @@   nf <- argsNewickFormat . localArguments <$> ask   liftIO $ parseTrees nf fp +countElements :: (Ord a, Foldable f) => f a -> M.Map a Int+countElements = foldl' f M.empty+  where+    f m x = M.alter g x m+    g Nothing = Just 1+    g (Just x) = Just $ x + 1+ examineTree :: HasName a => Handle -> Tree Phylo a -> IO () examineTree h t = do   hPutStrLn h $ "Number of leaves: " ++ show (length lvs)+  hPutStrLn h $ "Degree of root node: " ++ show (degree t)+  if bifurcating t+    then hPutStrLn h "Tree is bifurcating."+    else+      let degrees = extend degree t+          degreeMax = maximum degrees+       in do+            if degreeMax > 2+              then hPutStrLn h "Tree is multifurcating."+              else hPutStrLn h "Tree is bifurcating but has degree two nodes."+            hPutStrLn h $ "List of degrees with counts: " <> show (M.toList $ countElements degrees)   let l = toLengthTree t   case l of     Left _ -> hPutStrLn h "Branch lengths not available."
src/TLynx/Examine/Options.hs view
@@ -49,4 +49,4 @@  inFile :: Parser FilePath inFile =-  strArgument $ metavar "INPUT-FILE" <> help "Read trees from INPUT-FILE"+  strArgument $ metavar "INPUT-FILE" <> help "Read trees from INPUT-FILE" <> action "file"
src/TLynx/Shuffle/Shuffle.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}  -- | -- Module      :  TLynx.Shuffle.Shuffle
src/TLynx/Simulate/Simulate.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TupleSections #-}  -- | --   Description :  Simulate reconstructed trees
tlynx.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               tlynx-version:            0.7.0.1+version:            0.7.1.0 synopsis:           Handle phylogenetic trees description:   Examine, compare, and simulate phylogenetic trees in a reproducible way. Please see the README on GitHub at <https://github.com/dschrempf/elynx>.