Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ jobs:
./test.sh
- name: Publish coverage to Coveralls
uses: coverallsapp/[email protected]
with:
parallel: true
5 changes: 4 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ python3 -m pip install --upgrade build && \
python3 -m pip install --upgrade twine && \
rm -rf dist && \
python3 -m build && \
python3 -m twine upload dist/*
git --version && \
python3 -m twine upload dist/* && \
git tag "$(python3 vaxrank/version.py)" && \
git push --tags

2 changes: 1 addition & 1 deletion develop.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set -e

pip install -e .
uv pip install -e .
17 changes: 8 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
six
numpy>=1.14.0
pandas
pyensembl>=1.5.0
varcode>=0.5.9
isovar>=1.1.1
mhctools>=1.5.0
numpy>=1.14.0,<2.0.0
pandas>=2.1.4,<3.0.0
pyensembl>=2.0.0,<3.0.0
varcode>=1.1.0,<2.0.0
isovar>=1.3.0,<2.0.0
mhctools>=1.8.2,<2.0.0
roman
jinja2<3.1
pdfkit # needs wkhtmltopdf: brew install Caskroom/cask/wkhtmltopdf
pypandoc # needs pandoc: brew install pandoc
shellinford>=0.3.4
xlsxwriter
xlrd>=1.0.0,<2.0.0
openpyxl
xvfbwrapper
future>=0.16.0 # needed by pylint
astropy
datacache
pysam>=0.15.2
msgspec>=0.18.6,<1.0.0
74 changes: 30 additions & 44 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
# limitations under the License.


from __future__ import (absolute_import,)
from __future__ import (
absolute_import,
)

import os
import logging
Expand All @@ -20,68 +22,52 @@
from setuptools import setup

readme_dir = os.path.dirname(__file__)
readme_path = os.path.join(readme_dir, 'README.md')
readme_path = os.path.join(readme_dir, "README.md")

try:
with open(readme_path, 'r') as f:
with open(readme_path, "r") as f:
readme_markdown = f.read()
except:
logging.warn("Failed to load %s" % readme_path)
readme_markdown = ""

with open('vaxrank/__init__.py', 'r') as f:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(),
re.MULTILINE).group(1)
with open("vaxrank/version.py", "r") as f:
match = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE)
if not match:
raise RuntimeError("Cannot find version information")
else:
version = match.group(1)

if not version:
raise RuntimeError("Cannot find version information")

if __name__ == '__main__':

with open("requirements.txt") as f:
requirements = [req.strip() for req in f.read().splitlines() if req.strip()]


if __name__ == "__main__":
setup(
name='vaxrank',
name="vaxrank",
version=version,
description="Mutant peptide ranking for personalized cancer vaccines",
author="Alex Rubinsteyn, Julia Kodysh",
author_email="[email protected], [email protected]",
url="https://github.com/openvax/vaxrank",
license="http://www.apache.org/licenses/LICENSE-2.0.html",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Bio-Informatics',
"Development Status :: 4 - Beta",
"Environment :: Console",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
install_requires=[
'numpy>=1.14.0,<2.0.0',
'pandas>=2.1.4,<3.0.0',
'pyensembl>=2.0.0,<3.0.0',
'varcode>=1.1.0,<2.0.0',
'isovar>=1.3.0,<2.0.0',
'mhctools>=1.8.2,<2.0.0',
'roman',
'jinja2<3.1',
'pdfkit',
'pypandoc',
'shellinford>=0.3.4',
'xlrd>=1.0.0,<2.0.0',
'xlsxwriter',
'xvfbwrapper',
'future>=0.16.0', # needed by pylint
'astropy',
],

install_requires=requirements,
long_description=readme_markdown,
long_description_content_type='text/markdown',
packages=['vaxrank'],
package_data={'vaxrank': ['templates/*', 'data/*', 'logging.conf']},
entry_points={
'console_scripts': [
'vaxrank = vaxrank.cli:main'
]
}
long_description_content_type="text/markdown",
packages=["vaxrank"],
package_data={"vaxrank": ["templates/*", "data/*", "logging.conf"]},
entry_points={"console_scripts": ["vaxrank = vaxrank.cli.entry_point:main"]},
)
3 changes: 2 additions & 1 deletion tests/test_epitope_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from mhctools import RandomBindingPredictor
from pyensembl import genome_for_reference_name
from varcode import Variant
from vaxrank.epitope_prediction import predict_epitopes, EpitopePrediction
from vaxrank.epitope_logic import predict_epitopes
from vaxrank.epitope_prediction import EpitopePrediction
from vaxrank.mutant_protein_fragment import MutantProteinFragment
from vaxrank.vaccine_peptide import VaccinePeptide

Expand Down
12 changes: 7 additions & 5 deletions tests/test_shell_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from tempfile import NamedTemporaryFile

import pandas as pd
from xlrd import open_workbook


from vaxrank.cli import main as run_shell_script

Expand Down Expand Up @@ -112,12 +112,14 @@ def test_isovar_csv():

def test_xlsx_report():
with NamedTemporaryFile(mode="r") as f:

xlsx_args = cli_args_for_b16_seqdata + ["--output-xlsx-report", f.name]
run_shell_script(xlsx_args)
book = open_workbook(f.name)
assert book.nsheets > 1


print("vaxrank %s" % (" ".join(xlsx_args)))
run_shell_script(xlsx_args)
df = pd.read_excel(f.name, engine='openpyxl')
assert len(df) == 2



def test_html_report():
Expand Down
31 changes: 30 additions & 1 deletion vaxrank/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
__version__ = "1.5.0"
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from .core_logic import run_vaxrank
from .epitope_prediction import EpitopePrediction
from .epitope_logic import predict_epitopes
from .vaccine_peptide import VaccinePeptide
from .version import __version__
from .cli.epitope_config_args import EpitopeConfig
from .cli.vaccine_config_args import VaccineConfig

__all__ = [
"__version__",
"EpitopePrediction",
"VaccinePeptide",
"run_vaxrank",
"predict_epitopes",
"EpitopeConfig",
"VaccineConfig",
]
Loading
Loading