Metadata-Version: 2.4
Name: viralunity
Version: 1.5.0
Summary: A pipeline for viral metagenomics analysis.
Author: Felippe Nacif
Author-email: Filipe Moreira <filiperomero2@gmail.com>
License: MIT License
        
        Copyright (c) 2021-2026 filiperomero2
        
        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/InstitutoTodosPelaSaude/ViralUnity
Project-URL: Documentation, https://viralunity.readthedocs.io/en/latest/
Project-URL: Changelog, https://github.com/InstitutoTodosPelaSaude/ViralUnity/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/InstitutoTodosPelaSaude/ViralUnity/issues
Keywords: metagenomics,viral,high-throughput sequencing,bioinformatics,viral genome assembly
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: <3.12,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0
Requires-Dist: click>=8.0
Requires-Dist: biopython>=1.81
Requires-Dist: snakemake<8,>=7.32
Requires-Dist: pandas>=1.5
Requires-Dist: pulp<2.8
Requires-Dist: plotly>=5.0
Requires-Dist: jinja2>=3.0
Provides-Extra: dev
Requires-Dist: black<27,>=26; extra == "dev"
Requires-Dist: pytest>=9.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Dynamic: license-file

# ViralUnity

ViralUnity is a tool for analysing viral high-throughput sequencing data. It is a Python package that orchestrates Snakemake workflows for data quality control, taxonomic assignment, and reference genome assembly. ViralUnity runs on *nix systems and can process entire sequencing runs in minimal time on a regular computer.

> **Full documentation:** <https://viralunity.readthedocs.io/en/latest/>

## Installation

Install the ViralUnity CLI from PyPI:

```bash
pip install viralunity
```

> **conda/mamba is still required at runtime.** ViralUnity orchestrates Snakemake, which
> builds the per-rule tool environments (aligners, classifiers, assemblers) via
> `--use-conda` on first run. Make sure conda or mamba is installed and on your `PATH`;
> you can pre-build those environments up front with `viralunity setup --pipelines all`.

To install from source for development instead:

```bash
git clone https://github.com/InstitutoTodosPelaSaude/ViralUnity.git
cd ViralUnity
conda env create -n viralunity -f environment.yml
conda activate viralunity
pip install -e .
```

Per-rule conda environments under `viralunity/scripts/envs/` are managed automatically by Snakemake; the top-level `environment.yml` only installs ViralUnity itself and its core runtime dependencies.

## Quick start

Six top-level subcommands are exposed via the `viralunity` CLI:

```bash
viralunity create-samplesheet --input <runs-dir> --output samples.csv
viralunity get-databases all --path databases/
viralunity setup --pipelines all                # pre-build per-rule conda envs
viralunity consensus illumina --sample-sheet samples.csv --reference ref.fasta --output run/
viralunity meta      illumina --sample-sheet samples.csv --kraken2-database <db> --output run/
viralunity build-deacon-index --input host.fasta --output host.dcn
```

`get-databases all` grabs the four common databases; the others are separate subcommands
(`virus-genome`, `deacon-index`, `host-genome`, `nr` for `meta --run-nr-validation`, and the
`clean-protein-fasta` utility) — run `viralunity get-databases --help` for the full list.

Global options: `--log-level {DEBUG,INFO,WARNING,ERROR}` and `--json-logs`
(e.g. `viralunity --log-level DEBUG meta ...`).

Each subcommand has its own `--help`; the same information is exhaustively documented in the `docs/` Sphinx site (rendered on ReadTheDocs at the link above).

## Tests

```bash
make test
```

This installs the package in editable mode (if not already installed) and runs the `unittest` suite under `test/`. Snakemake dry-run tests live in `test/viralunity_dryrun_test.py` and use `pytest`.

## Citation

A scientific publication describing this pipeline is being prepared. Meanwhile, please cite this repository. Primary references for upstream tools (fastp, MultiQC, Minimap2, Samtools, BCFtools, BEDtools, gofasta, MEGAHIT, Racon, BLAST, Kraken2, Krona, DIAMOND, Clair3, Medaka, Deacon) are listed in the ReadTheDocs site.

## License

MIT — see `LICENSE`.
