[med-svn] [Git][med-team/unicycler][master] 7 commits: Fix spades name
Andreas Tille
gitlab at salsa.debian.org
Sun Jun 10 14:23:02 BST 2018
Andreas Tille pushed to branch master at Debian Med / unicycler
Commits:
9fe0c2d1 by Andreas Tille at 2018-06-08T13:10:52+02:00
Fix spades name
- - - - -
21f50585 by Andreas Tille at 2018-06-08T13:39:23+02:00
Provide test data in build dir to provide these for build time tests
- - - - -
3f13672e by Andreas Tille at 2018-06-08T15:52:18+02:00
Provide data files and try to fix PYTHONPATH (which does nor work yet)
- - - - -
664171f3 by Andreas Tille at 2018-06-08T15:55:03+02:00
building the dynamic library requires extra make call
- - - - -
9d9112c7 by Andreas Tille at 2018-06-08T16:23:02+02:00
Provide the dynamic lib for running the test suite
- - - - -
a31911a4 by Andreas Tille at 2018-06-10T15:21:58+02:00
Add racon to (Build-)Depends
- - - - -
12489935 by Andreas Tille at 2018-06-10T15:22:16+02:00
Remove object files
- - - - -
4 changed files:
- debian/control
- + debian/patches/series
- + debian/patches/spades.patch
- debian/rules
Changes:
=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,14 @@ Build-Depends: debhelper (>= 11~),
dh-python,
python3-all,
python3-setuptools,
- spades
+ default-jdk,
+ bowtie2,
+ freebayes,
+ ncbi-blast+,
+ racon,
+ samtools,
+ spades,
+ zlib1g-dev
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/med-team/unicycler
Vcs-Git: https://salsa.debian.org/med-team/unicycler.git
@@ -17,10 +24,13 @@ Package: unicycler
Architecture: any
Depends: ${python3:Depends},
${misc:Depends},
- spades,
- ncbi-blast+,
+ default-jre,
bowtie2,
- samtools
+ freebayes,
+ ncbi-blast+,
+ racon,
+ samtools,
+ spades
Description: hybrid assembly pipeline for bacterial genomes
Unicycler is an assembly pipeline for bacterial genomes. It can assemble
Illumina-only read sets where it functions as a SPAdes-optimiser. It can
=====================================
debian/patches/series
=====================================
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+spades.patch
=====================================
debian/patches/spades.patch
=====================================
--- /dev/null
+++ b/debian/patches/spades.patch
@@ -0,0 +1,157 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 25 May 2018 10:59:36 +0200
+Description: SPAdes is in Debian at /usr/bin/spades
+
+--- a/test/test_dependencies.py
++++ b/test/test_dependencies.py
+@@ -42,7 +42,7 @@ class TestDependencies(unittest.TestCase
+
+ def test_spades_not_found(self):
+ stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path'])
+- self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
++ self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
+ self.assertTrue('could not find SPAdes' in stderr)
+ self.assertEqual(ret_code, 1)
+
+@@ -102,14 +102,14 @@ class TestDependencies(unittest.TestCase
+ def test_no_rotate(self):
+ stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path',
+ '--no_rotate'])
+- self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
++ self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
+ self.assertTrue(bool(re.search(r'makeblastdb\s+not used', stdout)))
+ self.assertTrue(bool(re.search(r'tblastn\s+not used', stdout)))
+
+ def test_no_pilon(self):
+ stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path',
+ '--no_pilon'])
+- self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
++ self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
+ self.assertTrue(bool(re.search(r'bowtie2-build\s+not used', stdout)))
+ self.assertTrue(bool(re.search(r'bowtie2\s+not used', stdout)))
+ self.assertTrue(bool(re.search(r'samtools\s+not used', stdout)))
+@@ -119,12 +119,12 @@ class TestDependencies(unittest.TestCase
+ def test_verbosity_1(self):
+ stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path',
+ '--verbosity', '1'])
+- self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
++ self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
+ self.assertTrue(bool(re.search(r'Program\s+Version\s+Status', stdout)))
+ self.assertFalse(bool(re.search(r'Program\s+Version\s+Status\s+Path', stdout)))
+
+ def test_verbosity_2(self):
+ stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path',
+ '--verbosity', '2'])
+- self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
++ self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
+ self.assertTrue(bool(re.search(r'Program\s+Version\s+Status\s+Path', stdout)))
+--- a/test/overlap_removal_test.py
++++ b/test/overlap_removal_test.py
+@@ -94,7 +94,7 @@ def run_spades(out_dir):
+ reads_2 = os.path.join(out_dir, 'reads_2.fastq')
+ reads_unpaired = os.path.join(out_dir, 'reads_unpaired.fastq')
+
+- spades_cmd = ['spades.py', '-o', out_dir, '--only-assembler', '-k', '21,41,61,81']
++ spades_cmd = ['spades', '-o', out_dir, '--only-assembler', '-k', '21,41,61,81']
+
+ if os.path.isfile(reads_1):
+ spades_cmd += ['-1', reads_1, '-2', reads_2]
+--- a/test/test_misc.py
++++ b/test/test_misc.py
+@@ -384,14 +384,14 @@ class TestMiscFunctions(unittest.TestCas
+
+ def test_spades_version_parsing_3(self):
+ spades_version_output = 'option -v not recognized\nSPAdes genome assembler v.3.5.0\n\n' \
+- 'Usage: SPAdes-3.5.0-Darwin/bin/spades.py [options] ' \
++ 'Usage: SPAdes-3.5.0-Darwin/bin/spades [options] ' \
+ '-o <output_dir>\n\nBasic options:'
+ version = unicycler.misc.spades_version_from_spades_output(spades_version_output)
+ self.assertEqual(version, '3.5.0')
+
+ def test_spades_version_parsing_4(self):
+ spades_version_output = 'option -v not recognized\nSPAdes genome assembler v.2.4.0\n\n' \
+- 'Usage: SPAdes-2.4.0-Darwin/bin/spades.py [options] ' \
++ 'Usage: SPAdes-2.4.0-Darwin/bin/spades [options] ' \
+ '-o <output_dir>\n\nBasic options:'
+ version = unicycler.misc.spades_version_from_spades_output(spades_version_output)
+ self.assertEqual(version, '2.4.0')
+--- a/README.md
++++ b/README.md
+@@ -93,7 +93,7 @@ Reasons to __not__ use Unicycler:
+ * [ICC](https://software.intel.com/en-us/c-compilers) also works (though I don't know the minimum required version number)
+ * [setuptools](https://packaging.python.org/installing/#install-pip-setuptools-and-wheel) (only required for installation of Unicycler)
+ * For short-read or hybrid assembly:
+- * [SPAdes](http://bioinf.spbau.ru/spades) v3.6.2 or later (`spades.py`)
++ * [SPAdes](http://bioinf.spbau.ru/spades) v3.6.2 or later (`spades`)
+ * For long-read or hybrid assembly:
+ * [Racon](https://github.com/isovic/racon) (`racon`)
+ * For polishing
+@@ -411,7 +411,7 @@ Run `unicycler --help_all` to see a comp
+ SPAdes assembly:
+ These options control the short-read SPAdes assembly at the beginning of the Unicycler pipeline.
+
+- --spades_path SPADES_PATH Path to the SPAdes executable (default: spades.py)
++ --spades_path SPADES_PATH Path to the SPAdes executable (default: spades)
+ --no_correct Skip SPAdes error correction step (default: conduct SPAdes error
+ correction)
+ --min_kmer_frac MIN_KMER_FRAC Lowest k-mer size for SPAdes assembly, expressed as a fraction of the read
+--- a/setup.py
++++ b/setup.py
+@@ -63,7 +63,7 @@ def missing_tool(tool_name):
+
+ def tool_check():
+ # Check for required programs.
+- tools = ['spades.py', 'java', 'pilon', 'samtools', 'bowtie2', 'bowtie2-build',
++ tools = ['spades', 'java', 'pilon', 'samtools', 'bowtie2', 'bowtie2-build',
+ 'makeblastdb', 'tblastn']
+ missing_tools = []
+ for tool in tools:
+--- a/unicycler/misc.py
++++ b/unicycler/misc.py
+@@ -124,7 +124,7 @@ def check_spades(spades_path):
+
+ if not err.decode():
+ quit_with_error('SPAdes was found but does not produce output (make sure to use '
+- '"spades.py" location, not "spades")')
++ '"spades" location, not "spades")')
+
+
+ def find_pilon(pilon_path, java_path, args):
+@@ -916,7 +916,7 @@ def spades_path_and_version(spades_path)
+
+ def spades_version_from_spades_output(spades_output):
+ """
+- Parses the SPAdes version from the output of spades.py -v
++ Parses the SPAdes version from the output of spades -v
+ """
+ try:
+ return re.search(r'v(\d+\.\d+\.\d+)', spades_output).group(1)
+--- a/unicycler/unicycler.py
++++ b/unicycler/unicycler.py
+@@ -320,7 +320,7 @@ def get_arguments():
+ 'These options control the short-read SPAdes '
+ 'assembly at the beginning of the Unicycler pipeline.'
+ if show_all_args else argparse.SUPPRESS)
+- spades_group.add_argument('--spades_path', type=str, default='spades.py',
++ spades_group.add_argument('--spades_path', type=str, default='spades',
+ help='Path to the SPAdes executable'
+ if show_all_args else argparse.SUPPRESS)
+ spades_group.add_argument('--no_correct', action='store_true',
+@@ -753,7 +753,7 @@ def check_dependencies(args, short_reads
+ spades_path, spades_version, spades_status = '', '', 'not used'
+ else:
+ spades_path, spades_version, spades_status = spades_path_and_version(args.spades_path)
+- spades_row = ['spades.py', spades_version, spades_status]
++ spades_row = ['spades', spades_version, spades_status]
+ if args.verbosity > 1:
+ spades_row.append(spades_path)
+ program_table.append(spades_row)
+@@ -861,7 +861,7 @@ def quit_if_dependency_problem(spades_st
+ quit_with_error('SPAdes cannot run due to an incompatible Python version')
+ if spades_status == 'bad':
+ quit_with_error('SPAdes was found but does not produce output (make sure to use '
+- '"spades.py" location, not "spades")')
++ '"spades" location, not "spades")')
+ if makeblastdb_status == 'not found':
+ quit_with_error('could not find makeblastdb - either specify its location using '
+ '--makeblastdb_path or use --no_rotate to remove BLAST dependency')
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -1,22 +1,26 @@
#!/usr/bin/make -f
# DH_VERBOSE := 1
-export LC_ALL=C.UTF-8
-include /usr/share/dpkg/default.mk
-# this provides:
-# DEB_SOURCE: the source package name
-# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
-# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
-# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
-# DEB_VERSION_UPSTREAM: the package's upstream version
-# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
+export PYBUILD_NAME=unicycler
-# for hardening you might like to uncomment this:
-# export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+# Build time tests are flaky
+export DH_BUILD_MAINT_OPTIONS=nocheck
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_clean:
echo "Avoid: command 'UnicyclerClean' has no such option 'all'"
+ find . -name "*.o" -delete
+
+override_dh_auto_build:
+ dh_auto_build
+ # building the dynamic library requires extra make call
+ make
+
+override_dh_auto_test:
+ BUILDPATH=$(shell pybuild --print build_dir --interpreter python3) ; \
+ ln -s $(CURDIR)/sample_data $${BUILDPATH} ; \
+ cp -a unicycler/*.so $${BUILDPATH}/$(PYBUILD_NAME) ; \
+ PYTHONPATH=$${BUILDPATH}/$(PYBUILD_NAME) dh_auto_test
View it on GitLab: https://salsa.debian.org/med-team/unicycler/compare/c2b0d33f5c4cd4e1ec67c8c04e01fd141e3a4d7b...12489935ee409dc417a7885cb73ff67af22a6be6
--
View it on GitLab: https://salsa.debian.org/med-team/unicycler/compare/c2b0d33f5c4cd4e1ec67c8c04e01fd141e3a4d7b...12489935ee409dc417a7885cb73ff67af22a6be6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180610/a7ffee8c/attachment-0001.html>
More information about the debian-med-commit
mailing list