Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on:
push:
branches: [main]
pull_request:

jobs:
quality:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install BLAST and Python dependencies
run: |
sudo apt-get update
sudo apt-get install -y ncbi-blast+
python -m pip install --upgrade pip
python -m pip install -e . pytest build twine
python -m pip check
- name: Run tests
run: MPLBACKEND=Agg python -m pytest test -q
- name: Check release artifacts
run: |
python -m build
python -m twine check --strict dist/*
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/openvax/phipkit.svg?branch=main)](https://travis-ci.com/openvax/phipkit)
[![Tests](https://github.com/openvax/phipkit/actions/workflows/tests.yml/badge.svg)](https://github.com/openvax/phipkit/actions/workflows/tests.yml)

# phipkit
PhIP-seq data analysis toolkit
Expand All @@ -16,6 +16,8 @@ control comparisons or other analyses appropriate to the study.

## Installation

PhIPKit requires Python 3.11 or newer.

All dependencies except BLAST (required by `phipkit-blast` command) can be
installed by pip:

Expand Down
2 changes: 1 addition & 1 deletion phipkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
phipkit - analysis package for Phage Immunoprecipitation Sequencing (phip-seq)
"""

__version__ = "0.0.2"
__version__ = "0.0.3"
from . import antigen_analysis
from . import call_antigens
from . import call_hits
Expand Down
2 changes: 1 addition & 1 deletion phipkit/antigen_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def plot_antigen(
title = antigen.split("OS")[0].strip()
title += "\nHits in %d of %d clones" % (
self.clone_by_sample_hits_matrix.reindex(
all_coverage_by_clone.index).fillna(0)[all_samples].any(1).sum(),
all_coverage_by_clone.index).fillna(0)[all_samples].any(axis=1).sum(),
len(all_coverage_by_clone))

pyplot.suptitle(title)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=77",
"wheel"
]
build-backend = "setuptools.build_meta"
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ project_urls =
Bug Tracker = https://github.com/openvax/phipkit/issues
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.14
Topic :: Scientific/Engineering :: Bio-Informatics
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
packages = find:
python_requires = >=3.3
python_requires = >=3.11
install_requires =
pandas
dna_features_viewer
Expand Down
6 changes: 6 additions & 0 deletions test/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import random
import shutil
import tempfile
import os

import numpy
import pandas
import pytest

from phipkit.blast import run_blast
from phipkit.score import compute_scores
Expand Down Expand Up @@ -74,6 +76,10 @@
TEST_PROTEINS["S_redundant"] = TEST_PROTEINS["S"]


@pytest.mark.skipif(
not all(shutil.which(name) for name in ("makeblastdb", "blastp")),
reason="NCBI BLAST executables are not installed",
)
def test_integrated(save_dir=None):
"""
Run the integration test.
Expand Down