packages feed

BiobaseNewick 0.0.0.1 → 0.0.0.2

raw patch · 3 files changed

+95/−43 lines, 3 filesdep +cmdargsdep ~ForestStructuresdep ~QuickCheckdep ~aesonnew-component:exe:TestForestStructurePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: cmdargs

Dependency ranges changed: ForestStructures, QuickCheck, aeson, attoparsec, base, binary, cereal, cereal-text, containers, fgl, test-framework, test-framework-quickcheck2, test-framework-th, text, text-binary, vector

API changes (from Hackage documentation)

- Biobase.Newick.Types: instance Data.Aeson.Types.Class.FromJSON Biobase.Newick.Types.Info
- Biobase.Newick.Types: instance Data.Aeson.Types.Class.FromJSON Biobase.Newick.Types.NewickTree
- Biobase.Newick.Types: instance Data.Aeson.Types.Class.ToJSON Biobase.Newick.Types.Info
- Biobase.Newick.Types: instance Data.Aeson.Types.Class.ToJSON Biobase.Newick.Types.NewickTree
- Biobase.Newick.Types: instance GHC.Generics.Constructor Biobase.Newick.Types.C1_0Info
- Biobase.Newick.Types: instance GHC.Generics.Constructor Biobase.Newick.Types.C1_0NewickTree
- Biobase.Newick.Types: instance GHC.Generics.Datatype Biobase.Newick.Types.D1Info
- Biobase.Newick.Types: instance GHC.Generics.Datatype Biobase.Newick.Types.D1NewickTree
- Biobase.Newick.Types: instance GHC.Generics.Selector Biobase.Newick.Types.S1_0_0Info
- Biobase.Newick.Types: instance GHC.Generics.Selector Biobase.Newick.Types.S1_0_0NewickTree
- Biobase.Newick.Types: instance GHC.Generics.Selector Biobase.Newick.Types.S1_0_1Info
+ Biobase.Newick.Types: instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Newick.Types.Info
+ Biobase.Newick.Types: instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Newick.Types.NewickTree
+ Biobase.Newick.Types: instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Newick.Types.Info
+ Biobase.Newick.Types: instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Newick.Types.NewickTree

Files

BiobaseNewick.cabal view
@@ -1,17 +1,17 @@ Name:           BiobaseNewick-Version:        0.0.0.1+Version:        0.0.0.2 License:        BSD3 License-file:   LICENSE Author:         Christian Hoener zu Siederdissen Maintainer:     choener@bioinf.uni-leipzig.de-Copyright:      Christian Hoener zu Siederdissen, 2015-2016+Copyright:      Christian Hoener zu Siederdissen, 2015-2017 Homepage:       https://github.com/choener/BiobaseNewick bug-reports:    https://github.com/choener/BiobaseNewick/issues Stability:      Experimental Category:       Bioinformatics Build-type:     Simple Cabal-version:  >= 1.10-tested-with:    GHC == 7.10.3+tested-with:    GHC == 7.10.3, GHC == 8.0.1, GHC == 8.0.2 Synopsis:       Newick file format parser. Description:                 This is a simple parser for Newick trees. The parser returns a@@ -21,6 +21,8 @@                 .                 Includes conversion to an efficient static forest. ++ extra-source-files:   changelog.md   README.md@@ -35,19 +37,20 @@     Biobase.Newick.StaticForest     Biobase.Newick.Types -  build-depends: base                     >= 4.7      &&  < 4.9-               , aeson                    >= 0.8      &&  < 0.11-               , attoparsec               >= 0.12     &&  < 0.14-               , binary                   >= 0.7      &&  < 0.8-               , cereal                   >= 0.4      &&  < 0.6-               , cereal-text              >= 0.1.0    &&  < 0.1.1-               , containers               >= 0.5      &&  < 0.6-               , fgl                      >= 5.5      &&  < 6.0-               , ForestStructures         >= 0.0.0    &&  < 0.0.1-               , QuickCheck               >= 2.7      &&  < 2.9-               , text                     >= 1.2      &&  < 1.3-               , text-binary              >= 0.1.0    &&  < 0.2.2-               , vector                   >= 0.10     &&  < 0.12+  build-depends: base                     >= 4.7      &&  < 5.0+               , aeson                    >= 0.8+               , attoparsec               >= 0.12+               , binary                   >= 0.7+               , cereal                   >= 0.4+               , cereal-text              >= 0.1.0+               , containers               >= 0.5+               , fgl                      >= 5.5+               , QuickCheck               >= 2.7+               , text                     >= 1.2+               , text-binary              >= 0.1.0+               , vector                   >= 0.10+               --+               , ForestStructures         == 0.0.0.*   ghc-options:     -O2     -funbox-strict-fields@@ -59,31 +62,29 @@   --- A small helper that turns a Newick tree in a diagram.+-- simple testing program that displays static forest structures from newick trees ---executable Newick-diagrams---  build-depends: base---               , BiobaseNewick---               , cmdargs              >= 0.10   && < 0.11---               , diagrams             >= 1.3    && < 1.4---               , diagrams-postscript  >= 1.3    && < 1.4---               , diagrams-rasterific  >= 1.3    && < 1.4---  hs-source-dirs:---    src---  main-is:---    diagram.hs---  default-language:---    Haskell2010---  default-extensions: BangPatterns---                    , FlexibleContexts---                    , FlexibleInstances---                    , MultiParamTypeClasses---                    , RecordWildCards---                    , TemplateHaskell---                    , TypeFamilies---                    , TypeOperators---  ghc-options:---    -O2+executable TestForestStructure+  build-depends: base+               , cmdargs  >= 0.10+               , text+               , vector+               --+               , BiobaseNewick+               , ForestStructures+  hs-source-dirs:+    src+  main-is:+    TestForestStructure.hs+  default-language:+    Haskell2010+  default-extensions: BangPatterns+                    , DataKinds+                    , DeriveDataTypeable+                    , RecordWildCards+                    , ScopedTypeVariables+  ghc-options:+    -O2   @@ -106,9 +107,9 @@                , BiobaseNewick                , cereal                , QuickCheck-               , test-framework               >= 0.8  && < 0.9-               , test-framework-quickcheck2   >= 0.3  && < 0.4-               , test-framework-th            >= 0.2  && < 0.3+               , test-framework               >= 0.8+               , test-framework-quickcheck2   >= 0.3+               , test-framework-th            >= 0.2   
changelog.md view
@@ -1,3 +1,8 @@+0.0.0.2+-------++- removed most upper bounds+ 0.0.0.1 ------- 
+ src/TestForestStructure.hs view
@@ -0,0 +1,46 @@++module Main where++import Control.Monad+import Data.Text.IO as T (readFile,putStrLn)+import System.Console.CmdArgs+import Data.Vector (Vector)++import Data.Forest.Static++import Biobase.Newick hiding (label)++++data Options = Options+  { input :: String+  }+  deriving (Show,Data,Typeable)++oOptions = Options+  { input = def &= args+  }++main = do+  Options{..} <- cmdArgs oOptions+  let input = "../Lib-ADPfusionForest/examples/t7.nwk"+  ft <- T.readFile input+  T.putStrLn ft+  ns <- newicksFromFile input+  forM_ ns $ \n -> do+    let post :: Forest Post Vector Info = forestPost $ map getNewickTree n+    let pre  :: Forest Pre  Vector Info = forestPre  $ map getNewickTree n+    putStr "label    "+    print $ label    post+    putStr "children "+    print $ children post+    putStr "lsib     "+    print $ lsib     post+    putStr "rsib     "+    print $ rsib     post+    putStr "roots    "+    print $ roots    post+    putStr "lml      "+    print $ leftMostLeaves post+    return ()+