Skip to content

Commit

Permalink
Merge pull request #15 from martinghunt/change_to_pyfastaq
Browse files Browse the repository at this point in the history
Change to pyfastaq; add to pypi
  • Loading branch information
martinghunt committed Feb 2, 2015
2 parents ad64c71 + e7f7c1b commit c98fb31
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ Installation

Prerequisites:
* [NCBI BLAST] [NCBI BLAST] blast+, and optionally blastall, installed and their commands in your path
* [Fastaq] [Fastaq] >= v0.1
* [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
--------
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion farm_blast/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastaq import utils
from pyfastaq import utils
import sys

class Error (Exception): pass
Expand Down
35 changes: 29 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
name='farm_blast',
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='[email protected]',
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',
)

0 comments on commit c98fb31

Please sign in to comment.