From 1e68e86d842c99d67198c7cebf5363d450eb27c4 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Tue, 8 Sep 2020 12:59:57 +0200
Subject: [PATCH] Made a Python package.

---
 COPYING => COPYING.txt                        |  0
 install.sh                                    |  7 ++++
 .../create_metagene_profile.py                |  0
 .../plot_scatterplot.py                       |  0
 setup.py                                      | 42 +++++++++++++++++++
 5 files changed, 49 insertions(+)
 rename COPYING => COPYING.txt (100%)
 create mode 100755 install.sh
 rename create_metagene_profile.py => scripts/create_metagene_profile.py (100%)
 rename plot_scatterplot.py => scripts/plot_scatterplot.py (100%)
 create mode 100644 setup.py

diff --git a/COPYING b/COPYING.txt
similarity index 100%
rename from COPYING
rename to COPYING.txt
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..26b76d5
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# /usr/bin/env python3 setup.py build_ext
+# .egg-link does not work with PYTHONPATH ?
+# Install custom pybedtools first
+/usr/bin/env python3 -m pip install -r requirements.txt
+/usr/bin/env python3 -m pip install -e .
+/usr/bin/env python3 -m pip install --no-deps --ignore-installed .
diff --git a/create_metagene_profile.py b/scripts/create_metagene_profile.py
similarity index 100%
rename from create_metagene_profile.py
rename to scripts/create_metagene_profile.py
diff --git a/plot_scatterplot.py b/scripts/plot_scatterplot.py
similarity index 100%
rename from plot_scatterplot.py
rename to scripts/plot_scatterplot.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..8587fdb
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,42 @@
+# Copyright (C) 2020 Blaise Li
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+from setuptools import setup, find_packages
+#from Cython.Build import cythonize
+
+name = "plotting_scripts"
+
+__version__ = "0.1"
+
+
+setup(
+    name=name,
+    version=__version__,
+    description="Some scripts used in Germano Cecere's laboratory at Institut Pasteur.",
+    author="Blaise Li",
+    author_email="blaise.li@normalesup.org",
+    license="GNU GPLv3",
+    packages=find_packages(),
+    scripts=[
+        "scripts/create_metagene_profile.py",
+        "scripts/plot_scatterplot.py"],
+    install_requires=[
+        "cytoolz",
+        "deeptools",
+        "gffutils",
+        "libhts @ git+https://bioinfo_utils:DP-sqNot8AdsMek_KJiC@gitlab.pasteur.fr/bli/libhts.git",
+        "libworkflows @ git+https://bioinfo_utils:tfuTQsSZWMtC5xXJNFJh@gitlab.pasteur.fr/bli/libworkflows.git",
+        "matplotlib",
+        "pandas"],
+    )
-- 
GitLab