Skip to content
Closed
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
8 changes: 4 additions & 4 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,13 +50,13 @@ 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

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
uses: pypa/cibuildwheel@v3.3.1
# Config is read from pyproject.toml [tool.cibuildwheel]

- uses: actions/upload-artifact@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
2 changes: 1 addition & 1 deletion playground/alternative_fitting/pair_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
####

parser = argparse.ArgumentParser()
parser.add_argument('infile', nargs='?', help='name of the input tsv file with covarages and frequencies.')
parser.add_argument('infile', nargs='?', help='name of the input tsv file with coverages and frequencies.')
parser.add_argument('-nf', '-noise_filter', help='Do not agregate into smudge k-mer pairs with frequency lower than this parameter', type=int, default=50)
parser.add_argument('-d', '-distance', help='Manthattan distance of k-mer pairs that are considered neioboring for the local agregation purposes.', type=int, default=5)
parser.add_argument('--mask_errors', help='instead of reporting assignments to individual smudges, just remove all monotonically decreasing points from the error line', action="store_true", default = False)
Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
requires = [
"setuptools>=61.0",
"wheel",
]
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 +41,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 @@ -66,7 +71,8 @@ smudgeplot = ["bin/*"]
[tool.cibuildwheel]
# 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-*"]
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"]
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
)
2 changes: 1 addition & 1 deletion src/lib/PloidyList.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ int main(int argc, char *argv[])
int flags[128];
char *eptr;

ARG_INIT("PloidyList");
ARG_INIT("extract_kmer_pairs");

OUT = NULL;
ETHRESH = 4;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/PloidyPlot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ int main(int argc, char *argv[])
int flags[128];
char *eptr;

ARG_INIT("PloidyPlot");
ARG_INIT("hetmers");

OUT = NULL;
ETHRESH = 4;
Expand Down
Loading
Loading