Skip to content

Commit

Permalink
tweaks to python setup, readme; need to test that the scripts offered…
Browse files Browse the repository at this point in the history
… by the pypi package work correctly
  • Loading branch information
jhkorhonen committed May 10, 2019
1 parent aa8f5cd commit 93723f0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
30 changes: 24 additions & 6 deletions python/readme.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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"
)

0 comments on commit 93723f0

Please sign in to comment.