packages feed

BioHMM 1.0.1 → 1.0.2

raw patch · 3 files changed

+38/−36 lines, 3 filesdep ~diagrams-cairodep ~diagrams-libPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: diagrams-cairo, diagrams-lib

API changes (from Hackage documentation)

- Bio.HMMDraw: drawHMMComparison :: String -> Int -> String -> Double -> [HMMER3] -> [Maybe StockholmAlignment] -> [HMMCompareResult] -> QDiagram Cairo V2 Double Any
+ Bio.HMMDraw: drawHMMComparison :: String -> Int -> String -> Double -> Double -> [HMMER3] -> [Maybe StockholmAlignment] -> [HMMCompareResult] -> QDiagram Cairo V2 Double Any
- Bio.HMMDraw: drawHMMER3 :: String -> Int -> Double -> String -> (HMMER3, Maybe StockholmAlignment, Vector (Int, Vector (Colour Double)), Colour Double) -> QDiagram Cairo V2 Double Any
+ Bio.HMMDraw: drawHMMER3 :: String -> Int -> Double -> Double -> String -> (HMMER3, Maybe StockholmAlignment, Vector (Int, Vector (Colour Double)), Colour Double) -> QDiagram Cairo V2 Double Any
- Bio.HMMDraw: drawHMMER3s :: String -> Int -> Double -> String -> [HMMER3] -> [Maybe StockholmAlignment] -> QDiagram Cairo V2 Double Any
+ Bio.HMMDraw: drawHMMER3s :: String -> Int -> Double -> Double -> String -> [HMMER3] -> [Maybe StockholmAlignment] -> QDiagram Cairo V2 Double Any
- Bio.HMMDraw: drawSingleHMMComparison :: String -> Int -> String -> Double -> [HMMER3] -> [Maybe StockholmAlignment] -> [HMMCompareResult] -> [QDiagram Cairo V2 Double Any]
+ Bio.HMMDraw: drawSingleHMMComparison :: String -> Int -> String -> Double -> Double -> [HMMER3] -> [Maybe StockholmAlignment] -> [HMMCompareResult] -> [QDiagram Cairo V2 Double Any]
- Bio.HMMDraw: drawSingleHMMER3s :: String -> Int -> Double -> String -> [HMMER3] -> [Maybe StockholmAlignment] -> [QDiagram Cairo V2 Double Any]
+ Bio.HMMDraw: drawSingleHMMER3s :: String -> Int -> Double -> Double -> String -> [HMMER3] -> [Maybe StockholmAlignment] -> [QDiagram Cairo V2 Double Any]

Files

BioHMM.cabal view
@@ -1,7 +1,7 @@ name:                BioHMM-version:             1.0.1-synopsis:            Libary containing parsing and visualisation functions and datastructures for Hidden Markov Models in HMMER3 format. --- description:         +version:             1.0.2+synopsis:            Libary for Hidden Markov Models in HMMER3 format. +description:         Libary containing parsing and visualisation functions and datastructures for Hidden Markov Models in HMMER3 format.   license:             GPL-3 license-file:        LICENSE author:              Florian Eggenhofer@@ -20,8 +20,8 @@  source-repository this   type:     git-  location: https://github.com/eggzilla/HMM/tree/1.0.1-  tag:      1.0.1+  location: https://github.com/eggzilla/HMM/tree/1.0.2+  tag:      1.0.2  library   -- Modules exported by the library.@@ -34,7 +34,7 @@   ghc-options:         -Wall -O2 -fno-warn-unused-do-bind    -- Other library packages from which modules are imported.-  build-depends:       base >=4.5 && <5, parsec>=3.1.9, diagrams-lib, text, vector, ParsecTools, diagrams-cairo, filepath, colour, directory, either-unwrap, SVGFonts >= 1.6, StockholmAlignment+  build-depends:       base >=4.5 && <5, parsec>=3.1.9, diagrams-lib>=1.4.0.1, text, vector, ParsecTools, diagrams-cairo>=1.4, filepath, colour, directory, either-unwrap, SVGFonts >= 1.6, StockholmAlignment      -- Directories containing source files.   hs-source-dirs:      src
changelog view
@@ -1,4 +1,6 @@ -*-change-log-*-+1.0.2 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 29. December 2016+        * Added size scaling to HMM drawing functions 1.0.1 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 22. December 2016         * Bugfix - added Bio.HMMCompare to exported modules 1.0.0 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 22. December 2016
src/Bio/HMMDraw.hs view
@@ -32,12 +32,12 @@ import Graphics.SVGFonts import Bio.StockholmFont -drawHMMComparison :: String -> Int -> String -> Double -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [HMMCompareResult] -> QDiagram Cairo V2 Double Any-drawHMMComparison modelDetail entryNumberCutoff emissiontype maxWidth hmms alns comparisons-   | modelDetail == "flat" = alignTL (vcat' with { _sep = 8 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-   | modelDetail == "simple" = alignTL (vcat' with { _sep = 8 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-   | modelDetail == "detailed" = alignTL (vcat' with { _sep = 40 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-   | otherwise = alignTL (vcat' with { _sep = 40 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))+drawHMMComparison :: String -> Int -> String -> Double -> Double -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [HMMCompareResult] -> QDiagram Cairo V2 Double Any+drawHMMComparison modelDetail entryNumberCutoff emissiontype maxWidth scalef hmms alns comparisons+   | modelDetail == "flat" = alignTL (vcat' with { _sep = 8 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+   | modelDetail == "simple" = alignTL (vcat' with { _sep = 8 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+   | modelDetail == "detailed" = alignTL (vcat' with { _sep = 40 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+   | otherwise = alignTL (vcat' with { _sep = 40 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))      where zippedInput = zip4 hmms alns comparisonNodeLabels (V.toList colorVector)            colorVector = makeColorVector modelNumber            modelNumber = length hmms@@ -45,12 +45,12 @@            nameColorVector = V.zipWith (\a b -> (a,b)) modelNames colorVector            comparisonNodeLabels = map (getComparisonNodeLabels comparisons nameColorVector) hmms -drawSingleHMMComparison :: String -> Int -> String -> Double -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [HMMCompareResult] -> [QDiagram Cairo V2 Double Any]-drawSingleHMMComparison modelDetail entryNumberCutoff emissiontype maxWidth hmms alns comparisons-   | modelDetail == "flat" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-   | modelDetail == "simple" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-   | modelDetail == "detailed" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-   | otherwise = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput+drawSingleHMMComparison :: String -> Int -> String -> Double -> Double -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [HMMCompareResult] -> [QDiagram Cairo V2 Double Any]+drawSingleHMMComparison modelDetail entryNumberCutoff emissiontype maxWidth scalef hmms alns comparisons+   | modelDetail == "flat" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+   | modelDetail == "simple" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+   | modelDetail == "detailed" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+   | otherwise = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput      where zippedInput = zip4 hmms alns comparisonNodeLabels (V.toList colorVector)            colorVector = makeColorVector modelNumber            modelNumber = length hmms@@ -59,33 +59,33 @@            comparisonNodeLabels = map (getComparisonNodeLabels comparisons nameColorVector) hmms                          -- | -drawHMMER3s :: String -> Int -> Double -> String -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> QDiagram Cairo V2 Double Any-drawHMMER3s modelDetail entryNumberCutoff maxWidth emissiontype hmms alns -  | modelDetail == "flat" = alignTL (vcat' with { _sep = 8 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-  | modelDetail == "simple" = alignTL (vcat' with { _sep = 8 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-  | modelDetail == "detailed" = alignTL (vcat' with { _sep = 40 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))-  | otherwise = alignTL (vcat' with { _sep = 40 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput))+drawHMMER3s :: String -> Int -> Double -> Double -> String -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> QDiagram Cairo V2 Double Any+drawHMMER3s modelDetail entryNumberCutoff maxWidth scalef emissiontype hmms alns +  | modelDetail == "flat" = alignTL (vcat' with { _sep = 8 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+  | modelDetail == "simple" = alignTL (vcat' with { _sep = 8 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+  | modelDetail == "detailed" = alignTL (vcat' with { _sep = 40 * scalef} (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))+  | otherwise = alignTL (vcat' with { _sep = 40 } (map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput))     where zippedInput = zip4 hmms alns blankComparisonNodeLabels colorList           blankComparisonNodeLabels = map getBlankComparisonNodeLabels hmms           colorList = replicate (length hmms) white -drawSingleHMMER3s :: String -> Int -> Double -> String -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [QDiagram Cairo V2 Double Any]-drawSingleHMMER3s modelDetail entryNumberCutoff maxWidth emissiontype hmms alns -  | modelDetail == "flat" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-  | modelDetail == "simple" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-  | modelDetail == "detailed" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput-  | otherwise = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth emissiontype) zippedInput+drawSingleHMMER3s :: String -> Int -> Double -> Double -> String -> [HM.HMMER3] -> [Maybe S.StockholmAlignment] -> [QDiagram Cairo V2 Double Any]+drawSingleHMMER3s modelDetail entryNumberCutoff maxWidth scalef emissiontype hmms alns +  | modelDetail == "flat" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+  | modelDetail == "simple" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+  | modelDetail == "detailed" = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput+  | otherwise = map (drawHMMER3 modelDetail entryNumberCutoff maxWidth scalef emissiontype) zippedInput     where zippedInput = zip4 hmms alns blankComparisonNodeLabels colorList           blankComparisonNodeLabels = map getBlankComparisonNodeLabels hmms           colorList = replicate (length hmms) white   -- |-drawHMMER3 :: String -> Int -> Double -> String -> (HM.HMMER3,Maybe S.StockholmAlignment, V.Vector (Int,V.Vector (Colour Double)), Colour Double) -> QDiagram Cairo V2 Double Any-drawHMMER3 modelDetail entriesNumberCutoff maxWidth emissiontype (model,aln,comparisonNodeLabels,modelColor)-   | modelDetail == "flat" = hcat $ V.toList (V.map drawHMMNodeFlat currentNodes)-   | modelDetail == "simple" = hcat $ V.toList (V.map drawHMMNodeSimple currentNodes)-   | modelDetail == "detailed" = applyAll ([bg white]) verboseNodesAlignment+drawHMMER3 :: String -> Int -> Double -> Double -> String -> (HM.HMMER3,Maybe S.StockholmAlignment, V.Vector (Int,V.Vector (Colour Double)), Colour Double) -> QDiagram Cairo V2 Double Any+drawHMMER3 modelDetail entriesNumberCutoff maxWidth scalef emissiontype (model,aln,comparisonNodeLabels,modelColor)+   | modelDetail == "flat" = (hcat $ V.toList (V.map drawHMMNodeFlat currentNodes)) # scale scalef +   | modelDetail == "simple" = (hcat $ V.toList (V.map drawHMMNodeSimple currentNodes)) # scale scalef+   | modelDetail == "detailed" = (applyAll ([bg white]) verboseNodesAlignment) # scale scalef    | otherwise = hcat $ V.toList (V.map drawHMMNodeSimple currentNodes)      where nodeNumber = fromIntegral $ length currentNodes            --nodes with begin node@@ -325,7 +325,7 @@ bar emission = (rect (4 * emission) 1 # lw 0 # fc black # translate (r2 (negate (2 - (4 * emission/2)),0)) <> rect 4 1 # lw 0.03 )  svgsize :: SizeSpec V2 Double-svgsize = mkSizeSpec2D Nothing Nothing+svgsize = mkSizeSpec2D (Just 2) (Just 2)  -- | Check for available cairo output formats diagramName :: String -> String -> Either String String