Metadata-Version: 2.4
Name: polyase
Version: 1.3.5
Summary: A package for analyzing allele-specific expression in polyploid organisms
License: MIT
License-File: LICENSE
Keywords: bioinformatics,polyploid,allele-specific,expression
Author: nadja.franziska.nolte@nib.si
Requires-Python: >=3.11,<3.13
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: dev
Provides-Extra: docs
Requires-Dist: anndata (>=0.12.6,<0.13.0)
Requires-Dist: bluepy (>=1.3.0) ; extra == "docs"
Requires-Dist: h5py (>=3.15.1,<4.0.0)
Requires-Dist: isotools (==2.0.0)
Requires-Dist: matplotlib (>=3.10.7,<4.0.0)
Requires-Dist: nbformat (>=4.2.0)
Requires-Dist: nbsphinx ; extra == "docs"
Requires-Dist: numpy (>=2.3.4,<3.0.0)
Requires-Dist: numpy (>=2.3.4,<3.0.0) ; extra == "dev"
Requires-Dist: pandas (>=2.3.3,<3.0.0)
Requires-Dist: plotly (>=5.0.0)
Requires-Dist: pytest (>=9.0.0,<10.0.0) ; extra == "dev"
Requires-Dist: rnapysoforms (>=1.3.1,<2.0.0)
Requires-Dist: scipy (>=1.16.3,<2.0.0)
Requires-Dist: seaborn (>=0.13.2,<0.14.0)
Requires-Dist: sphinx (>=4.0.0) ; extra == "docs"
Requires-Dist: sphinx-mdinclude ; extra == "docs"
Requires-Dist: sphinx-rtd-theme ; extra == "docs"
Project-URL: Homepage, https://polyase.readthedocs.io/en/latest/
Project-URL: Issues, https://github.com/nadjano/polyase/issues
Project-URL: Repository, https://github.com/nadjano/polyase
Description-Content-Type: text/markdown

<img style="width: 50%;" alt="polyASE_logo" src="https://github.com/user-attachments/assets/4d3dea85-c1a6-4707-a498-0e969a5e6c07" />

# PolyASE

A Python package for analyzing allele-specific expression in polyploid organisms.
This package is part of the [LongPolyASE](https://polyase.readthedocs.io/en/latest/index.html) framework for long-read RNA-seq allele-specific expression analysis in polyploid organisms.
Please see [syntelogfinder](https://github.com/NIB-SI/syntelogfinder) and [longrnaseq](https://github.com/NIB-SI/longrnaseq) for generating the input data for polyase.

<img style="width: 30%;" alt="polyase_analysis" src="https://github.com/user-attachments/assets/a334a3a9-ac6f-403e-8d3e-a2f4b4bbbb6d" />

## Installation

PolyASE is avialble on [PyPI](https://pypi.org/project/polyase/).
You can install polyase using pip:

<pre><code>pip install polyase</code></pre>

Pyranges must be installed manually for reading GTF files (most of the analysis can be run without pyranges).

To create a conda environemnt for running juypter notebook:

<pre><code>conda create -n polyase python=3.12 ipykernel pip && conda activate polyase && pip install polyase && pip install pyranges</code></pre>


## Docker

A Docker image with PolyASE and JupyterLab is available on Docker Hub:

```bash
docker run --rm -p 8888:8888 \
  -v $(pwd)/notebooks:/home/user/notebooks \
  nadjano/polyase:1.3.3
```

Then open http://localhost:8888 in your browser.

## Tutorial

A tutorial for analysis of allele-specific gene and isoform expression in tetraploid potato can be found [here](https://polyase.readthedocs.io/en/latest/tutorial_potato.html).
The input data for the tutorial can be found [here](https://zenodo.org/records/17590760/files/polyase_tutorial_atlantic.zip?download=1&preview=1).

### Running the tutorial within Docker

1. Download the tutorial notebook and input data:
   - Notebook (download the raw file): https://github.com/NIB-SI/polyase/blob/master/docs/source/potato_polyase.ipynb
   - Input data: https://zenodo.org/records/17590760/files/polyase_tutorial_atlantic.zip?download=1

2. Unzip the input data and place the notebook and all data files into a local `notebooks/` folder.

3. Start the container, mounting your `notebooks/` folder:

```bash
docker run --rm -p 8888:8888 \
  -v $(pwd)/notebooks:/home/user/notebooks \
  nadjano/polyase:1.3.3
```

4. Open http://localhost:8888 in your browser, open `potato_polyase.ipynb`, and update any file paths in the notebook to `/home/user/notebooks/`.

### Troubleshooting

if you get an error installing polyase with pip for some dependencies, e.g.:

- pyranges (a known issue on mac and windows).
- Failed to build llvmlit and numba

```
conda install -c conda-forge numba
conda install -c bioconda pyranges
```

## Citation

