Metadata-Version: 2.1
Name: fusor
Version: 0.1.0
Summary: Computable object representation and validation for gene fusions
Author-email: Alex Wagner <alex.wagner@nationwidechildrens.org>, Kori Kuzma <kori.kuzma@nationwidechildrens.org>, James Stevenson <james.stevenson@nationwidechildrens.org>, Katie Stahl <kathryn.stahl@nationwidechildrens.org>, Jeremy Arbesfeld <jeremy.arbesfeld@nationwidechildrens.org>
License: 
        MIT License
        
        Copyright (c) 2021-2023 VICC
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/cancervariants/fusor
Project-URL: Documentation, https://github.com/cancervariants/fusor
Project-URL: Changelog, https://github.com/cancervariants/fusor/releases
Project-URL: Source, https://github.com/cancervariants/fusor
Project-URL: Bug Tracker, https://github.com/cancervariants/fusor/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pydantic
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic ==2.*
Requires-Dist: ga4gh.vrsatile.pydantic ~=0.2.0
Requires-Dist: ga4gh.vrs ~=0.8.1
Requires-Dist: biocommons.seqrepo
Requires-Dist: gene-normalizer ~=0.1.40-dev1
Requires-Dist: cool-seq-tool ~=0.3.0-dev1
Provides-Extra: dev
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: pytest-asyncio ; extra == 'dev'
Requires-Dist: ruff ==0.2.0 ; extra == 'dev'
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'
Requires-Dist: pytest-asyncio ; extra == 'tests'

# FUSOR

[![image](https://img.shields.io/pypi/v/fusor.svg)](https://pypi.python.org/pypi/fusor)
[![image](https://img.shields.io/pypi/l/fusor.svg)](https://pypi.python.org/pypi/fusor)
[![image](https://img.shields.io/pypi/pyversions/fusor.svg)](https://pypi.python.org/pypi/fusor)
[![Actions status](https://github.com/cancervariants/fusor/actions/workflows/checks.yaml/badge.svg)](https://github.com/cancervariants/fusor/actions/checks.yaml)

<!-- description -->
FUSOR (**FUS**ion **O**bject **R**epresentation) provides modeling and validation tools for representing gene fusions in a flexible, computable structure.
<!-- /description -->

## Installation

### Package

To install FUSOR:
```shell
python3 -m pip install fusor
```

### SeqRepo and UTA

FUSOR relies on data from [SeqRepo](https://github.com/biocommons/seqrepo) and the [Universal Transcript Archive (UTA)](https://github.com/biocommons/uta), supplied via [Cool-Seq-Tool](https://github.com/genomicmedlab/cool-seq-tool). See the [Cool-Seq-Tool installation instructions](https://coolseqtool.readthedocs.io/en/latest/install.html) for specifics on setting up SeqRepo and UTA.

To connect to the UTA database, you can use the default url (`postgresql://uta_admin@localhost:5433/uta/uta_20210129`). If you use the default url, you must either set the password using environment variable `UTA_PASSWORD` or setting the parameter `db_pwd` in the `FUSOR` class.

If you do not wish to use the default, you must set the environment variable `UTA_DB_URL` which has the format of `driver://user:pass@host:port/database/schema`.

### Gene Normalizer

`FUSOR` also relies on data from the [Gene Normalizer](https://github.com/cancervariants/gene-normalization), which you must download yourself. See the [README](https://github.com/cancervariants/gene-normalization#readme) for deploying the gene database.

## Development

### Setup

Clone the repo:

```shell
git clone https://github.com/cancervariants/fusor
cd fusor
```

Create a virtual environment, and activate it:

```shell
python3 -m virtualenv venv
source venv/bin/activate
```

Install test and dev dependencies:

```shell
python3 -m pip install -e '.[dev,tests]'
```

### Style

Code style is managed by [Ruff](https://github.com/astral-sh/ruff) and checked prior to commit.

```shell
python3 -m ruff format . && python3 -m ruff check --fix .
```

We use [pre-commit](https://pre-commit.com/#usage) to run conformance tests.

This performs checks for:

* Code style
* File endings
* Added large files
* AWS credentials
* Private keys

Before your first commit, run:

```shell
pre-commit install
```

### Unit tests

Unit testing is provided via `pytest`:

```shell
pytest
```
