Metadata-Version: 2.4
Name: svforge
Version: 1.0.1
Summary: Synthetic VCF generator for structural variants (Manta, DELLY) with controlled variability and realistic artefact injection
Project-URL: Homepage, https://github.com/pieetie/svforge
Project-URL: Repository, https://github.com/pieetie/svforge
Project-URL: Issues, https://github.com/pieetie/svforge/issues
Project-URL: Changelog, https://github.com/pieetie/svforge/blob/main/CHANGELOG.md
Author: Pierre NATIEZ
License: MIT License
        
        Copyright (c) 2026 Pierre NATIEZ
        
        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.
License-File: LICENSE
Keywords: bioinformatics,delly,manta,structural-variants,synthetic-data,testing,vcf
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Requires-Dist: intervaltree>=3.1
Requires-Dist: pysam>=0.22
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=5.0; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

<h1>
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/logos-no-background/logo-red-and-white.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/logos-no-background/logo-red-and-black.svg">
  <img src="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/logos-no-background/logo-red-and-black.svg" alt="svForge logo" width="450">
</picture>
</h1>

### Generate synthetic SV VCFs to stress-test your pipelines with confidence

[![PyPI version](https://img.shields.io/pypi/v/svforge.svg)](https://pypi.org/project/svforge/)
[![License](https://img.shields.io/pypi/l/svforge)](https://github.com/pieetie/svforge/blob/main/LICENSE)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19762333-blue)](https://doi.org/10.5281/zenodo.19762333)

---

**svForge** produces caller-shaped VCFs (Manta, DELLY) in VCF / VCF.gz / BCF format with fine-grained control over variability (HOMLEN, SVLEN, VAF) and realistic artefact injection (SVs in ENCODE blacklist regions, gnomAD germline SVs).

Designed to be modular, it is easy to adapt to your own use case. 
You can tune generation parameters, plug in new callers, and customize the workflow without reworking the whole tool.

## Installation

```bash
pip install svforge
```

Or from source:

```bash
git clone https://github.com/pieetie/svforge
cd svforge
pip install -e ".[dev,test]"
```

## Quick start

For ready-to-run command lines (single-sample `gen`, paired somatic `gen-pair`, validation, banks, and dev checks), see [`docs/ready-to-use.md`](docs/ready-to-use.md).

## Typical use cases

- Validate downstream filters (for example, `SVFORGE_SOURCE=gnomad` records should disappear after your gnomAD filtering step).
- Validate ENCODE blacklist annotation logic (for example, `SVFORGE_SOURCE=blacklist` records should receive your expected poor-mappability label).
- Run reproducible CI regression tests with fixed seeds, without committing generated VCF files.
- Smoke-test deployments and pipeline changes in seconds instead of rerunning full variant callers on BAM files.
- Reproduce specific scenarios and edge cases (cross-chrom BNDs, contig-edge events, controlled VAF/HOMLEN ranges) for debugging and QA.
- Demo or onboard safely with realistic SV VCFs and no patient data.

## CLI

```
svforge gen          # one VCF for one sample
svforge gen-pair     # one 2-sample somatic VCF (NORMAL + TUMOR)
svforge validate     # self-consistency check of injected SVs
svforge bank list    # list built-in banks
svforge bank show    # dump a bank as YAML
svforge callers      # list registered writers
```

Run `svforge <cmd> --help` for the full flag list.

## Credits

- **Logo and visual identity** - [Elisa Perrin](https://www.linkedin.com/in/elisaperrin/)
- **Claude** (Anthropic) - assisted with tests, documentation, refactoring, and release tooling (Ruff linting/formatting, CI cleanup)

## License

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/icons-on-background/icon-nb-app.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/icons-on-background/icon-bn-app.svg">
  <img src="https://raw.githubusercontent.com/pieetie/svforge/main/docs/assets/vector-svg/icons-on-background/icon-bn-app.svg" alt="svForge icon" width="14" style="vertical-align: -1px;">
</picture> Distributed under the <a href="./LICENSE">MIT License</a>.
