packages feed

tlynx 0.6.1.0 → 0.6.1.1

raw patch · 5 files changed

+63/−49 lines, 5 filesdep −gnuplotPVP ok

version bump matches the API change (PVP)

Dependencies removed: gnuplot

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -5,6 +5,13 @@ ## Unreleased changes  +## Version 0.6.1.1++-   Remove plotting functionality (gnuplot incompatible with ghc921).+-   Read files strictly.+-   Refactor; flatten model hierarchy.++ ## Version 0.6.1.0  -   Split `ELynx.Tools` into separate modules because the package will be reduced.
README.md view
@@ -2,7 +2,7 @@  # The ELynx Suite -Version: 0.6.0.0.+Version: 0.6.1.1. Reproducible evolution made easy.  <p align="center"><img src="https://travis-ci.org/dschrempf/elynx.svg?branch=master"/></p>@@ -69,15 +69,16 @@  # Get help -    cabal exec slynx -- --help+    cabal run slynx -- --help     # OR: stack exec slynx -- --help     # OR: slynx --help -    ELynx Suite version 0.6.0.0.+    Up to date+    ELynx Suite version 0.6.1.1.     Developed by Dominik Schrempf.-    Compiled on September 4, 2021, at 12:58 pm, UTC.+    Compiled on February 22, 2022, at 15:10 pm, UTC.     -    Usage: slynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME] +    Usage: slynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME]                  [-f|--force] [--no-elynx-file] COMMAND       Analyze, and simulate multi sequence alignments.     @@ -138,18 +139,19 @@  The documentation of sub commands can be accessed separately: -    cabal exec slynx -- simulate --help+    cabal run slynx -- simulate --help     # OR: stack exec slynx -- simulate --help     # OR: slynx simulate --help -    ELynx Suite version 0.6.0.0.+    Up to date+    ELynx Suite version 0.6.1.1.     Developed by Dominik Schrempf.-    Compiled on September 4, 2021, at 12:58 pm, UTC.+    Compiled on February 22, 2022, at 15:10 pm, UTC.     -    Usage: slynx simulate (-t|--tree-file Name) [-s|--substitution-model MODEL] -                          [-m|--mixture-model MODEL] [-e|--edm-file NAME] -                          [-p|--siteprofile-files NAMES] -                          [-w|--mixture-model-weights "[DOUBLE,DOUBLE,...]"] +    Usage: slynx simulate (-t|--tree-file Name) [-s|--substitution-model MODEL]+                          [-m|--mixture-model MODEL] [-e|--edm-file NAME]+                          [-p|--siteprofile-files NAMES]+                          [-w|--mixture-model-weights "[DOUBLE,DOUBLE,...]"]                           [-g|--gamma-rate-heterogeneity "(NCAT,SHAPE)"]                           (-l|--length NUMBER) [-S|--seed [INT]]       Simulate multi sequence alignments.
src/TLynx/Compare/Compare.hs view
@@ -31,7 +31,6 @@ import ELynx.Tools.Logger import ELynx.Tools.Options import ELynx.Tree-import Graphics.Gnuplot.Simple import System.IO import TLynx.Compare.Options import TLynx.Parsers@@ -91,11 +90,13 @@   (t1, t2) <-     if argsIntersect l       then do-        let [x, y] = either error id $ intersect [tr1, tr2]-        liftIO $ hPutStrLn outH "Intersected trees are:"-        liftIO $ BL.hPutStrLn outH $ toNewick x-        liftIO $ BL.hPutStrLn outH $ toNewick y-        return (x, y)+        case either error id $ intersect [tr1, tr2] of+          [x, y] -> do+            liftIO $ hPutStrLn outH "Intersected trees are:"+            liftIO $ BL.hPutStrLn outH $ toNewick x+            liftIO $ BL.hPutStrLn outH $ toNewick y+            return (x, y)+          _ -> error "compareCmd: Could not intersect trees."       else return (tr1, tr2)    -- Distances.@@ -230,14 +231,16 @@           case bn of             Nothing ->               logInfoS "No output file name provided. Do not generate plots."-            Just fn -> do-              let compareCommonBps =-                    [ (bpToBrLen1 M.! b, bpToBrLen2 M.! b)-                      | b <- S.toList bpCommon-                    ]-              liftIO $ epspdfPlot fn (plotBps compareCommonBps)-              logInfoS-                "Comparison of branch lengths plot generated (EPS and PDF)"+            -- Just fn -> do+            --   let compareCommonBps =+            --         [ (bpToBrLen1 M.! b, bpToBrLen2 M.! b)+            --           | b <- S.toList bpCommon+            --         ]+            --   liftIO $ epspdfPlot fn (plotBps compareCommonBps)+            --   logInfoS+            --     "Comparison of branch lengths plot generated (EPS and PDF)"+            Just _ -> do+              logInfoS "No plot generated (no Gnuplot with GHC 9.2.1)"     _ -> logWarnS "Not all branches have a length! Can not analyze bipartitions."  header :: String@@ -270,19 +273,22 @@     rd = 2 * d / (l1 + l2)     s = bpHuman p -plotBps :: [(Double, Double)] -> [Attribute] -> IO ()-plotBps xs as = plotPathsStyle as' [(ps1, xs), (ps2, line)]-  where-    as' =-      as-        ++ [ Title "Comparison of branch lengths of common branches",-             XLabel "Branch lengths, tree 1",-             YLabel "Branch lengths, tree 2"-           ]-    ps1 = PlotStyle Points (DefaultStyle 1)-    -- m = minimum $ map fst xs ++ map snd xs-    mx = maximum $ map fst xs-    my = maximum $ map snd xs-    m = min mx my-    line = [(0, 0), (m, m)]-    ps2 = PlotStyle Lines (DefaultStyle 1)+-- -- NOTE: I removed the plotting functionality because Gnuplot does not+-- -- support GHC 9.2.1.+--+-- plotBps :: [(Double, Double)] -> [Attribute] -> IO ()+-- plotBps xs as = plotPathsStyle as' [(ps1, xs), (ps2, line)]+--   where+--     as' =+--       as+--         ++ [ Title "Comparison of branch lengths of common branches",+--              XLabel "Branch lengths, tree 1",+--              YLabel "Branch lengths, tree 2"+--            ]+--     ps1 = PlotStyle Points (DefaultStyle 1)+--     -- m = minimum $ map fst xs ++ map snd xs+--     mx = maximum $ map fst xs+--     my = maximum $ map snd xs+--     m = min mx my+--     line = [(0, 0), (m, m)]+--     ps2 = PlotStyle Lines (DefaultStyle 1)
src/TLynx/Distance/Distance.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TemplateHaskellQuotes #-}  -- | -- Description :  Compute distances between trees@@ -153,9 +153,9 @@   let distanceMeasure =         if argsIntersect l           then-            ( \t1 t2 ->-                let [t1', t2'] = either error id $ intersect [t1, t2]-                 in distanceMeasure' t1' t2'+            ( \t1 t2 -> case either error id $ intersect [t1, t2] of+                [t1', t2'] -> distanceMeasure' t1' t2'+                _ -> error "distance: Could not intersect trees."             )           else distanceMeasure'   -- Possibly normalize trees.
tlynx.cabal view
@@ -1,6 +1,6 @@-cabal-version:  2.2+cabal-version:  3.0 name:           tlynx-version:        0.6.1.0+version:        0.6.1.1 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>. category:       Bioinformatics@@ -56,7 +56,6 @@     , data-default-class     , elynx-tools     , elynx-tree-    , gnuplot     , mwc-random     , optparse-applicative     , parallel