Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
798d2c9
Edit homepage and description
samebdon Nov 25, 2025
9089335
Update README.md
samebdon Dec 1, 2025
5e5b4b9
Update pyproject.toml
samebdon Dec 1, 2025
f03782e
Merge branch 'master' into dev
samebdon Dec 1, 2025
f272203
Create build_pip.yml
samebdon Dec 2, 2025
d165185
Delete .github/workflows/build_pip.yml
samebdon Dec 2, 2025
4309bde
Update build.yml
samebdon Dec 2, 2025
98ec225
adding a rule on creating the directory if does not exist yet
KamilSJaron Dec 3, 2025
bf80e7f
develop->dev in build.yml
samebdon Dec 3, 2025
f5a8617
amend setup.py to force BinaryDistribution
samebdon Dec 3, 2025
89f8dfc
Merge pull request #239 from KamilSJaron/test-cibuildwheel
samebdon Dec 3, 2025
990ae29
Min macosx deployment target for c libraries in pyproject.toml
samebdon Dec 3, 2025
1fa9fc0
Merge pull request #240 from KamilSJaron/test-cibuildwheel
samebdon Dec 3, 2025
85568d5
Update README.md
samebdon Dec 4, 2025
286e5d8
Update README.md
samebdon Dec 4, 2025
045486e
Merge pull request #241 from KamilSJaron/dev
samebdon Dec 4, 2025
569e7b0
Update publish.yml with pypi pwd from secrets
samebdon Dec 4, 2025
8711c80
minimum required macos dev target
samebdon Dec 4, 2025
5548007
beta testing 0.5.3b for pypi
samebdon Dec 4, 2025
7655bb4
args.format -> plot task
samebdon Dec 4, 2025
0b3bd5f
version -> 3b
samebdon Dec 4, 2025
67e6c5b
svg support for people who really want it
samebdon Dec 4, 2025
268a412
Merge pull request #242 from KamilSJaron/test-cibuildwheel
samebdon Dec 4, 2025
56d4dc6
updating macos-13 to macos-15-intel due to depreciation
samebdon Dec 4, 2025
7b9b007
macos-13 depreciation
samebdon Dec 4, 2025
e6b1971
Merge pull request #243 from KamilSJaron/test-cibuildwheel
samebdon Dec 4, 2025
76378b4
python 3.13 and 3.14
samebdon Dec 4, 2025
ab41041
python 3.13 and 3.14
samebdon Dec 4, 2025
13ee31e
Update README.md
samebdon Dec 4, 2025
f45d5b8
Update pyproject.toml
samebdon Dec 4, 2025
2dbeb10
Merge pull request #244 from KamilSJaron/test-cibuildwheel
samebdon Dec 4, 2025
1356735
Typo cli.py
samebdon Dec 4, 2025
95f9621
remove dev branch build and testing
samebdon Dec 4, 2025
8e1e44d
API token obsolete with trusted publishing
samebdon Dec 4, 2025
65e4b68
add smudgeplot pypi url to publish environment
samebdon Dec 4, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Test

on:
push:
branches: [main, master, develop]
branches: [main, master]
pull_request:
branches: [main, master]

Expand All @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13","3.14"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14] # macos-13=x86, macos-14=arm64
os: [ubuntu-latest, macos-15-intel, macos-14] # macos-15-intel=x86, macos-14=arm64

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
os: [ubuntu-latest, macos-15-intel, macos-14]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,7 +48,9 @@ jobs:
name: Publish to PyPI
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
environment: pypi
environment:
name: pypi
url: https://pypi.org/project/smudgeplot
permissions:
id-token: write # Required for trusted publishing

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ endif
HET_KMERS_INST = $(INSTALL_PREFIX)/bin/hetmers $(INSTALL_PREFIX)/bin/extract_kmer_pairs

.PHONY : default
default: exec/hetmers exec/extract_kmer_pairs
default: exec/ exec/hetmers exec/extract_kmer_pairs

.PHONY : install
install : $(HET_KMERS_INST)

exec/:
mkdir -p exec

$(INSTALL_PREFIX)/bin/% : exec/%
install -C $< $(INSTALL_PREFIX)/bin

Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Smudgeplot

<font size ="4">**_Version: 0.5.1 Skylight_**</font>
<font size ="4">**_Version: 0.5.3 Skylight_**</font>

<font size ="4">**_Authors: Sam Ebdon, [Gene W Myers](https://github.com/thegenemyers) and [Kamil S. Jaron](https://github.com/KamilSJaron), Tianyi Ma._**</font>

We keep the same pythonic interface; the interface of this and previous versions are very similar and largely compatible.

Current state: RUNNING; beta-testing;

## Installation

This version of smudgeplot operates on FastK k-mer databases. The smudgeplot installation consists of a python package and C-backend to search for all the k-mer pairs (hetmers) and extract sequences of k-mer pairs (extract_kmer_pairs).
This version of smudgeplot operates on FastK k-mer databases. The smudgeplot installation consists of a python package and C-backend to search for all the k-mer pairs (smudgeplot hetmers) and extract sequences of k-mer pairs (smudgeplot extract).

We recommend installing smudgeplot within a [conda](https://conda-forge.org/download/) environment.

Expand All @@ -19,7 +15,10 @@ We recommend installing smudgeplot within a [conda](https://conda-forge.org/down
conda create -n smudgeplot && conda activate smudgeplot
conda install pip

#download and install
# install via pypi
pip install smudgeplot

# or download and install directly. See below if you need to compile the C dependencies.
git clone https://github.com/KamilSJaron/smudgeplot.git
cd smudgeplot && pip install .
smudgeplot -h # check installation succeeded
Expand All @@ -31,14 +30,22 @@ Note the smudgeplot version downloadable from conda itself is not currently up t

### Compiling the C code

The process above install everything including compilation of the C backend. If you would like to know how to compile the code yourself you can simply run
The process above should install everything including compilation of the C backend. If you need or would like to know how to compile the code yourself you can simply run

```
make
```

This will not, however, install the smudgeplot python package.

### Pypi installation [EXPERIMENTAL]

We are working on packaging smudgeplot for pypi. You are welcome to try installing from pypi if you are interested and please open an issue if you have problems. If it fails please follow the main instructions above to install for now.

```
pip install smudgeplot
```

## Example run on Saccharomyces data

Requires ~2.1GB of space and `FastK` and `smudgeplot` installed.
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "smudgeplot"
version = "0.5.1"
version = "0.5.3"
description = "Inference of ploidy and heterozygosity structure using whole genome sequencing data"
readme = "README.md"
license = "Apache-2.0"
Expand Down Expand Up @@ -38,6 +38,8 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -67,6 +69,7 @@ smudgeplot = ["bin/*"]
# Skip 32-bit, PyPy, musllinux, and Windows (no Windows support for now)
skip = ["*-win32", "*-win_amd64", "*-manylinux_i686", "pp*", "*-musllinux*"]
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }

# Test that the CLI works after building
test-command = "smudgeplot --version"
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop

from setuptools.dist import Distribution

class CompilationError(Exception):
"""Raised when C binary compilation fails."""
Expand Down Expand Up @@ -132,10 +132,14 @@ def run(self):
print("Continuing with editable install, but binaries will not work.", file=sys.stderr)
super().run()

class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True

setup(
cmdclass={
"build_py": BuildPyWithBinaries,
"develop": DevelopWithBinaries,
}
},
distclass=BinaryDistribution
)
6 changes: 3 additions & 3 deletions src/smudgeplot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self):
tasks: cutoff Calculate meaningful values for lower kmer histogram cutoff.
hetmers Calculate unique kmer pairs from a FastK k-mer database.
peak_aggregation Agregates smudges using local aggregation algorithm; prints assignments to stdout.
plot Generate 2d histogram; infere ploidy and plot a smudgeplot.
plot Generate 2d histogram; infer ploidy and plot a smudgeplot.
all Runs all the steps (with default options)
extract Extract kmer pair sequences from a FastK k-mer database.
"""
Expand Down Expand Up @@ -301,7 +301,7 @@ def add_plotting_arguments(self, argparser):
"--format",
default="png",
help="Output format for the plots (default png)",
choices=["pdf", "png"],
choices=["pdf", "png", "svg"],
)
argparser.add_argument(
"--json_report",
Expand Down Expand Up @@ -372,7 +372,7 @@ def main():
smudge_tab = smg.read_csv(args.smudgefile, sep="\t", names=["structure", "size", "rel_size"])
cov_tab = smg.load_hetmers(args.infile)
smudgeplot_data = smg.SmudgeplotData(cov_tab, smudge_tab, args.n)
smg.prepare_smudgeplot_data_for_plotting(smudgeplot_data, args.o, title, upper_ylim=args.ylim)
smg.prepare_smudgeplot_data_for_plotting(smudgeplot_data, args.o, title, upper_ylim=args.ylim, fmt=args.format)
smg.smudgeplot(smudgeplot_data, log=False, palette=args.col_ramp, invert_cols=args.invert_cols)
smg.smudgeplot(smudgeplot_data, log=True, palette=args.col_ramp, invert_cols=args.invert_cols)

Expand Down