From 3567b6cf69eebca5bf138416dd33da2483ed830f Mon Sep 17 00:00:00 2001 From: martinghunt Date: Mon, 2 Feb 2015 16:19:04 +0000 Subject: [PATCH 1/4] Change from fastaq to pyfastaq --- README.md | 2 +- farm_blast/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54977bc..fab902c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Installation Prerequisites: * [NCBI BLAST] [NCBI BLAST] blast+, and optionally blastall, installed and their commands in your path - * [Fastaq] [Fastaq] >= v0.1 + * [Fastaq] [Fastaq] >= v3.0.2 * [Farmpy] [Farmpy] >= v0.2 Once the prerequisites are installed, run the tests: diff --git a/farm_blast/utils.py b/farm_blast/utils.py index 1921475..49cde84 100644 --- a/farm_blast/utils.py +++ b/farm_blast/utils.py @@ -1,4 +1,4 @@ -from fastaq import utils +from pyfastaq import utils import sys class Error (Exception): pass From 9f8cebb6d36d00eea3bd4d0270628b58ba5957f4 Mon Sep 17 00:00:00 2001 From: martinghunt Date: Mon, 2 Feb 2015 16:26:49 +0000 Subject: [PATCH 2/4] Changes for pypi --- setup.py | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 044862b..0abeb42 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,44 @@ import os +import shutil +import sys import glob from setuptools import setup, find_packages -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() + +required_progs = [ + 'blastn', + 'tblastn', + 'tblastx', + 'blastp', + 'blastx', + 'deltablast' +] + +found_all_progs = True +print('Checking blast+ programs found in path:') +for program in required_progs: + if shutil.which(program) is None: + found_all_progs = False + found = ' NOT FOUND' + else: + found = ' OK' + print(found, program, sep='\t') + +if not found_all_progs: + print('Cannot install because some programs from the blast+ package not found.', file=sys.stderr) + sys.exit(1) + setup( name='Farm_blast', - version='0.1.1', + version='0.1.2', description='Package to run blast in parallel on a compute farm', - long_description=read('README.md'), packages = find_packages(), author='Martin Hunt', author_email='mh12@sanger.ac.uk', url='https://github.com/sanger-pathogens/Farm_blast', scripts=glob.glob('scripts/*'), test_suite='nose.collector', - install_requires=['nose >= 1.3', 'fastaq >= 1.2', 'farmpy >= 0.2'], + install_requires=['nose >= 1.3', 'pyfastaq >= 3.0.1', 'farmpy >= 0.2'], license='GPLv3', ) From 79a374d8ff34ab049520ec5a60c0a701c8abe982 Mon Sep 17 00:00:00 2001 From: martinghunt Date: Mon, 2 Feb 2015 16:29:06 +0000 Subject: [PATCH 3/4] Update installation to use pip3 --- README.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fab902c..3502936 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,10 @@ Installation Prerequisites: * [NCBI BLAST] [NCBI BLAST] blast+, and optionally blastall, installed and their commands in your path - * [Fastaq] [Fastaq] >= v3.0.2 - * [Farmpy] [Farmpy] >= v0.2 -Once the prerequisites are installed, run the tests: +Once the prerequisites are installed, install with pip: - python3 setup.py test - -Note that the tests check that blast+ is installed, but not blastall because it is optional. -If all was OK, then install: - - python3 setup.py install + pip3 install farm_blast Synopsis -------- @@ -48,5 +41,3 @@ To get all the options, use --help: farm_blast --help [NCBI BLAST]: http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download -[Fastaq]: https://github.com/sanger-pathogens/Fastaq -[Farmpy]: https://github.com/sanger-pathogens/Farmpy From e7f7c1bc97c72a079475a3cfa8dbfcb73d48918f Mon Sep 17 00:00:00 2001 From: martinghunt Date: Mon, 2 Feb 2015 16:31:19 +0000 Subject: [PATCH 4/4] Name all lowercase --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0abeb42..fce9ec5 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( - name='Farm_blast', + name='farm_blast', version='0.1.2', description='Package to run blast in parallel on a compute farm', packages = find_packages(),