This is an automated email from the git hooks/post-receive script. satta pushed a commit to branch master in repository iva.
commit 1299970d689c88524024cb3d5010be7fb683c833 Author: Sascha Steinbiss <[email protected]> Date: Fri Jan 26 11:43:36 2018 +0100 New upstream version 1.0.9+ds --- .travis.yml | 9 +++ AUTHORS | 4 +- LICENSE | 4 ++ install_dependencies.sh | 2 +- iva/external_progs.py | 2 +- iva/tests/external_progs_test.py | 142 +++++++++++++++++++++++++++++++++++++-- setup.py | 2 +- 7 files changed, 155 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index aefa37f..f0e6ea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,15 @@ cache: - "$HOME/.cache/pip" python: - "3.4" + - "3.5" + - "3.6" +env: + - SAMTOOLS_VERSION=1.3 + - SAMTOOLS_VERSION=1.3.1 + - SAMTOOLS_VERSION=1.4 + - SAMTOOLS_VERSION=1.4.1 + - SAMTOOLS_VERSION=1.5 + - SAMTOOLS_VERSION=1.6 sudo: false install: - "source ./install_dependencies.sh" diff --git a/AUTHORS b/AUTHORS index 711ae85..e17462d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,3 @@ -Martin Hunt ([email protected]) +Martin Hunt ([email protected]) +Andrew J. Page ([email protected]) +Sascha Steinbiss ([email protected]) \ No newline at end of file diff --git a/LICENSE b/LICENSE index 70566f2..70b4768 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,7 @@ +Copyright (c) 2014 - 2017 by Genome Research Ltd. + +This is free software, licensed under: + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 diff --git a/install_dependencies.sh b/install_dependencies.sh index b306373..a6bd04f 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -6,7 +6,7 @@ start_dir=$(pwd) KMC_VERSION=2.3.0 MUMMER_VERSION=3.23 -SAMTOOLS_VERSION=1.3 +SAMTOOLS_VERSION=${SAMTOOLS_VERSION:-"1.3"} SMALT_VERSION=0.7.6 KMC_DOWNLOAD_URL=http://sun.aei.polsl.pl/REFRESH/kmc/downloads/${KMC_VERSION}/linux/kmc diff --git a/iva/external_progs.py b/iva/external_progs.py index a63d84b..4f17fce 100644 --- a/iva/external_progs.py +++ b/iva/external_progs.py @@ -37,7 +37,7 @@ prog_to_version_cmd = { 'nucmer': ('nucmer --version', re.compile('^NUCmer \(NUCleotide MUMmer\) version (.*)$')), 'R': ('R --version', re.compile('^R version (.*) \(.*\) --')), 'smalt': ('smalt version', re.compile('^Version: (.*)$')), - 'samtools': ('samtools', re.compile('^Version: ([^ ]+)')), + 'samtools': ('samtools', re.compile('(\d+\.\d+[\.\d]*)')), } diff --git a/iva/tests/external_progs_test.py b/iva/tests/external_progs_test.py index 8795f33..7a1cbbe 100644 --- a/iva/tests/external_progs_test.py +++ b/iva/tests/external_progs_test.py @@ -19,28 +19,158 @@ class TestExternalProgs(unittest.TestCase): def test_kmc_in_path(self): '''Test kmc in path''' self.assertTrue(external_progs.is_in_path('kmc'), 'Error! Did not find kmc in your path! Please install kmc') - + def test_kmc_dump_in_path(self): '''Test kmc_dump in path''' self.assertTrue(external_progs.is_in_path('kmc_dump'), 'Error! Did not find kmc_dump in your path! Please install kmc') - + def test_nucmer_in_path(self): '''Test nucmer in path''' self.assertTrue(external_progs.is_in_path('nucmer'), 'Error! Did not find nucmer in your path! Please install MUMmer') - + def test_delta_filter_in_path(self): '''Test delta-filter in path''' self.assertTrue(external_progs.is_in_path('delta-filter'), 'Error! Did not find delta-filter in your path! Please install MUMmer') - + def test_show_coords_in_path(self): '''Test show-coords in path''' self.assertTrue(external_progs.is_in_path('show-coords'), 'Error! Did not find show-coords in your path! Please install MUMmer') - + def test_samtools_in_path(self): '''Test samtools in path''' self.assertTrue(external_progs.is_in_path('samtools'), 'Error! Did not find samtools in your path! Please install samtools') - + def test_smalt_in_path(self): '''Test smalt in path''' self.assertTrue(external_progs.is_in_path('smalt'), 'Error! Did not find smalt in your path! Please install smalt') + + def test_r_version(self): + '''Test R versions''' + self.assertEqual('3.4.0', self.check_regex_version_extraction('R', """ +R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" +Copyright (C) 2017 The R Foundation for Statistical Computing +Platform: x86_64-pc-linux-gnu (64-bit) + """ )) + + self.assertEqual('3.3.2', self.check_regex_version_extraction('R', """ +R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" +Copyright (C) 2016 The R Foundation for Statistical Computing +Platform: x86_64-apple-darwin13.4.0 (64-bit) + """ )) + + self.assertEqual('3.2.2', self.check_regex_version_extraction('R', """ +R version 3.2.2 (2015-08-14) -- "Fire Safety" +Copyright (C) 2015 The R Foundation for Statistical Computing +Platform: x86_64-pc-linux-gnu (64-bit) + """ )) + + self.assertEqual('3.1.2', self.check_regex_version_extraction('R', """ +R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" +Copyright (C) 2014 The R Foundation for Statistical Computing +Platform: x86_64-unknown-linux-gnu (64-bit) + """ )) + + self.assertEqual('3.0.0', self.check_regex_version_extraction('R', """ +R version 3.0.0 (2013-04-03) -- "Masked Marvel" +Copyright (C) 2013 The R Foundation for Statistical Computing +Platform: x86_64-unknown-linux-gnu (64-bit) + """ )) + + self.assertEqual('2.15.2', self.check_regex_version_extraction('R', """ +R version 2.15.2 (2012-10-26) -- "Trick or Treat" +Copyright (C) 2012 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 +Platform: x86_64-unknown-linux-gnu (64-bit) + """ )) + + + def test_blastn_version(self): + '''Test blastn version''' + self.assertEqual('2.7.0+', self.check_regex_version_extraction('blastn', """ +blastn: 2.7.0+ + Package: blast 2.7.0, build Sep 12 2017 15:51:33 + """ )) + self.assertEqual('2.6.0+', self.check_regex_version_extraction('blastn', """ +blastn: 2.6.0+ + Package: blast 2.6.0, build Aug 23 2017 22:18:50 + """ )) + self.assertEqual('2.2.31+', self.check_regex_version_extraction('blastn', """ +blastn: 2.2.31+ +Package: blast 2.2.31, build Jul 6 2015 15:14:27 + """ )) + + def test_makeblastdb_version(self): + '''Test makeblastdb version''' + self.assertEqual('2.7.0+', self.check_regex_version_extraction('makeblastdb', """ +makeblastdb: 2.7.0+ + Package: blast 2.7.0, build Sep 12 2017 15:51:33 + """ )) + self.assertEqual('2.6.0+', self.check_regex_version_extraction('makeblastdb', """ +makeblastdb: 2.6.0+ + Package: blast 2.6.0, build Aug 23 2017 22:18:50 + """ )) + self.assertEqual('2.2.31+', self.check_regex_version_extraction('makeblastdb', """ +makeblastdb: 2.2.31+ +Package: blast 2.2.31, build Jul 6 2015 15:14:27 + """ )) + + def test_kmc_version(self): + '''Test kmc version''' + self.assertTrue(external_progs.get_version('kmc',must_be_in_path=True)) + self.assertEqual('2.3.0', self.check_regex_version_extraction('kmc', """ +K-Mer Counter (KMC) ver. 2.3.0 (2015-08-21) + """ )) + self.assertEqual('3.0.0', self.check_regex_version_extraction('kmc', """ +K-Mer Counter (KMC) ver. 3.0.0 (2017-01-28) + """ )) + + def test_kmc_dump_version(self): + '''Test kmc_dump version''' + self.assertTrue(external_progs.get_version('kmc_dump',must_be_in_path=True)) + self.assertEqual('3.0.0', self.check_regex_version_extraction('kmc_dump', """ +KMC dump ver. 3.0.0 (2017-01-28) + """ )) + self.assertEqual('2.3.0', self.check_regex_version_extraction('kmc_dump', """ +KMC dump ver. 2.3.0 (2015-08-21) + """ )) + + def test_nucmer_version(self): + '''Test nucmer version''' + self.assertTrue(external_progs.get_version('nucmer',must_be_in_path=True)) + self.assertEqual('3.1', self.check_regex_version_extraction('nucmer', """ +nucmer +NUCmer (NUCleotide MUMmer) version 3.1 + """ )) + + def test_samtools_version(self): + '''Test samtools version''' + self.assertTrue(external_progs.get_version('samtools', must_be_in_path=True)) + self.assertEqual('1.6', self.check_regex_version_extraction('samtools', """ +samtools 1.6 +Using htslib 1.6 +Copyright (C) 2017 Genome Research Ltd.""" )) + + def test_samtools_original_version(self): + '''Test samtools original version''' + self.assertEqual('0.1.19', self.check_regex_version_extraction('samtools', """ +Program: samtools (Tools for alignments in the SAM format) +Version: 0.1.19-44428cd +Usage: samtools <command> [options]""" )) + + def test_smalt_version(self): + '''Test smalt version''' + self.assertTrue(external_progs.get_version('smalt',must_be_in_path=True)) + self.assertEqual('0.7.6', self.check_regex_version_extraction('smalt', """ + SMALT - Sequence Mapping and Alignment Tool +Version: 0.7.6 +Date: 21-03-2014""" )) + + def check_regex_version_extraction(self, prog, raw_version_output ): + cmd, regex = external_progs.prog_to_version_cmd[prog] + raw_output_lines = raw_version_output.splitlines() + for line in raw_output_lines: + hits = regex.search(line) + if hits: + return str(hits.group(1)) + return None diff --git a/setup.py b/setup.py index 5269000..31499ae 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ if not found_all_progs: setup( name='iva', - version='1.0.8', + version='1.0.9', description='Iterative Virus Assembler', packages = find_packages(), package_data={'iva': ['gage/*', 'ratt/*', 'read_trim/*', 'test_run_data/*']}, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/iva.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
