-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08ec646
commit 897e5f5
Showing
14 changed files
with
722 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
######################### | ||
# Flake8 Configuration # | ||
# (.flake8) # | ||
# (formerly in tox.ini) # | ||
######################### | ||
|
||
[flake8] | ||
ignore = E501 | ||
exclude = | ||
.tox, | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py, | ||
build, | ||
dist, | ||
tests/fixtures/*, | ||
*.pyc, | ||
*.egg-info, | ||
.cache, | ||
.eggs | ||
max-complexity = 10 | ||
import-order-style = google | ||
application-import-names = flake8 | ||
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
.Rproj.user | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# PyCharm project settings | ||
.idea/* | ||
|
||
*.pickle | ||
*.gpickle | ||
|
||
scratch | ||
scratch/* | ||
|
||
.pytest_cache | ||
.DS_Store | ||
|
||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
sudo: false | ||
cache: pip | ||
language: python | ||
python: | ||
- 3.6 | ||
stages: | ||
- lint | ||
- docs | ||
jobs: | ||
include: | ||
# lint stage | ||
- stage: lint | ||
env: TOXENV=manifest | ||
- env: TOXENV=flake8 | ||
- env: TOXENV=pylint | ||
# docs stage | ||
- stage: docs | ||
env: TOXENV=doc8 | ||
- env: TOXENV=readme | ||
- env: TOXENV=docs | ||
matrix: | ||
allow_failures: | ||
- env: TOXENV=flake8 | ||
- env: TOXENV=pylint | ||
install: | ||
- pip install tox | ||
script: | ||
- tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 LifeScienceDataAnalytics | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
graft src | ||
graft tests | ||
prune data | ||
prune hooks | ||
|
||
recursive-include docs/source *.py | ||
recursive-include docs/source *.rst | ||
include docs/Makefile | ||
|
||
global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle | ||
|
||
exclude .bumpversion.cfg | ||
include *.rst *.txt *.yml LICENSE tox.ini .coveragerc .R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-e git+https://github.com/GuiltyTargets/ppi-network-annotation#egg=ppi-network-annotation | ||
-e git+https://github.com/ozlemmuslu/guiltytargets#egg=guiltytargets | ||
-e git+https://github.com/ozlemmuslu/GAT2VEC#egg=GAT2VEC | ||
flask[web] | ||
flask-bootstrap[web] | ||
wtforms[web] | ||
flask-wtf[web] | ||
celery[web] | ||
sqlalchemy[web] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Setup module for the gene_prioritization package.""" | ||
|
||
import codecs # To use a consistent encoding | ||
import os | ||
import re | ||
|
||
import setuptools | ||
|
||
################################################################# | ||
|
||
PACKAGES = setuptools.find_packages(where='src') | ||
META_PATH = os.path.join('src', 'gene_prioritization', '__init__.py') | ||
KEYWORDS = ['Gene Prioritization', 'Networks Biology', | ||
'Drug Target Prioritization'] | ||
CLASSIFIERS = [ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Console', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT Software License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Topic :: Scientific/Engineering :: Bio-Informatics' | ||
] | ||
INSTALL_REQUIRES = [ | ||
] | ||
|
||
EXTRAS_REQUIRE = { | ||
|
||
} | ||
TESTS_REQUIRE = [ | ||
|
||
] | ||
ENTRY_POINTS = { | ||
'console_scripts': [ | ||
'guiltytargets-web = guiltytargets-web.cli:main', | ||
] | ||
} | ||
DEPENDENCY_LINKS = [ | ||
|
||
] | ||
|
||
PACKAGE_DATA = { | ||
'': [] | ||
} | ||
|
||
################################################################# | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def read(*parts): | ||
"""Build an absolute path from *parts* and return the contents of the resulting file. Assume UTF-8 encoding.""" | ||
with codecs.open(os.path.join(HERE, *parts), 'rb', 'utf-8') as f: | ||
return f.read() | ||
|
||
|
||
META_FILE = read(META_PATH) | ||
|
||
|
||
def find_meta(meta): | ||
"""Extract __*meta*__ from META_FILE""" | ||
meta_match = re.search( | ||
r'^__{meta}__ = ["\']([^"\']*)["\']'.format(meta=meta), | ||
META_FILE, re.M | ||
) | ||
if meta_match: | ||
return meta_match.group(1) | ||
raise RuntimeError('Unable to find __{meta}__ string'.format(meta=meta)) | ||
|
||
|
||
def get_long_description(): | ||
"""Get the long_description from the README.rst file. Assume UTF-8 encoding.""" | ||
with codecs.open(os.path.join(HERE, 'README.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
return long_description | ||
|
||
|
||
if __name__ == '__main__': | ||
setuptools.setup( | ||
name=find_meta('title'), | ||
version=find_meta('version'), | ||
description=find_meta('description'), | ||
long_description=get_long_description(), | ||
url=find_meta('url'), | ||
author=find_meta('author'), | ||
author_email=find_meta('email'), | ||
maintainer=find_meta('author'), | ||
maintainer_email=find_meta('email'), | ||
license=find_meta('license'), | ||
classifiers=CLASSIFIERS, | ||
keywords=KEYWORDS, | ||
packages=PACKAGES, | ||
package_dir={'': 'src'}, | ||
install_requires=INSTALL_REQUIRES, | ||
extras_require=EXTRAS_REQUIRE, | ||
tests_require=TESTS_REQUIRE, | ||
entry_points=ENTRY_POINTS, | ||
dependency_links=DEPENDENCY_LINKS, | ||
package_data=PACKAGE_DATA, | ||
include_package_data=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Web module for Gene-Prioritization""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from flask_wtf import FlaskForm | ||
from flask_wtf.file import FileField | ||
from wtforms.fields import RadioField, StringField, SubmitField, TextAreaField | ||
|
||
PPI_PATH = '/Users/cthoyt/ownCloud/Gene-Prioritization-Data/MayoRNASeq-TCX/hippie_current.edgelist' | ||
|
||
ppi_graph = RadioField( | ||
'PPI Graph', | ||
choices=[ | ||
('string', 'STRING'), # TODO add link | ||
(PPI_PATH, 'HIPPIE'), | ||
], | ||
default=PPI_PATH | ||
) | ||
|
||
class GuiltyTargetsForm(FlaskForm): | ||
"""The form for using the GAT2VEC pipeline.""" | ||
entrez_gene_identifiers = TextAreaField('Entrez Gene Identifiers') | ||
ppi_graph = ppi_graph | ||
file = FileField( | ||
'Differential Gene Expression File', | ||
# validators=[DataRequired()], | ||
) | ||
gene_symbol_column = StringField( | ||
'Gene Symbol Column Name', | ||
default='Gene.symbol', | ||
) | ||
log_fold_change_column = StringField( | ||
'Log Fold Change Column Name', | ||
default='logFC', | ||
) | ||
separator = RadioField( | ||
'Separator', | ||
choices=[ | ||
('\t', 'My document is a TSV file'), | ||
(',', 'My document is a CSV file'), | ||
], | ||
default='\t') | ||
|
||
# Submit | ||
submit = SubmitField('Upload') |
Oops, something went wrong.