Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release the new version #35

Merged
merged 2 commits into from
Nov 3, 2024
Merged
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
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}]
Expand All @@ -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]
Expand Down
32 changes: 20 additions & 12 deletions workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,44 @@ 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
```

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.
3 changes: 2 additions & 1 deletion workflows/exclusivity/gbm_reproducibility.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading