elynx-markov 0.7.2.2 → 0.8.0.0
raw patch · 6 files changed
+28/−23 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- README.md +5/−5
- elynx-markov.cabal +1/−1
- src/ELynx/MarkovProcess/RateMatrix.hs +3/−3
- src/ELynx/Simulate/MarkovProcess.hs +1/−1
- src/ELynx/Simulate/MarkovProcessAlongTree.hs +13/−13
ChangeLog.md view
@@ -5,6 +5,11 @@ ## Unreleased changes +## Version 0.8.0.0++- Adapt to breaking changes in upstream libraries (`data-default`).++ ## Version 0.7.2.0 - `slynx`: Allow global normalization of mixture models.
README.md view
@@ -2,7 +2,7 @@ # The ELynx Suite -Version: 0.7.2.1.+Version: 0.8.0.0. Reproducible evolution made easy. <p align="center"><img src="https://travis-ci.org/dschrempf/elynx.svg?branch=master"/></p>@@ -73,9 +73,9 @@ # OR: stack exec slynx -- --help # OR: slynx --help - ELynx Suite version 0.7.2.1.+ ELynx Suite version 0.8.0.0. Developed by Dominik Schrempf.- Compiled on June 15, 2023, at 19:54 pm, UTC.+ Compiled on October 27, 2024, at 07:14 am, UTC. Usage: slynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME] [-f|--force] [--no-elynx-file] COMMAND@@ -143,9 +143,9 @@ # OR: stack exec slynx -- simulate --help # OR: slynx simulate --help - ELynx Suite version 0.7.2.1.+ ELynx Suite version 0.8.0.0. Developed by Dominik Schrempf.- Compiled on June 15, 2023, at 19:54 pm, UTC.+ Compiled on October 27, 2024, at 07:14 am, UTC. Usage: slynx simulate (-t|--tree-file Name) [-s|--substitution-model MODEL] [-m|--mixture-model MODEL] [-n|--global-normalization]
elynx-markov.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: elynx-markov-version: 0.7.2.2+version: 0.8.0.0 synopsis: Simulate molecular sequences along trees description: Examine, modify, and simulate molecular sequences in a reproducible way. Please see the README on GitHub at <https://github.com/dschrempf/elynx>.
src/ELynx/MarkovProcess/RateMatrix.hs view
@@ -173,7 +173,7 @@ -- The function is a little weird because HMatrix uses Double indices for Matrix -- Double builders.-fromListBuilderLower :: RealFrac a => [a] -> a -> a -> a+fromListBuilderLower :: (RealFrac a) => [a] -> a -> a -> a fromListBuilderLower es i j | i > j = es !! ijToKLower iI jI | i == j = 0.0@@ -187,7 +187,7 @@ -- The function is a little weird because HMatrix uses Double indices for Matrix -- Double builders.-fromListBuilderUpper :: RealFrac a => Int -> [a] -> a -> a -> a+fromListBuilderUpper :: (RealFrac a) => Int -> [a] -> a -> a -> a fromListBuilderUpper n es i j | i < j = es !! ijToKUpper n iI jI | i == j = 0.0@@ -199,7 +199,7 @@ iI = round i :: Int jI = round j :: Int -checkEs :: RealFrac a => Int -> [a] -> [a]+checkEs :: (RealFrac a) => Int -> [a] -> [a] checkEs n es | length es == nExp = es | otherwise = error eStr
src/ELynx/Simulate/MarkovProcess.hs view
@@ -45,7 +45,7 @@ -- -- This function is the bottleneck of the simulator and takes up most of the -- computation time.-jump :: StatefulGen g m => State -> ProbMatrix -> g -> m State+jump :: (StatefulGen g m) => State -> ProbMatrix -> g -> m State jump i p = categorical (p ! i) -- XXX: Maybe for later, use condensed tables.
src/ELynx/Simulate/MarkovProcessAlongTree.hs view
@@ -53,7 +53,7 @@ toProbTree q = fmap (probMatrix q) getRootStates ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> StationaryDistribution -> g ->@@ -67,7 +67,7 @@ -- XXX: Improve performance. Use vectors, not lists. I am actually not sure if -- this improves performance... simulateAndFlatten ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> StationaryDistribution -> ExchangeabilityMatrix ->@@ -84,7 +84,7 @@ -- Recursively jump down the branches to the leafs. Forget states at internal -- nodes. simulateAndFlatten' ::- StatefulGen g m =>+ (StatefulGen g m) => [State] -> Tree ProbMatrix -> g ->@@ -97,7 +97,7 @@ -- | See 'simulateAndFlatten', parallel version. simulateAndFlattenPar ::- RandomGen g =>+ (RandomGen g) => Int -> StationaryDistribution -> ExchangeabilityMatrix ->@@ -126,7 +126,7 @@ -- internal nodes. The result is a tree with the list of simulated states as -- node labels. simulate ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> StationaryDistribution -> ExchangeabilityMatrix ->@@ -142,7 +142,7 @@ -- This is the heart of the simulation. Take a tree and a list of root states. -- Recursively jump down the branches to the leafs. simulate' ::- StatefulGen g m =>+ (StatefulGen g m) => [State] -> Tree ProbMatrix -> g ->@@ -159,7 +159,7 @@ fmap (\a -> V.map (`probMatrix` a) qs) getComponentsAndRootStates ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> V.Vector Double -> V.Vector StationaryDistribution ->@@ -174,7 +174,7 @@ -- corresponding weights. Forget states at internal nodes. See also -- 'simulateAndFlatten'. simulateAndFlattenMixtureModel ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> V.Vector Double -> V.Vector StationaryDistribution ->@@ -191,7 +191,7 @@ return (cs, ss) simulateAndFlattenMixtureModel' ::- StatefulGen g m =>+ (StatefulGen g m) => [State] -> [Int] -> Tree (V.Vector ProbMatrix) ->@@ -216,7 +216,7 @@ -- requires benchmarks. I am just not sure if it makes sense to spend more time -- on this since the parallelization itself is a bit weird. Like so, we walk -- along separate trees in each process.-parComp :: RandomGen g => Int -> (Int -> IOGenM g -> IO b) -> IOGenM g -> IO [b]+parComp :: (RandomGen g) => Int -> (Int -> IOGenM g -> IO b) -> IOGenM g -> IO [b] parComp num fun gen = do ncap <- getNumCapabilities let chunks = getChunks ncap num@@ -226,7 +226,7 @@ -- | See 'simulateAndFlattenMixtureModel', parallel version. simulateAndFlattenMixtureModelPar ::- RandomGen g =>+ (RandomGen g) => Int -> V.Vector Double -> V.Vector StationaryDistribution ->@@ -255,7 +255,7 @@ -- corresponding weights. Keep states at internal nodes. See also -- 'simulate'. simulateMixtureModel ::- StatefulGen g m =>+ (StatefulGen g m) => Int -> V.Vector Double -> V.Vector StationaryDistribution ->@@ -272,7 +272,7 @@ -- See 'simulateAlongProbTree', only we have a number of mixture components. The -- starting states and the components for each site have to be provided. simulateMixtureModel' ::- StatefulGen g m =>+ (StatefulGen g m) => [State] -> [Int] -> Tree (V.Vector ProbMatrix) ->