-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
53 lines (41 loc) · 1.78 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from setuptools import setup, Extension
from Cython.Build import cythonize
from ast import literal_eval
def versiontuple(v):
return tuple(map(int, (v.split("."))))
try:
import pysam
if versiontuple(pysam.__version__) < versiontuple('0.8.1'):
raise Exception('please upgrade pysam first, e.g.: pip install --upgrade pysam')
from Cython.Distutils import build_ext # Cython should be installed via pysam
except ImportError:
raise Exception('please install pysam first, e.g.: pip install --upgrade pysam')
try:
import numpy as np
except ImportError:
raise Exception('please install numpy first')
extensions = [Extension('SomVarIUS_calling',
sources=['SomVarIUS/SomVarIUS_calling.pyx'],
include_dirs=[np.get_include()] + pysam.get_include(),
define_macros=pysam.get_defines())]
extensions.append(Extension('query_muts',
sources=['SomVarIUS/query_muts.pyx'],
include_dirs=[np.get_include()] + pysam.get_include(),
define_macros=pysam.get_defines()))
setup(
name='SomVarIUS',
version='1.2',
author='Kyle S. Smith',
author_email='kyle.s.smith@ucdenver.edu',
license="MIT Licenses",
url='https://github.com/kylessmith/SomVarIUS',
description='A Python utility for calling somatic mutations from a BAM or SAM file',
ext_modules=cythonize(extensions),
scripts=['SomVarIUS/SomVarIUS', 'SomVarIUS/bb_fit.py','SomVarIUS/mixture_model.py', 'SomVarIUS/assign_clones.py'],
install_requires=["pysam>=0.10.0",
"numpy>=1.7.0",
"scipy>=0.12.0",
],
classifiers=['Programming Language :: Python',
],
)