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
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read
packages: write

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y poppler-utils

- name: Upgrade pip, setuptools, and packaging
run: |
python -m pip install --upgrade pip setuptools packaging

- name: Cache src directory
uses: actions/cache@v4
with:
path: ./src/
key: ${{ runner.os }}-src-grch37
restore-keys: |
${{ runner.os }}-src-

- name: Download GRCh37.tar.gz if not present
run: |
if [ ! -f ./src/GRCh37.tar.gz ]; then
wget --connect-timeout=10 --tries=20 ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerMatrixGenerator/GRCh37.tar.gz -P ./src/
fi

- name: Install package with tests
run: |
pip install .[tests]

- name: Install genome
run: |
python install_genome.py ${{ github.workspace }}/src/

- name: Run unit tests
run: |
pytest tests

- name: Run integration test
run: |
python3 test.py

- name: Build and push Docker image
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.python-version == '3.12'
run: |
echo "Starting Docker deployment to GHCR for sigprofilersuite..."

VERSION_TAG=$(grep "VERSION = " setup.py | cut -d'"' -f2)

# Get the repository name and convert it to lowercase
REPO_NAME=$(basename ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
IMAGE_NAME="ghcr.io/sigprofilersuite/$REPO_NAME"

echo "Building version: $VERSION_TAG for image: $IMAGE_NAME"

echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
--username "${{ github.actor }}" \
--password-stdin

docker build \
--build-arg COMMIT_SHA=${{ github.sha }} \
-t $IMAGE_NAME:$VERSION_TAG \
-t $IMAGE_NAME:latest .

docker push $IMAGE_NAME:$VERSION_TAG
docker push $IMAGE_NAME:latest

echo "Docker deployment to GHCR successful"
69 changes: 0 additions & 69 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.1.2] - 2026-01-23
### Fixed
- Fixed Python 3.12 compatibility issues with pandas DataFrame/Series indexing and method calls:
- Updated `to_csv()` calls to use keyword arguments (`sep="\t"`) instead of positional arguments
- Changed DataFrame/Series index access from `[0]` to `.iloc[0]` throughout the codebase
- Fixed dtype assignment when converting columns to strings with "%" suffix

### Changed
- Switched CI/CD from Travis CI to GitHub Actions. Updated README badge to reflect the new CI/CD platform.

## [1.1.1] - 2026-01-06
### Added
- Added missing COSMIC v3.5 signature files: exome versions for all supported genome builds, mm39 genome build signatures, and rn7 genome build signatures.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://osf.io/mz79v/wiki/home/)
[![License](https://img.shields.io/badge/License-BSD\%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![Build Status](https://api.travis-ci.com/AlexandrovLab/SigProfilerAssignment.svg?branch=main)](https://app.travis-ci.com/AlexandrovLab/SigProfilerAssignment)
[![CI](https://github.com/SigProfilerSuite/SigProfilerAssignment/actions/workflows/ci.yml/badge.svg)](https://github.com/SigProfilerSuite/SigProfilerAssignment/actions/workflows/ci.yml)

<img src="SigProfilerAssignment/figures/SigProfilerAssignment.png" alt="drawing" width="1000"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ def plot_7_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ def plot_6_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ def plot_6_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cos_dist = statistics["Cosine Distance"][0]
cor_dist = statistics["Correlation Distance"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cos_dist = statistics["Cosine Distance"].iloc[0]
cor_dist = statistics["Correlation Distance"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ def plot_6_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ def plot_6_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ def plot_6_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ def plot_7_plus(bases, project, c_draw, denovo_plots_dict, basis_plots_dict):
# c_draw - (Canvas) The canvas to draw the graph decomposition on.
# statistics - (Pandas Dataframe) Dataframe w/ calculations
def draw_statistics(c_draw, statistics, sig_version, custom_text):
cos_sim = statistics["Cosine Similarity"][0]
cor_coeff = statistics["Correlation Coefficient"][0]
l1_norm_percent = statistics["L1 Norm %"][0]
l2_norm_percent = statistics["L2 Norm %"][0]
kl_divergence = statistics["KL Divergence"][0]
cos_sim = statistics["Cosine Similarity"].iloc[0]
cor_coeff = statistics["Correlation Coefficient"].iloc[0]
l1_norm_percent = statistics["L1 Norm %"].iloc[0]
l2_norm_percent = statistics["L2 Norm %"].iloc[0]
kl_divergence = statistics["KL Divergence"].iloc[0]

c_draw.drawString(
WIDTH_GAP + 15,
Expand Down
Loading