elynx 0.3.0 → 0.3.1
raw patch · 5 files changed
+56/−51 lines, 5 files
Files
- ChangeLog.md +8/−1
- README.md +27/−27
- app/Main.hs +11/−13
- app/Options.hs +8/−8
- elynx.cabal +2/−2
ChangeLog.md view
@@ -2,7 +2,14 @@ # Changelog for ELynx -## Version 0.3.1; in development+## Version 0.3.2; in development+++## Version 0.3.1++- Use Attoparsec.+- Use ByteString consistently.+- Remove elynx-tools dependency from libaries. ## Version 0.3.0
README.md view
@@ -2,7 +2,7 @@ # The ELynx Suite -Version: 0.3.0.+Version: 0.3.1. Reproducible evolution made easy. <p align="center"><img src="https://travis-ci.org/dschrempf/elynx.svg?branch=master"/></p>@@ -90,9 +90,9 @@ slynx --help | head -n -16 - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME] [-f|--force] COMMAND@@ -136,9 +136,9 @@ slynx concatenate --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx concatenate (-a|--alphabet NAME) INPUT-FILE Concatenate sequences found in input files.@@ -157,9 +157,9 @@ slynx examine --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx examine (-a|--alphabet NAME) INPUT-FILE [--per-site] Examine sequences. If data is a multi sequence alignment, additionally analyze columns.@@ -179,9 +179,9 @@ slynx filter-rows --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx filter-rows (-a|--alphabet NAME) INPUT-FILE [--longer-than LENGTH] [--shorter-than LENGTH] [--standard-characters]@@ -202,9 +202,9 @@ slynx filter-columns --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx filter-columns (-a|--alphabet NAME) INPUT-FILE [--standard-chars DOUBLE]@@ -226,9 +226,9 @@ slynx simulate --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx simulate (-t|--tree-file Name) [-s|--substitution-model MODEL] [-m|--mixture-model MODEL] [-e|--edm-file NAME] @@ -305,9 +305,9 @@ slynx sub-sample --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx sub-sample (-a|--alphabet NAME) INPUT-FILE (-n|--number-of-sites INT)@@ -335,9 +335,9 @@ slynx translate --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: slynx translate (-a|--alphabet NAME) INPUT-FILE (-r|--reading-frame INT) (-u|--universal-code CODE)@@ -360,9 +360,9 @@ tlynx --help | head -n -16 - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: tlynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME] [-f|--force] COMMAND@@ -399,9 +399,9 @@ tlynx compare --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: tlynx compare [-n|--normalize] [-b|--bipartitions] [-t|--intersect] [-f|--newick-format FORMAT] NAMES@@ -428,9 +428,9 @@ tlynx examine --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: tlynx examine INPUT-FILE [-f|--newick-format FORMAT] Compute summary statistics of phylogenetic trees.@@ -452,9 +452,9 @@ tlynx simulate --help - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: tlynx simulate [-t|--nTrees INT] [-n|--nLeaves INT] [-H|--height DOUBLE] [-M|--condition-on-mrca] [-l|--lambda DOUBLE] @@ -491,9 +491,9 @@ elynx --help | head -n -16 - ELynx Suite version 0.3.0.+ ELynx Suite version 0.3.1. Developed by Dominik Schrempf.- Compiled on July 30, 2020, at 12:40 pm, UTC.+ Compiled on August 3, 2020, at 12:12 pm, UTC. Usage: elynx COMMAND Validate and redo past ELynx analyses
app/Main.hs view
@@ -21,20 +21,18 @@ import Control.Monad import Data.Aeson import qualified Data.Aeson.Types as J-import qualified Data.ByteString.Char8 as B+import qualified Data.ByteString.Char8 as BS import Data.Maybe-import Data.Version (Version)+import Data.Version import ELynx.Tools import Options import Options.Applicative import qualified SLynx.Options as S-import SLynx.SLynx (slynx)+import SLynx.SLynx import System.Environment- ( withArgs,- withProgName,- ) import qualified TLynx.Options as T-import TLynx.TLynx (tlynx)+import TLynx.TLynx+import Paths_elynx parseProgName :: Value -> J.Parser String parseProgName = withObject "progName" $ \o -> o .: "progName"@@ -82,7 +80,7 @@ else Right () -- Does the file match the base 16 checksum?-checkFile :: FilePath -> B.ByteString -> IO (Either String ())+checkFile :: FilePath -> BS.ByteString -> IO (Either String ()) checkFile fp h = do h' <- hashFile fp return $@@ -92,8 +90,8 @@ Left $ unlines [ "SHA256 sum does not match for a file:",- fp ++ " has check sum " ++ B.unpack h',- "Stored check sum is " ++ B.unpack h+ fp ++ " has check sum " ++ BS.unpack h',+ "Stored check sum is " ++ BS.unpack h ] checkVersion :: Version -> Either String ()@@ -130,7 +128,7 @@ chA <- checkArgs s let chV = checkVersion (rVersion s) chH = checkHash s- chFs <- zipWithM checkFile (files s) (map B.pack $ checkSums s)+ chFs <- zipWithM checkFile (files s) (map BS.pack $ checkSums s) return $ sequence_ (chA : chV : chH : chFs) validateAllReproductions :: AllReproductions -> IO (Either String ())@@ -182,7 +180,7 @@ putStrLn "Use the --force (-f) option to skip this test." runValidate (ValidateArguments fp) repr <- getAllR fp- let as = getArgs repr+ let as = getELynxArgs repr as' <- if "-f" `notElem` as && "--force" `notElem` as then do@@ -190,7 +188,7 @@ "Force option required to redo analysis. Add -f (force) to arguments." return $ "-f" : as else return as- withProgName (getProgName repr) $ withArgs as' $ redo repr+ withProgName (getELynxProgName repr) $ withArgs as' $ redo repr setForce :: Arguments a -> Arguments a setForce (Arguments g l) = Arguments g {forceReanalysis = Force True} l
app/Options.hs view
@@ -13,8 +13,8 @@ -- Creation date: Thu Apr 23 19:17:17 2020. module Options ( AllReproductions (..),- getProgName,- getArgs,+ getELynxProgName,+ getELynxArgs, ValidateArguments (..), RedoArguments (..), CommandArguments (..),@@ -33,14 +33,14 @@ | T (Reproduction (Arguments T.CommandArguments)) -- | Get program name irrespective of which program has been run.-getProgName :: AllReproductions -> String-getProgName (S x) = progName x-getProgName (T x) = progName x+getELynxProgName :: AllReproductions -> String+getELynxProgName (S x) = progName x+getELynxProgName (T x) = progName x -- | Get arguments irrespective of which program has been run.-getArgs :: AllReproductions -> [String]-getArgs (S x) = argsStr x-getArgs (T x) = argsStr x+getELynxArgs :: AllReproductions -> [String]+getELynxArgs (S x) = argsStr x+getELynxArgs (T x) = argsStr x newtype ValidateArguments = ValidateArguments {vElynxFile :: FilePath}
elynx.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 50f818ff6abb7f056acee6c87a8f19f18892a8752f0f49c3ca76452a38458d8f+-- hash: e81e8aa22d417db9cf1d89217af0751026e9dd347ebb4d5abe8545db3ea1d80e name: elynx-version: 0.3.0+version: 0.3.1 synopsis: Validate and (optionally) redo ELynx analyses description: Please see the README on GitHub at <https://github.com/dschrempf/elynx>. category: Bioinformatics