Skip to content

Commit df753e3

Browse files
committed
add setup files & update readme,tutorial
1 parent 9a096cd commit df753e3

File tree

4 files changed

+107
-25
lines changed

4 files changed

+107
-25
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ Light Weighted dotplot drawer
88

99
Examples of dotplot can be found [tutorial](https://nbviewer.jupyter.org/github/jefferyUstc/python-dotplot/blob/main/tutorial/tutorials.ipynb)
1010

11+
# Installation
12+
```shell script
13+
pip install python_dotplot
14+
```

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
matplotlib
2+
numpy
3+
pandas

setup.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from pathlib import Path
2+
3+
import setuptools
4+
5+
with open("README.md", "r") as fh:
6+
long_description = fh.read()
7+
8+
setuptools.setup(
9+
name="python_dotplot",
10+
version="0.0.1a1",
11+
author='jefferyUstc',
12+
author_email="jeffery_cpu@163.com",
13+
description="light weighted dotplot drawer",
14+
long_description=long_description,
15+
long_description_content_type="text/markdown",
16+
url="https://github.com/jefferyUstc/python-dotplot",
17+
project_urls={
18+
'python-dotplot': 'https://github.com/jefferyUstc/python-dotplot',
19+
},
20+
zip_safe=False,
21+
keywords="dotplot python scatter",
22+
python_requires='>=3.6',
23+
packages=setuptools.find_packages(),
24+
install_requires=[
25+
path.strip() for path in Path('requirements.txt').read_text('utf-8').splitlines()
26+
],
27+
entry_points={},
28+
package_data={},
29+
include_package_data=False,
30+
classifiers=[
31+
"Development Status :: 5 - Production/Stable",
32+
"Environment :: Console",
33+
"Intended Audience :: Education",
34+
"Programming Language :: Python :: 3",
35+
"Programming Language :: Python :: 3.6",
36+
"Programming Language :: Python :: 3.7",
37+
"Programming Language :: Python :: 3 :: Only",
38+
"Topic :: Scientific/Engineering :: Bio-Informatics",
39+
"Operating System :: MacOS :: MacOS X",
40+
"Operating System :: POSIX :: Linux",
41+
"Natural Language :: English",
42+
],
43+
)

tutorial/tutorials.ipynb

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,64 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
6-
"id": "adjustable-alignment",
5+
"execution_count": 7,
6+
"id": "helpful-procurement",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"name": "stdout",
11+
"output_type": "stream",
12+
"text": [
13+
"Collecting python_dotplot\n",
14+
" Downloading python_dotplot-0.0.1a1-py3-none-any.whl (6.0 kB)\n",
15+
"Requirement already satisfied: pandas in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from python_dotplot) (1.1.2)\n",
16+
"Requirement already satisfied: numpy in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from python_dotplot) (1.19.2)\n",
17+
"Requirement already satisfied: matplotlib in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from python_dotplot) (3.3.1)\n",
18+
"Requirement already satisfied: python-dateutil>=2.1 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (2.8.1)\n",
19+
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (1.2.0)\n",
20+
"Requirement already satisfied: cycler>=0.10 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (0.10.0)\n",
21+
"Requirement already satisfied: pillow>=6.2.0 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (7.2.0)\n",
22+
"Requirement already satisfied: certifi>=2020.06.20 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (2020.6.20)\n",
23+
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from matplotlib->python_dotplot) (2.4.7)\n",
24+
"Requirement already satisfied: six in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from cycler>=0.10->matplotlib->python_dotplot) (1.15.0)\n",
25+
"Requirement already satisfied: pytz>=2017.2 in /home/liunianping/miniconda3/envs/pyGalaxy/lib/python3.6/site-packages (from pandas->python_dotplot) (2020.1)\n",
26+
"Installing collected packages: python-dotplot\n",
27+
"Successfully installed python-dotplot-0.0.1a1\n"
28+
]
29+
}
30+
],
31+
"source": [
32+
"!pip install python_dotplot --upgrade"
33+
]
34+
},
35+
{
36+
"cell_type": "code",
37+
"execution_count": 9,
38+
"id": "charitable-instrumentation",
739
"metadata": {},
840
"outputs": [],
941
"source": [
10-
"import sys\n",
11-
"sys.path.insert(0, '..')\n",
1242
"import pandas as pd\n",
1343
"import dotplot\n",
14-
"import dotplot.utils\n",
15-
"\n",
44+
"import dotplot.utils"
45+
]
46+
},
47+
{
48+
"cell_type": "code",
49+
"execution_count": 10,
50+
"id": "sixth-orbit",
51+
"metadata": {},
52+
"outputs": [],
53+
"source": [
54+
"import sys\n",
55+
"sys.path.insert(0, '..')\n",
1656
"%config InlineBackend.figure_format = 'retina'"
1757
]
1858
},
1959
{
2060
"cell_type": "code",
21-
"execution_count": 2,
22-
"id": "registered-style",
61+
"execution_count": 11,
62+
"id": "warming-attention",
2363
"metadata": {},
2464
"outputs": [],
2565
"source": [
@@ -34,8 +74,8 @@
3474
},
3575
{
3676
"cell_type": "code",
37-
"execution_count": 3,
38-
"id": "exotic-microphone",
77+
"execution_count": 12,
78+
"id": "classical-volleyball",
3979
"metadata": {},
4080
"outputs": [
4181
{
@@ -173,7 +213,7 @@
173213
"GO:0002673 HLA-E/CD55/IGHG2/IGKV3-20/IGHV4-34/IGHV3-30/IG... 18 B6_up "
174214
]
175215
},
176-
"execution_count": 3,
216+
"execution_count": 12,
177217
"metadata": {},
178218
"output_type": "execute_result"
179219
}
@@ -185,8 +225,8 @@
185225
},
186226
{
187227
"cell_type": "code",
188-
"execution_count": 4,
189-
"id": "obvious-cookbook",
228+
"execution_count": 13,
229+
"id": "laughing-violin",
190230
"metadata": {},
191231
"outputs": [
192232
{
@@ -213,8 +253,8 @@
213253
},
214254
{
215255
"cell_type": "code",
216-
"execution_count": 5,
217-
"id": "thermal-conspiracy",
256+
"execution_count": 14,
257+
"id": "coated-legislature",
218258
"metadata": {},
219259
"outputs": [
220260
{
@@ -241,8 +281,8 @@
241281
},
242282
{
243283
"cell_type": "code",
244-
"execution_count": 6,
245-
"id": "noted-helena",
284+
"execution_count": 15,
285+
"id": "internal-lewis",
246286
"metadata": {},
247287
"outputs": [
248288
{
@@ -265,14 +305,6 @@
265305
"dp = dotplot.DotPlot.parse_from_tidy_data(data, **dotplot.utils.DEFAULT_CLUSTERPROFILE_KEYS)\n",
266306
"sct = dp.plot(size_factor=10, cmap='Reds')"
267307
]
268-
},
269-
{
270-
"cell_type": "code",
271-
"execution_count": null,
272-
"id": "narrow-florida",
273-
"metadata": {},
274-
"outputs": [],
275-
"source": []
276308
}
277309
],
278310
"metadata": {

0 commit comments

Comments
 (0)