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
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Create Release from setup.py

on:
pull_request:
types:
- closed
branches:
- master

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"

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


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

- name: Extract version from setup.py
id: get_version
run: |
VERSION=$(python setup.py --version)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Get latest release tag
id: get_last_release
run: |
latest=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest \
| jq -r '.tag_name' | sed 's/^v//')
echo "LATEST_RELEASE=$latest" >> $GITHUB_ENV

- name: Check release version
run: |
echo "New version: ${{ steps.get_version.outputs.VERSION }}"
echo "Latest release: $LATEST_RELEASE"
python - <<EOF
from packaging.version import parse

new_version = parse("${{ steps.get_version.outputs.VERSION }}")
latest_version = parse("$LATEST_RELEASE")

if new_version <= latest_version:
raise SystemExit(f"Error: New version ({new_version}) is not higher than latest release ({latest_version})")
EOF

- name: Generate CHANGELOG.md with git-cliff
run: |
git-cliff --unreleased --strip all --tag "v${{ steps.get_version.outputs.VERSION }}" > CHANGELOG.md

- name: Create Git tag
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag v${{ steps.get_version.outputs.VERSION }}
git push origin v${{ steps.get_version.outputs.VERSION }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include SigProfilerClusters/controllers/*
8 changes: 6 additions & 2 deletions SigProfilerClusters/SigProfilerClusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@ def analysis(
max_cpu=None,
subClassify=False,
variant_caller="standard",
tumor_vaf_column = 10,
vaf_field = "AF",
includedVAFs=True,
includedCCFs=False,
windowSize=1000000,
Expand Down Expand Up @@ -674,7 +676,9 @@ def analysis(
-> caveman: If your VAF is recorded in the 11th column of your VCF as the last number of the colon delimited values, set variant_caller="caveman".
-> standard: If your VAF is recorded in the 8th or 10th column of your VCF as VAF=xx or AF=xx, set variant_caller="standard".
-> mutect2: If your VAF is recorded in the 10th or 11th column of your VCF as AF=xx, set variant_caller="mutect2".

-> custom: Configure tumor_vaf_column as 0 based index (Default = 10) and the vaf_field tag (Default = AF)
tumor_vaf_column -> Activated when variant_caller = "custom". 0 based index of the column in VCF containing VAF (Default 10)
vaf_field -> Activated when variant_caller = "custom". Set the VAF tag (Default AF)

includedVAFs -> optional parameter that informs the tool of the inclusion of VAFs in the dataset (boolean; default=True)
includedCCFs -> optional parameter that informs the tool of the inclusion of cancer cell fractions in the dataset (boolean; default=True)
Expand Down Expand Up @@ -1348,7 +1352,7 @@ def analysis(
print("Beginning subclassification of clustered mutations...", end="")
if includedVAFs:
classifyFunctions.pullVaf(
project, input_path, variant_caller, correction
project, input_path, variant_caller, tumor_vaf_column, vaf_field, correction
)
sys.stderr.close()
sys.stderr = open(error_file, "a")
Expand Down
7 changes: 6 additions & 1 deletion SigProfilerClusters/SigProfilerHotSpots.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ def analysis(
max_cpu=None,
subClassify=False,
variant_caller="standard",
tumor_vaf_column=10,
vaf_field = "AF",
includedVAFs=True,
windowSize=1000000,
bedRanges=None,
Expand Down Expand Up @@ -511,6 +513,9 @@ def analysis(
-> caveman: If your VAF is recorded in the 11th column of your VCF as the last number of the colon delimited values, set variant_caller="caveman".
-> standard: If your VAF is recorded in the 8th or 10th column of your VCF as VAF=xx or AF=xx, set variant_caller="standard".
-> mutect2: If your VAF is recorded in the 10th or 11th column of your VCF as AF=xx, set variant_caller="mutect2".
-> custom: Configure tumor_vaf_column as 0 based index (Default = 10) and the vaf_field tag (Default = AF)
tumor_vaf_column -> Activated when variant_caller = "custom". 0 based index of the column in VCF containing VAF (Default 10)
vaf_field -> Activated when variant_caller = "custom". Set the VAF tag (Default AF)
includedVAFs -> optional parameter that informs the tool of the inclusion of VAFs in the dataset (boolean; default=True)
windowSize -> the size of the window used for correcting the IMDs based upon mutational density within a given genomic range (integer; default=10000000)
plotIMDfigure -> optional parameter that generates IMD and mutational spectra plots for each sample (boolean; default=True).
Expand Down Expand Up @@ -1166,7 +1171,7 @@ def analysis(
print("Beginning subclassification of clustered mutations...", end="")
if includedVAFs:
classifyFunctions.pullVaf(
project, input_path, variant_caller, correction
project, input_path, variant_caller, tumor_vaf_column, vaf_field, correction
)
sys.stderr.close()
sys.stderr = open(error_file, "a")
Expand Down
Loading