From 93723f0535eb3683662bab0ccfe525e6474c5482 Mon Sep 17 00:00:00 2001 From: "Janne H. Korhonen" Date: Fri, 10 May 2019 15:51:52 +0200 Subject: [PATCH] tweaks to python setup, readme; need to test that the scripts offered by the pypi package work correctly --- python/readme.MD | 30 ++++++++++++++++++++++++------ python/setup.py | 12 ++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/python/readme.MD b/python/readme.MD index 44fd77d..d94edde 100644 --- a/python/readme.MD +++ b/python/readme.MD @@ -6,11 +6,29 @@ Motif Occurrence Detection Suite https://www.cs.helsinki.fi/group/pssmfind/ -Getting Started ---------------- +Installing from PyPi +-------------------- -Start by compiling the MOODS extensions and optionally installing -the MOODS module to Python library path. Do one of the following: +The easiest way to install MOODS is using pip: + +(a) Install the module to your local Python library path: + + pip install --user moods-python + +(b) Install the module for all users: + + pip install moods-python + +Installing the MOODS package from PyPi installs the `moods-dna` command to you +Python path. Test it by running: + + moods-dna --help + + +Installing from Source +---------------------- + +Alternatively, you can install MOODS from the source package: (a) Compile the extensions in place and create a symlink under `scripts/` (if you just want to test things without installing to Python library path, @@ -29,8 +47,8 @@ analysis): sudo python setup.py install -In all cases, you can test MOODS by running the `moods_dna.py` script -with the example data provided with the package: +You can test MOODS by running the `moods_dna.py` script with +the example data provided with the package: cd scripts/ python moods_dna.py -m example-data/matrices/*.{pfm,adm} -s example-data/seq/chr1-5k-55k.fa -p 0.0001 diff --git a/python/setup.py b/python/setup.py index be7f054..a287250 100755 --- a/python/setup.py +++ b/python/setup.py @@ -5,6 +5,7 @@ """ from distutils.core import setup, Extension +from os import path common_includes = ["core/"] common_compile_args = ['-march=native', '-O3', '-fPIC', '--std=c++11'] @@ -42,13 +43,24 @@ extra_compile_args=common_compile_args, ) + + +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'readme.MD'), encoding='utf-8') as f: + long_description = f.read() + setup (name = 'MOODS-python', version = '1.9.4', description = 'MOODS: Motif Occurrence Detection Suite', + long_description = long_description, + long_description_content_type="text/markdown", maintainer = "Janne H. Korhonen", maintainer_email = "janne.h.korhonen@gmail.com", url='https://www.cs.helsinki.fi/group/pssmfind/', license = "GPLv3 / Biopython license", ext_modules = [tools_mod, scan_mod, parsers_mod], packages = ["MOODS"], + scripts=['scripts/moods-dna.py'], + classifiers=["Topic :: Scientific/Engineering :: Bio-Informatics"] + keywords="PWM, PSSM, motif scan" ) \ No newline at end of file