packages feed

SelectSequencesFromMSA 1.0.4 → 1.0.5

raw patch · 3 files changed

+16/−15 lines, 3 filesdep ~ClustalParserPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: ClustalParser

API changes (from Hackage documentation)

- Bio.SelectSequencesLibrary: preprocessClustalForRNAcodeExternal :: String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String, String))
+ Bio.SelectSequencesLibrary: preprocessClustalForRNAcodeExternal :: String -> String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String, String))
- Bio.SelectSequencesLibrary: preprocessClustalForRNAz :: String -> String -> Int -> Double -> Double -> Bool -> String -> IO (Either String (String, String))
+ Bio.SelectSequencesLibrary: preprocessClustalForRNAz :: String -> String -> String -> Int -> Double -> Double -> Bool -> String -> IO (Either String (String, String))
- Bio.SelectSequencesLibrary: preprocessClustalForRNAzExternal :: String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String, String))
+ Bio.SelectSequencesLibrary: preprocessClustalForRNAzExternal :: String -> String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String, String))

Files

SelectSequencesFromMSA.cabal view
@@ -1,5 +1,5 @@ name:                SelectSequencesFromMSA-version:             1.0.4+version:             1.0.5 synopsis:            Selects a representative subset of sequences from multiple sequence alignment. description:         SelectSequences is a tool for selection of a representative subset of sequences from a multiple sequence alignment in clustal format.                      .@@ -26,8 +26,8 @@  source-repository this   type:     git-  location: https://github.com/eggzilla/SelectSequencesFromMSA/tree/1.0.4-  tag:      1.0.4+  location: https://github.com/eggzilla/SelectSequencesFromMSA/tree/1.0.5+  tag:      1.0.5                       executable SelectSequencesFromMSA   Hs-Source-Dirs:      ./src/Bio/@@ -38,5 +38,5 @@ Library   Hs-Source-Dirs:      ./src/   ghc-options:         -Wall -fno-warn-unused-do-bind-  build-depends:       base >=4.5 && <5, cmdargs, ViennaRNAParser>=1.3.2, process, directory, biofasta, parsec, biocore, bytestring, either-unwrap, containers, ClustalParser>=1.2.2, vector, matrix, filepath, text, transformers, text-metrics+  build-depends:       base >=4.5 && <5, cmdargs, ViennaRNAParser>=1.3.2, process, directory, biofasta, parsec, biocore, bytestring, either-unwrap, containers, ClustalParser>=1.2.3, vector, matrix, filepath, text, transformers, text-metrics   Exposed-Modules:     Bio.SelectSequencesLibrary
src/Bio/SelectSequences.hs view
@@ -13,6 +13,7 @@ data Options = Options   { inputClustalPath :: String,     outputPath :: String,+    outputFileName :: String,     toogleExternalSelectSequences :: Bool,     seqenceNumber :: Int,     optimalIdentity :: Double,@@ -26,6 +27,7 @@ options = Options   { inputClustalPath = def &= name "c" &= help "Path to input clustal file",     outputPath = def &= name "o" &= help "Path to output directory. Default: current working directory",+    outputFileName = "results.selected" &= name "f" &= help "Output filename. Default: results.selected",     toogleExternalSelectSequences = False &= name "e" &= help "Use only replacement of alignment characters and external 'selectSequence.pl'. Default: False",     seqenceNumber = (6 :: Int) &= name "n" &= help "Number of sequences in the output alignment. (Default: 6)",     optimalIdentity = (80 :: Double) &= name "i" &= help "Optimize for this percentage of mean pairwise identity (Default: 80)",@@ -42,7 +44,7 @@   let selectedOutputPath = if null outputPath then currentWorkDirectory else outputPath   if toogleExternalSelectSequences     then do-      resultStatus <- preprocessClustalForRNAzExternal inputClustalPath (selectedOutputPath ++ "/") seqenceNumber (truncate optimalIdentity) (truncate maximalIdenity) referenceSequence+      resultStatus <- preprocessClustalForRNAzExternal inputClustalPath (selectedOutputPath ++ "/") outputFileName seqenceNumber (truncate optimalIdentity) (truncate maximalIdenity) referenceSequence       if isRight resultStatus         then do           let (idMatrix,_) = fromRight resultStatus@@ -50,7 +52,7 @@           Control.Monad.unless (null distanceMatrixPath) (writeFile distanceMatrixPath idMatrix)         else print ("A problem occured selecting sequences: " ++ fromLeft resultStatus)     else do-      resultStatus <- preprocessClustalForRNAz inputClustalPath (selectedOutputPath ++ "/") seqenceNumber optimalIdentity maximalIdenity referenceSequence reformatIdOption+      resultStatus <- preprocessClustalForRNAz inputClustalPath (selectedOutputPath ++ "/") outputFileName seqenceNumber optimalIdentity maximalIdenity referenceSequence reformatIdOption       if isRight resultStatus         then do           return ()
src/Bio/SelectSequencesLibrary.hs view
@@ -28,8 +28,8 @@          identityPercent = 1 - (fromIntegral distanceDouble/fromIntegral maximumDistance)  -- | Call for external preprocessClustalForRNAz-preprocessClustalForRNAzExternal :: String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String,String))-preprocessClustalForRNAzExternal clustalFilepath outputPath seqenceNumber optimalIdentity maximalIdenity referenceSequence = do+preprocessClustalForRNAzExternal :: String -> String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String,String))+preprocessClustalForRNAzExternal clustalFilepath outputPath outputFileName seqenceNumber optimalIdentity maximalIdenity referenceSequence = do   clustalText <- TI.readFile clustalFilepath   let reformatedClustalPath = outputPath ++ "result.reformated"   --change clustal format for rnazSelectSeqs.pl@@ -48,8 +48,8 @@   return (Right ([],selectedClustalText))  -- | Call for external preprocessClustalForRNAcode - RNAcode additionally to RNAz requirements does not accept pipe,underscore, doublepoint symbols-preprocessClustalForRNAcodeExternal :: String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String,String))-preprocessClustalForRNAcodeExternal clustalFilepath outputPath seqenceNumber optimalIdentity maximalIdenity referenceSequence = do+preprocessClustalForRNAcodeExternal :: String -> String -> String -> Int -> Int -> Int -> Bool -> IO (Either String (String,String))+preprocessClustalForRNAcodeExternal clustalFilepath outputPath outputFileName seqenceNumber optimalIdentity maximalIdenity referenceSequence = do   clustalText <- TI.readFile clustalFilepath   let reformatedClustalPath = outputPath ++ "result.reformated"   --change clustal format for rnazSelectSeqs.pl@@ -59,7 +59,7 @@   let reformatedClustalText = T.map reformatRNACodeAln headerlessClustalTextLines   TI.writeFile reformatedClustalPath (headerClustalTextLines `T.append` T.singleton '\n' `T.append` reformatedClustalText)   --select representative entries from result.Clustal with select_sequences-  let selectedClustalpath = outputPath ++ "result.selected"+  let selectedClustalpath = outputPath ++ outputFileName   let sequenceNumberOption = " -n "  ++ show seqenceNumber  ++ " "   let optimalIdentityOption = " -i "  ++ show optimalIdentity  ++ " "   let maximalIdentityOption = " --max-id="  ++ show maximalIdenity  ++ " "@@ -70,13 +70,12 @@   selectedClustalText <- readFile selectedClustalpath   return (Right ([],selectedClustalText)) -preprocessClustalForRNAz :: String -> String -> Int -> Double -> Double -> Bool -> String -> IO (Either String (String,String))-preprocessClustalForRNAz clustalFilepath outputPath seqenceNumber optimalIdentity maximalIdenity referenceSequence reformatOption = do+preprocessClustalForRNAz :: String -> String -> String -> Int -> Double -> Double -> Bool -> String -> IO (Either String (String,String))+preprocessClustalForRNAz clustalFilepath outputPath outputFileName seqenceNumber optimalIdentity maximalIdenity referenceSequence reformatOption = do   clustalText <- TI.readFile clustalFilepath   let clustalTextLines = T.lines clustalText   parsedClustalInput <- readClustalAlignment clustalFilepath-  print parsedClustalInput-  let selectedClustalpath = outputPath ++ "result.selected"+  let selectedClustalpath = outputPath ++ outputFileName   if length clustalTextLines > 5     then       if isRight parsedClustalInput