StockholmAlignment 1.1.1 → 1.1.2
raw patch · 3 files changed
+12/−7 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- StockholmAlignment.cabal +4/−4
- changelog +2/−0
- src/Bio/StockholmDraw.hs +6/−3
StockholmAlignment.cabal view
@@ -1,5 +1,5 @@ name: StockholmAlignment-version: 1.1.1+version: 1.1.2 synopsis: Libary for Stockholm aligmnent format description: Libary containing parsing and visualisation functions and datastructures for Stockholm aligmnent format license: GPL-3@@ -10,7 +10,7 @@ category: Bioinformatics build-type: Simple cabal-version: >=1.8-Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1+Tested-With: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.2 extra-source-files: README.md changelog@@ -21,8 +21,8 @@ source-repository this type: git- location: https://github.com/eggzilla/StockholmAlignment/tree/1.1.1- tag: 1.1.1+ location: https://github.com/eggzilla/StockholmAlignment/tree/1.1.2+ tag: 1.1.2 library -- Modules exported by the library.
changelog view
@@ -1,4 +1,6 @@ -*-change-log-*-+1.1.2 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 14. January 2018+ * Improved index label placement 1.1.1 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 7. May 2017 * Fixed use of vector index instead of column number for col index and label placing 1.1.0 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 7. May 2017
src/Bio/StockholmDraw.hs view
@@ -53,7 +53,7 @@ completeBPStructure = V.update (V.fromList regularStructure1) (V.fromList incompleteIndicesCharacterPairs) -- remove gap character postitions from structure string gapfreeCompleteStructure = V.filter (\(i,_) -> notElem i sequencegaps) (V.indexed completeBPStructure)- entryStructure = map snd (V.toList gapfreeCompleteStructure)+ entryStructure = map snd (V.toList gapfreeCompleteStructure) extractGapfreeIndexedStructure :: String -> String -> [(Int,Char)]@@ -138,11 +138,11 @@ --indexPositions = maximum (map length indices) maxEntryIndex = 1 + maximum indices maxEntryText = show maxEntryIndex- totalBoxYlength = fromIntegral (length maxEntryText) * 2.5+ totalBoxYlength = fromIntegral (length maxEntryText) * 2.5 indexLine = hcat (map setAlignmentLetter spacer) ||| hcat (map (drawStockholmIndexLineCol comparisonColLabels totalBoxYlength) indices) drawStockholmIndexLineCol :: V.Vector (Int, V.Vector (Colour Double)) -> Double -> Int -> QDiagram Cairo V2 Double Any-drawStockholmIndexLineCol comparisonColLabels totalBoxYlength entryIndex = vcat (map setAlignmentLetter entryText) <> colourBoxes # translate (r2 (0, negate ((singleBoxYLength/2)-1.25)))+drawStockholmIndexLineCol comparisonColLabels totalBoxYlength entryIndex = indexTextBox # translate (r2 (0, (1.25 * ((fromIntegral letterNumber))))) <> colourBoxes # translate (r2 (0, negate ((singleBoxYLength/2) - (totalBoxYlength/ 2)))) where columnNumber = fst comparisonColLabel -- comparisonColLabel with index zero holds label for first col comparisonColLabel = comparisonColLabels V.! (entryIndex + 1)@@ -152,6 +152,9 @@ singleBoxYLength = totalBoxYlength / boxNumber entryText = show columnNumber colourBoxes = vcat (V.toList (V.map (colorBox singleBoxYLength) colColours))+ letterNumber = Data.List.length entryText+ textYSpacer = rect 2 (totalBoxYlength - 2.5 * ((fromIntegral letterNumber))) # lw 0.0 + indexTextBox = textYSpacer === vcat (map setAlignmentLetter entryText) colorBox :: Double -> Colour Double -> QDiagram Cairo V2 Double Any colorBox singleBoxYLength colColour = rect 2 singleBoxYLength # fc colColour # lw 0.1