Changelog¶
All notable changes to pyprego will be documented in this file.
The format is based on Keep a Changelog.
[0.0.4] - 2026-09-02¶
Added¶
calc_freq_local_pwm: score every motif in a database against a per-position base frequency matrix at every start position, returning a motifs x positions array. Wherecompute_local_pwmscores one concrete sequence, this scores an ensemble summarised by its per-position nucleotide distribution. Two modes:combine="multiply"(log of the expected likelihood, giving every motif the same score on a flat ensemble, so rows are comparable) andcombine="sum"(expected log-likelihood, exact for any joint distribution over positions). Both reduce tocompute_local_pwmwhen the frequency matrix is one-hot. Port of the R prego function of the same name, verified against it to 7.1e-14 on both bundled databases, in both modes and both strand settings.n_workersparameter forregress_pwm(multi_kmers=True), parallelising candidate-k-mer evaluation over a thread pool. Defaults to 1, so existing calls are unchanged.
Changed¶
pymishaandlogomakerare now core dependencies rather than optional extras.
Removed¶
- The
genomic,vizandallextras. Their contents are now installed by default, sopip install pypregocovers whatpyprego[all]used to.
Dependencies¶
threadpoolctl>=3.0added, used to keep BLAS single-threaded inside worker threads. Falls back to theOMP_NUM_THREADSenvironment variable when absent.
[0.0.2] - 2026-04-03¶
Fixed¶
- macOS build: disable OpenMP on Darwin (clang lacks native support)
- All ruff lint and format issues resolved
Added¶
- CI/CD: lint, test, docs, PyPI publish, conda publish workflows
- MkDocs documentation site with 4 tutorial vignettes
- Shipping script with remote guardrails
- Pre-commit hooks (ruff, trailing whitespace)
- Conda recipe, MANIFEST.in, LICENSE
- README badges (PyPI, CI, Docs, License)
[0.0.1] - 2025-01-01¶
Added¶
- Initial Python port of the R prego package.
regress_pwmfor iterative PWM regression with k-mer seeding.regress_multiple_motifsfor discovering multiple motifs sequentially.regress_pwm_clustersfor cluster-specific motif regression.regress_pwm_cvfor cross-validated regression.compute_pwmandcompute_local_pwmfor PWM scoring.screen_kmers,kmer_matrix, andgenerate_kmersfor k-mer analysis.- PSSM utilities:
pssm_cor,pssm_diff,pssm_match,pssm_trim,pssm_rc,bits_per_pos,consensus_from_pssm. - Motif database support via
MotifDB,create_motif_db,screen_pwm, and bundled JASPAR/HOMER datasets. - Visualization:
plot_pssm_logo,plot_spat_model,plot_regression_prediction,plot_regression_qc. - Genomic integration (requires pymisha):
intervals_to_seq,gextract_pwm,gextract_local_pwm. - Model export/import via JSON:
export_regression_model,load_regression_model. - Optional C extension for vectorized energy computation and k-mer counting.