From 950be6e95b6093d1afcc6dd8a8b678db602c412c Mon Sep 17 00:00:00 2001 From: Florian Eggenhofer Date: Thu, 12 Sep 2019 22:35:27 +0200 Subject: [PATCH] Scan - Fixed empty genomes fasta in global search step --- .travis.yml | 10 +++++----- Biobase/RNAlien.hs | 2 +- Biobase/RNAlien/Library.hs | 9 +++++---- Biobase/RNAlien/Types.hs | 3 ++- Biobase/RNAlienScan.hs | 2 +- ChangeLog.md | 6 +++++- README.md | 4 ++-- RNAlien.cabal | 6 +++--- 8 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3a9e8c..ad25824 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,11 @@ before_script: script: - docker create --name develcontainer devel - mkdir RNAlien - - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.0/x/RNAlien/build/RNAlien/RNAlien RNAlien - - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.0/x/RNAlienStatistics/build/RNAlienStatistics/RNAlienStatistics RNAlien - - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.0/x/cmsearchToBed/build/cmsearchToBed/cmsearchToBed RNAlien - - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.0/x/RNAcentralHTTPRequest/build/RNAcentralHTTPRequest/RNAcentralHTTPRequest RNAlien - - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.0/x/RNAlienScan/build/RNAlienScan/RNAlienScan RNAlien + - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlien/build/RNAlien/RNAlien RNAlien + - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlienStatistics/build/RNAlienStatistics/RNAlienStatistics RNAlien + - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/cmsearchToBed/build/cmsearchToBed/cmsearchToBed RNAlien + - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAcentralHTTPRequest/build/RNAcentralHTTPRequest/RNAcentralHTTPRequest RNAlien + - docker cp develcontainer:/source/dist-newstyle/build/x86_64-linux/ghc-8.4.3/RNAlien-1.7.1/x/RNAlienScan/build/RNAlienScan/RNAlienScan RNAlien - cp LICENSE RNAlien - tar -cvzf RNAlien.tar.gz RNAlien diff --git a/Biobase/RNAlien.hs b/Biobase/RNAlien.hs index e85fb86..544552d 100644 --- a/Biobase/RNAlien.hs +++ b/Biobase/RNAlien.hs @@ -112,7 +112,7 @@ main = do let inputSequence = head reformatedFastaInput initialTaxId <- setInitialTaxId offlineMode threads inputBlastDatabase temporaryDirectoryPath inputTaxId inputSequence let checkedTaxonomyRestriction = checkTaxonomyRestriction taxonomyRestriction - let staticOptions = StaticOptions temporaryDirectoryPath sessionId (fromJust inputnSCICutoff) inputTaxId singleHitperTax inputQuerySelectionMethod inputQueryNumber lengthFilter coverageFilter blastSoftmasking threads inputBlastDatabase checkedTaxonomyRestriction (setVerbose verboseLevel) offlineMode + let staticOptions = StaticOptions temporaryDirectoryPath sessionId (fromJust inputnSCICutoff) inputTaxId singleHitperTax inputQuerySelectionMethod inputQueryNumber lengthFilter coverageFilter blastSoftmasking threads inputBlastDatabase checkedTaxonomyRestriction (setVerbose verboseLevel) offlineMode [] let initialization = ModelConstruction iterationNumber reformatedFastaInput [] initialTaxId Nothing (fromJust inputEvalueCutoff) False [] [] [] logMessage (show initialization) temporaryDirectoryPath modelConstructionResults <- modelConstructer staticOptions initialization diff --git a/Biobase/RNAlien/Library.hs b/Biobase/RNAlien/Library.hs index d6c8105..2bfc62c 100644 --- a/Biobase/RNAlien/Library.hs +++ b/Biobase/RNAlien/Library.hs @@ -2199,10 +2199,11 @@ scanModelConstructionResult staticOptions modelConstruction = do createDirectoryIfMissing False logFileDirectoryPath let expectThreshold = setBlastExpectThreshold modelConstruction let (upperTaxLimit,lowerTaxLimit) = (Just (0 :: Int), Nothing) - let currentGenomeFasta = genomeFastas modelConstruction - let genomeFastaPath = (iterationDirectory ++ "genome.fa") - writeFastaFile genomeFastaPath currentGenomeFasta - candidates1 <- catchAll (searchCandidates staticOptions Nothing currentIterationNumber upperTaxLimit lowerTaxLimit expectThreshold (Just genomeFastaPath) queries) + --let currentGenomeFasta = genomeFastas modelConstruction + -- Genome for global search is copied from input + let currentGenomeFastasPath = (iterationDirectory ++ "genome.fa") + copyFile (genomeFastasPath staticOptions) currentGenomeFastasPath + candidates1 <- catchAll (searchCandidates staticOptions Nothing currentIterationNumber upperTaxLimit lowerTaxLimit expectThreshold (Just currentGenomeFastasPath) queries) (\e -> do logWarning ("Warning: Search results iteration" ++ show currentIterationNumber ++ " - exception: " ++ show e) outputDirectory return (SearchResult [] Nothing)) let uniqueCandidates = filterDuplicates modelConstruction candidates1 diff --git a/Biobase/RNAlien/Types.hs b/Biobase/RNAlien/Types.hs index 604f568..d64e964 100644 --- a/Biobase/RNAlien/Types.hs +++ b/Biobase/RNAlien/Types.hs @@ -23,7 +23,8 @@ data StaticOptions = StaticOptions blastDatabase :: Maybe String, taxRestriction :: Maybe String, verbositySwitch :: Bool, - offline :: Bool + offline :: Bool, + genomeFastasPath :: String } deriving (Show) -- | Keeps track of model construction diff --git a/Biobase/RNAlienScan.hs b/Biobase/RNAlienScan.hs index 207463c..99299d0 100644 --- a/Biobase/RNAlienScan.hs +++ b/Biobase/RNAlienScan.hs @@ -106,7 +106,7 @@ main = do when (null inputGenomesFasta) (error "Please provide input genomes with the cmd line parameter -s") logToolVersions inputQuerySelectionMethod temporaryDirectoryPath let reformatedFastaInput = map reformatFasta fastaInput - let staticOptions = StaticOptions temporaryDirectoryPath sessionId (fromJust inputnSCICutoff) Nothing singleHitperTax inputQuerySelectionMethod inputQueryNumber lengthFilter coverageFilter blastSoftmasking threads Nothing Nothing (setVerbose verboseLevel) True + let staticOptions = StaticOptions temporaryDirectoryPath sessionId (fromJust inputnSCICutoff) Nothing singleHitperTax inputQuerySelectionMethod inputQueryNumber lengthFilter coverageFilter blastSoftmasking threads Nothing Nothing (setVerbose verboseLevel) True inputGenomesFastaFilePath let initialization = ModelConstruction iterationNumber reformatedFastaInput [] Nothing Nothing (fromJust inputEvalueCutoff) False [] [] inputGenomesFasta logMessage (show initialization) temporaryDirectoryPath modelConstructionResults <- scanModelConstructer staticOptions initialization diff --git a/ChangeLog.md b/ChangeLog.md index cefc961..e1c404b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,10 @@ -*-change-log-*- -### 1.7.0 [Florian Eggenhofer](mailto:egg@cs.uni-freiburg.de) tbd +### 1.7.1 [Florian Eggenhofer](mailto:egg@cs.uni-freiburg.de) 12. September 2019 + + * Fixed Scan tool global search step + +### 1.7.0 [Florian Eggenhofer](mailto:egg@cs.uni-freiburg.de) 29. August 2019 * Added Scan tool * Changed tracing high similarity candidates diff --git a/README.md b/README.md index 091b31a..ab52c54 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ TaxonomyTools which can be used to visualise the organisms included in a RNAlien RNAlien is available with all dependencies via [biocontainer](https://quay.io/repository/biocontainers/rnalien). Install [docker](https://www.docker.com/get-docker) - docker pull quay.io/biocontainers/rnalien:1.7.0--pl5.22.0_0 - docker run -i -t quay.io/biocontainers/rnalien:1.7.0--pl5.22.0_0 bash + docker pull quay.io/biocontainers/rnalien:1.7.1--pl5.22.0_0 + docker run -i -t quay.io/biocontainers/rnalien:1.7.1--pl5.22.0_0 bash ### Installation via cabal-install diff --git a/RNAlien.cabal b/RNAlien.cabal index dff8fa2..5c2d40f 100644 --- a/RNAlien.cabal +++ b/RNAlien.cabal @@ -1,5 +1,5 @@ name: RNAlien -version: 1.7.0 +version: 1.7.1 synopsis: Unsupervized construction of RNA family models description: RNAlien is a tool for automatic construction of RNAfamily models from a single sequence. . @@ -51,8 +51,8 @@ source-repository head source-repository this type: git - location: https://github.com/eggzilla/RNAlien/tree/1.7.0 - tag: 1.7.0 + location: https://github.com/eggzilla/RNAlien/tree/1.7.1 + tag: 1.7.1 executable RNAlien Hs-Source-Dirs: ./Biobase/