├── .gitignore ├── AUTHORS.rst ├── CONTRIBUTING.rst ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── build.ipynb ├── notebook.png ├── pyannotables ├── __init__.py ├── data │ ├── __init__.py │ ├── datafile_homo_sapiens-GRCh37-ensembl100-tx2gene.pkl.xz │ ├── datafile_homo_sapiens-GRCh37-ensembl100.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl100-tx2gene.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl100.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl84-tx2gene.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl84.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl93-tx2gene.pkl.xz │ ├── datafile_homo_sapiens-GRCh38-ensembl93.pkl.xz │ ├── datafile_homology.pkl.xz │ ├── datafile_homology_grouped_geneentrez.pkl.xz │ ├── datafile_homology_grouped_genesymbol.pkl.xz │ ├── datafile_mus_musculus-GRCm38-ensembl100-tx2gene.pkl.xz │ └── datafile_mus_musculus-GRCm38-ensembl100.pkl.xz └── pyannotables.py ├── requirements_dev.txt ├── screenshot.ipynb ├── setup.cfg ├── setup.py └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 98 | __pypackages__/ 99 | 100 | # Celery stuff 101 | celerybeat-schedule 102 | celerybeat.pid 103 | 104 | # SageMath parsed files 105 | *.sage.py 106 | 107 | # Environments 108 | .env 109 | .venv 110 | env/ 111 | venv/ 112 | ENV/ 113 | env.bak/ 114 | venv.bak/ 115 | 116 | # Spyder project settings 117 | .spyderproject 118 | .spyproject 119 | 120 | # Rope project settings 121 | .ropeproject 122 | 123 | # mkdocs documentation 124 | /site 125 | 126 | # mypy 127 | .mypy_cache/ 128 | .dmypy.json 129 | dmypy.json 130 | 131 | # Pyre type checker 132 | .pyre/ 133 | 134 | # pytype static type analyzer 135 | .pytype/ 136 | 137 | # Cython debug symbols 138 | cython_debug/ 139 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Credits 3 | ======= 4 | 5 | Development Lead 6 | ---------------- 7 | 8 | * Gokcen Eraslan 9 | 10 | Contributors 11 | ------------ 12 | 13 | None yet. Why not be the first? 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Contributing 5 | ============ 6 | 7 | Contributions are welcome, and they are greatly appreciated! Every little bit 8 | helps, and credit will always be given. 9 | 10 | You can contribute in many ways: 11 | 12 | Types of Contributions 13 | ---------------------- 14 | 15 | Report Bugs 16 | ~~~~~~~~~~~ 17 | 18 | Report bugs at https://github.com/gokceneraslan/pyannotables/issues. 19 | 20 | If you are reporting a bug, please include: 21 | 22 | * Your operating system name and version. 23 | * Any details about your local setup that might be helpful in troubleshooting. 24 | * Detailed steps to reproduce the bug. 25 | 26 | Fix Bugs 27 | ~~~~~~~~ 28 | 29 | Look through the GitHub issues for bugs. Anything tagged with "bug" and "help 30 | wanted" is open to whoever wants to implement it. 31 | 32 | Implement Features 33 | ~~~~~~~~~~~~~~~~~~ 34 | 35 | Look through the GitHub issues for features. Anything tagged with "enhancement" 36 | and "help wanted" is open to whoever wants to implement it. 37 | 38 | Write Documentation 39 | ~~~~~~~~~~~~~~~~~~~ 40 | 41 | pyannotables could always use more documentation, whether as part of the 42 | official pyannotables docs, in docstrings, or even on the web in blog posts, 43 | articles, and such. 44 | 45 | Submit Feedback 46 | ~~~~~~~~~~~~~~~ 47 | 48 | The best way to send feedback is to file an issue at https://github.com/gokceneraslan/pyannotables/issues. 49 | 50 | If you are proposing a feature: 51 | 52 | * Explain in detail how it would work. 53 | * Keep the scope as narrow as possible, to make it easier to implement. 54 | * Remember that this is a volunteer-driven project, and that contributions 55 | are welcome :) 56 | 57 | Get Started! 58 | ------------ 59 | 60 | Ready to contribute? Here's how to set up `pyannotables` for local development. 61 | 62 | 1. Fork the `pyannotables` repo on GitHub. 63 | 2. Clone your fork locally:: 64 | 65 | $ git clone git@github.com:your_name_here/pyannotables.git 66 | 67 | 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: 68 | 69 | $ mkvirtualenv pyannotables 70 | $ cd pyannotables/ 71 | $ python setup.py develop 72 | 73 | 4. Create a branch for local development:: 74 | 75 | $ git checkout -b name-of-your-bugfix-or-feature 76 | 77 | Now you can make your changes locally. 78 | 79 | 5. When you're done making changes, check that your changes pass flake8 and the 80 | tests, including testing other Python versions with tox:: 81 | 82 | $ flake8 pyannotables tests 83 | $ python setup.py test or py.test 84 | $ tox 85 | 86 | To get flake8 and tox, just pip install them into your virtualenv. 87 | 88 | 6. Commit your changes and push your branch to GitHub:: 89 | 90 | $ git add . 91 | $ git commit -m "Your detailed description of your changes." 92 | $ git push origin name-of-your-bugfix-or-feature 93 | 94 | 7. Submit a pull request through the GitHub website. 95 | 96 | Pull Request Guidelines 97 | ----------------------- 98 | 99 | Before you submit a pull request, check that it meets these guidelines: 100 | 101 | 1. The pull request should include tests. 102 | 2. If the pull request adds functionality, the docs should be updated. Put 103 | your new functionality into a function with a docstring, and add the 104 | feature to the list in README.rst. 105 | 3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check 106 | https://travis-ci.org/gokceneraslan/pyannotables/pull_requests 107 | and make sure that the tests pass for all supported Python versions. 108 | 109 | Tips 110 | ---- 111 | 112 | To run a subset of tests:: 113 | 114 | 115 | $ python -m unittest tests.test_pyannotables 116 | 117 | Deploying 118 | --------- 119 | 120 | A reminder for the maintainers on how to deploy. 121 | Make sure all your changes are committed (including an entry in HISTORY.rst). 122 | Then run:: 123 | 124 | $ bumpversion patch # possible: major / minor / patch 125 | $ git push 126 | $ git push --tags 127 | 128 | Travis will then deploy to PyPI if tests pass. 129 | -------------------------------------------------------------------------------- /HISTORY.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | History 3 | ======= 4 | 5 | 6 | v0.5 (2020-10-29) 7 | ----------------- 8 | 9 | * Homology mapping table and function (`homology_convert`) are added. 10 | * tables is now a function. 11 | 12 | 13 | v0.4 (2020-10-27) 14 | ----------------- 15 | 16 | * Entrez and UNIPROT IDs are added. 17 | 18 | 19 | v0.3 (2020-06-04) 20 | ----------------- 21 | 22 | * Ensembl version updated to 100. NCBI transcript IDs, gene lengths and gene exon lengths are added. 23 | 24 | 25 | v0.1 (2019-04-07) 26 | ------------------ 27 | 28 | * First release on PyPI. 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache Software License 2.0 2 | 3 | Copyright (c) 2019, Gokcen Eraslan 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.rst 2 | include CONTRIBUTING.rst 3 | include HISTORY.rst 4 | include LICENSE 5 | include README.rst 6 | 7 | recursive-include tests * 8 | recursive-exclude * __pycache__ 9 | recursive-exclude * *.py[co] 10 | 11 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean clean-test clean-pyc clean-build docs help 2 | .DEFAULT_GOAL := help 3 | 4 | define BROWSER_PYSCRIPT 5 | import os, webbrowser, sys 6 | 7 | try: 8 | from urllib import pathname2url 9 | except: 10 | from urllib.request import pathname2url 11 | 12 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) 13 | endef 14 | export BROWSER_PYSCRIPT 15 | 16 | define PRINT_HELP_PYSCRIPT 17 | import re, sys 18 | 19 | for line in sys.stdin: 20 | match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) 21 | if match: 22 | target, help = match.groups() 23 | print("%-20s %s" % (target, help)) 24 | endef 25 | export PRINT_HELP_PYSCRIPT 26 | 27 | BROWSER := python -c "$$BROWSER_PYSCRIPT" 28 | 29 | help: 30 | @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) 31 | 32 | clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts 33 | 34 | clean-build: ## remove build artifacts 35 | rm -fr build/ 36 | rm -fr dist/ 37 | rm -fr .eggs/ 38 | find . -name '*.egg-info' -exec rm -fr {} + 39 | find . -name '*.egg' -exec rm -f {} + 40 | 41 | clean-pyc: ## remove Python file artifacts 42 | find . -name '*.pyc' -exec rm -f {} + 43 | find . -name '*.pyo' -exec rm -f {} + 44 | find . -name '*~' -exec rm -f {} + 45 | find . -name '__pycache__' -exec rm -fr {} + 46 | 47 | clean-test: ## remove test and coverage artifacts 48 | rm -fr .tox/ 49 | rm -f .coverage 50 | rm -fr htmlcov/ 51 | rm -fr .pytest_cache 52 | 53 | lint: ## check style with flake8 54 | flake8 pyannotables tests 55 | 56 | test: ## run tests quickly with the default Python 57 | python setup.py test 58 | 59 | test-all: ## run tests on every Python version with tox 60 | tox 61 | 62 | coverage: ## check code coverage quickly with the default Python 63 | coverage run --source pyannotables setup.py test 64 | coverage report -m 65 | coverage html 66 | $(BROWSER) htmlcov/index.html 67 | 68 | docs: ## generate Sphinx HTML documentation, including API docs 69 | rm -f docs/pyannotables.rst 70 | rm -f docs/modules.rst 71 | sphinx-apidoc -o docs/ pyannotables 72 | $(MAKE) -C docs clean 73 | $(MAKE) -C docs html 74 | $(BROWSER) docs/_build/html/index.html 75 | 76 | servedocs: docs ## compile the docs watching for changes 77 | watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . 78 | 79 | release: dist ## package and upload a release 80 | twine upload dist/* 81 | 82 | dist: clean ## builds source and wheel package 83 | python setup.py sdist 84 | python setup.py bdist_wheel 85 | ls -l dist 86 | 87 | install: clean ## install the package to the active Python's site-packages 88 | python setup.py install 89 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | pyannotables 3 | ============ 4 | 5 | 6 | .. image:: https://img.shields.io/pypi/v/pyannotables.svg 7 | :target: https://pypi.python.org/pypi/pyannotables 8 | 9 | 10 | Python package for conversions between Ensembl IDs and gene names (annotables + pyranges + Ensembl GTF files) 11 | 12 | * Free software: Apache Software License 2.0 13 | 14 | 15 | Installation 16 | ------------ 17 | 18 | * `pip install pyannotables` 19 | 20 | 21 | Features 22 | -------- 23 | 24 | .. image:: notebook.png 25 | :scale: 30 % 26 | 27 | 28 | Building data frames 29 | --------------------- 30 | 31 | See `./build.ipynb 32 | `_. 33 | 34 | 35 | Changelog 36 | --------- 37 | 38 | * v0.5: Homology mapping table and function (`homology_convert`) are added. tables is a function now. 39 | * v0.4: Entrez and UNIPROT IDs are added. 40 | * v0.3: Ensembl version updated to 100. NCBI transcript IDs, gene lengths and gene exon lengths are added. 41 | 42 | 43 | Credits 44 | ------- 45 | 46 | * `annotables package in R` https://github.com/stephenturner/annotables 47 | * `audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage 48 | -------------------------------------------------------------------------------- /notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/notebook.png -------------------------------------------------------------------------------- /pyannotables/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | def tables(): 4 | import pandas as pd 5 | 6 | from pathlib import Path 7 | from pkg_resources import resource_listdir, resource_filename 8 | 9 | __data_files = resource_listdir('pyannotables.data', '') 10 | __full_data_files = {Path(filename).stem.split('.')[0].split('datafile_')[1]: resource_filename('pyannotables.data', filename) for filename in __data_files if filename.startswith('datafile_')} 11 | 12 | t = {key: pd.read_pickle(val) for key, val in __full_data_files.items()} 13 | 14 | return t 15 | 16 | 17 | def homology_convert(gene_symbols, source_organism, target_organism): 18 | import pandas as pd 19 | 20 | t = tables() 21 | homology = t['homology'] 22 | homology_grouped_genesymbol = t['homology_grouped_genesymbol'] 23 | 24 | genes_dict = homology[(homology.tax_name == source_organism) & homology.gene_symbol.isin(gene_symbols)].set_index('gene_symbol').to_dict()['homology_id'] 25 | 26 | homology2target = homology_grouped_genesymbol[target_organism].to_dict() 27 | res_genes = {symbol: homology2target[h] for symbol, h in genes_dict.items()} 28 | 29 | df = pd.DataFrame({source_organism: list(res_genes.keys())}) 30 | df[target_organism] = res_genes.values() 31 | df = df[~df[target_organism].isnull()] 32 | df = df.explode(target_organism).reset_index(drop=True) 33 | 34 | return df -------------------------------------------------------------------------------- /pyannotables/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/__init__.py -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh37-ensembl100-tx2gene.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh37-ensembl100-tx2gene.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh37-ensembl100.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh37-ensembl100.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl100-tx2gene.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl100-tx2gene.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl100.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl100.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl84-tx2gene.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl84-tx2gene.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl84.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl84.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl93-tx2gene.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl93-tx2gene.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl93.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homo_sapiens-GRCh38-ensembl93.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homology.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homology.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homology_grouped_geneentrez.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homology_grouped_geneentrez.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_homology_grouped_genesymbol.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_homology_grouped_genesymbol.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_mus_musculus-GRCm38-ensembl100-tx2gene.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_mus_musculus-GRCm38-ensembl100-tx2gene.pkl.xz -------------------------------------------------------------------------------- /pyannotables/data/datafile_mus_musculus-GRCm38-ensembl100.pkl.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gokceneraslan/pyannotables/7301019e9ce13eef4c8094620dddb2184b7259df/pyannotables/data/datafile_mus_musculus-GRCm38-ensembl100.pkl.xz -------------------------------------------------------------------------------- /pyannotables/pyannotables.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """Main module.""" -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | pip==21.1 2 | bumpversion==0.5.3 3 | wheel==0.38.1 4 | watchdog==0.9.0 5 | flake8==3.5.0 6 | tox==3.5.2 7 | coverage==4.5.1 8 | Sphinx==1.8.1 9 | twine==1.12.1 10 | 11 | 12 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.1.0 3 | commit = True 4 | tag = True 5 | 6 | [bumpversion:file:setup.py] 7 | search = version='{current_version}' 8 | replace = version='{new_version}' 9 | 10 | [bumpversion:file:pyannotables/__init__.py] 11 | search = __version__ = '{current_version}' 12 | replace = __version__ = '{new_version}' 13 | 14 | [bdist_wheel] 15 | universal = 1 16 | 17 | [flake8] 18 | exclude = docs 19 | 20 | [aliases] 21 | # Define setup.py command aliases here 22 | 23 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """The setup script.""" 5 | 6 | from setuptools import setup, find_packages 7 | 8 | with open('README.rst') as readme_file: 9 | readme = readme_file.read() 10 | 11 | with open('HISTORY.rst') as history_file: 12 | history = history_file.read() 13 | 14 | requirements = ['pandas'] 15 | 16 | setup_requirements = ['pandas', 'pyensembl'] 17 | 18 | setup( 19 | author="Gokcen Eraslan", 20 | author_email='geraslan@broadinstitute.org', 21 | classifiers=[ 22 | 'Development Status :: 2 - Pre-Alpha', 23 | 'Intended Audience :: Developers', 24 | 'License :: OSI Approved :: Apache Software License', 25 | 'Natural Language :: English', 26 | 'Programming Language :: Python :: 3.5', 27 | 'Programming Language :: Python :: 3.6', 28 | 'Programming Language :: Python :: 3.7', 29 | ], 30 | description="Python package for conversions between ENSEMBL IDs and gene names (annotables + pyensembl)", 31 | install_requires=requirements, 32 | license="Apache Software License 2.0", 33 | long_description=readme + '\n\n' + history, 34 | include_package_data=True, 35 | keywords='pyannotables', 36 | name='pyannotables', 37 | packages=find_packages(), 38 | package_data={'': ['datafile_*']}, 39 | setup_requires=setup_requirements, 40 | url='https://github.com/gokceneraslan/pyannotables', 41 | version='0.5', 42 | zip_safe=False, 43 | ) 44 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27, py34, py35, py36, flake8 3 | 4 | [travis] 5 | python = 6 | 3.6: py36 7 | 3.5: py35 8 | 3.4: py34 9 | 2.7: py27 10 | 11 | [testenv:flake8] 12 | basepython = python 13 | deps = flake8 14 | commands = flake8 pyannotables 15 | 16 | [testenv] 17 | setenv = 18 | PYTHONPATH = {toxinidir} 19 | 20 | commands = python setup.py test 21 | 22 | --------------------------------------------------------------------------------