From a8245a8794ce358f015449719460dfc622f3c895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czy=C5=BC?= Date: Sun, 3 Nov 2024 15:02:37 +0100 Subject: [PATCH] Release the new version (#35) --- README.md | 17 ++++++++-- pyproject.toml | 3 +- workflows/README.md | 32 ++++++++++++------- workflows/exclusivity/gbm_reproducibility.smk | 3 +- 4 files changed, 38 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 3751828..fd1ad74 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![build](https://github.com/cbg-ethz/Jnotype/actions/workflows/test.yml/badge.svg)](https://github.com/cbg-ethz/Jnotype/actions/workflows/test.yml) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![PyPI Latest Release](https://img.shields.io/pypi/v/jnotype.svg)](https://pypi.org/project/jnotype/) # Jnotype @@ -12,18 +13,28 @@ This includes genotype data, binary images, and data sets used in ecology. - **Source code:** [https://github.com/cbg-ethz/Jnotype](https://github.com/cbg-ethz/Jnotype) - **Bug reports:** [https://github.com/cbg-ethz/Jnotype/issues](https://github.com/cbg-ethz/Jnotype/issues) + - **PyPI package**: [https://pypi.org/project/jnotype/](https://pypi.org/project/jnotype/) ## Installation -**Note:** The package has not reached a stable API yet. Frequent changes may appear +**Note:** The package has not reached a stable API yet. Frequent changes may appear. -We recommend setting up a new [virtual environment](https://docs.python.org/3/library/venv.html). You can install the package using PIP: +We recommend setting up a new [virtual environment](https://docs.python.org/3/library/venv.html). +You can install the released version of the package from PyPI: + +```bash +$ python -m pip install jnotype +``` + +or install the development version from GitHub: ```bash $ python -m pip install 'jnotype @ git+https://github.com/cbg-ethz/jnotype' ``` -However, this will install the CPU version of JAX. +### Using GPU + +Instructions above install the CPU version of JAX. To use GPU, you may need to follow the [official JAX installation tutorial](https://github.com/google/jax#pip-installation-gpu-cuda-installed-via-pip-easier). ## Getting started diff --git a/pyproject.toml b/pyproject.toml index 0fba531..249d360 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "jnotype" version = "0.1.0" -description = "" +description = "Jnotype: probabilistic modeling of high-dimensional binary data." authors = ["Paweł Czyż"] readme = "README.md" packages = [{include = "jnotype", from = "src"}] @@ -17,6 +17,7 @@ polyagamma = "^1.3.5" arviz = "^0.15.1" xarray = "^2023.3.0" tqdm = "^4.65.0" +numpyro = "^0.15.3" [tool.poetry.group.dev] diff --git a/workflows/README.md b/workflows/README.md index 0b02595..be16e62 100644 --- a/workflows/README.md +++ b/workflows/README.md @@ -4,7 +4,9 @@ This directory presents workflows associated with different publications. Note that as the package evolved, some workflows may have been deprecated. To rerun the analysis, it's then important to rewind the changes to the right point in the `git` history. -This can be done by: +We mark these points with tags: if the tag is not provided, the workflows for a given project are compatible with the current version of the package. + +Rewinding the changes to a particular tag can be accomplished by running: ```bash $ git checkout tags/TAG_NAME @@ -12,28 +14,34 @@ $ git checkout tags/TAG_NAME where `TAG_NAME` represents the right point in time for a particular project. + ## Projects -### Labeled Bayesian Pyramids +### Bayesian modeling of mutual exclusivity +[![bioRxiv](https://img.shields.io/badge/bioRxiv-2024.10.29.620937-b31b1b.svg)](https://doi.org/10.1101/2024.10.29.620937) -Directory: `pyramids` -Tag: `pyramids` (TODO: Not existing yet...) +**Directory:** `exclusivity` +**Tag:** None -In this project we looked at labeled Bayesian pyramids. +Bayesian workflow employed to model mutual exclusivity patterns. This project is accompanied by the manuscript [*Bayesian modeling of mutual exclusivity patterns*](https://doi.org/10.1101/2024.10.29.620937). -### Bayesian modeling of mutual exclusivity +### Labeled Bayesian Pyramids + +**Directory:** `pyramids` -Directory: `exclusivity` -Tag: `exclusivity` (TODO: Not existing yet...) +**Tag:** None -Bayesian workflow employed to model mutual exclusivity patterns. +In this project we looked at labeled Bayesian pyramids, which introduce fixed effects to the framework of [Bayesian pyramids](https://academic.oup.com/jrsssb/article/85/2/399/7074362) of Yuqi Gu and David Dunson. +As such, the labeled Bayesian pyramids are a subclass of dependent mixture models and can be used for exploratory data analysis of cancer genotypes. +The manuscript will be released in late 2024. ### Conditional Bernoulli mixture model -Directory: `cbmm` -Tag: `cbmm` (TODO: Not existing yet.) +**Directory:** `cbmm` -In this project we propose the conditional Bernoulli mixture model. +**Tag:** None +In this project we propose the conditional Bernoulli mixture model and use them to model cancer genomes. +The manuscript will be released in early 2025. diff --git a/workflows/exclusivity/gbm_reproducibility.smk b/workflows/exclusivity/gbm_reproducibility.smk index 33b8d28..7310c54 100644 --- a/workflows/exclusivity/gbm_reproducibility.smk +++ b/workflows/exclusivity/gbm_reproducibility.smk @@ -579,7 +579,8 @@ rule plot_posterior_predictive_check: samples=posterior_samples, ) data_stat = stat_fn(data) - fig, ax = plt.subplots(figsize=(3, 2), dpi=300) + fig, ax = subplots_from_axsize(axsize=(3, 2), dpi=300, left=0.4) + ax.spines[["top", "right"]].set_visible(False) suffix = " (residuals)" if residuals else "" fig.suptitle(stat_title + suffix) plot_summary_statistic(