Skip to main content

vcferr

The vcferr module is a lightweight error simulation framework. The tool operates on an input VCF and can probabilistically simulate the following error models for biallelic SNPs:

  • rarr = Heterozygous drop out: (0,1) or (1,0) to (0,0)
  • aara = Homozygous alt drop out: (1,1) to (0,1)
  • rrra = Heterozygous drop in: (0,0) to (0,1)
  • raaa = Homozygous alt drop in: (0,1) or (1,0) to (1,1)
  • aarr = Double homozygous alt drop out: (1,1) to (0,0)
  • rraa = Double homozygous alt drop in: (0,0) to (1,1)

In addition to error models, the tool includes functionality to inject probability of missingness:

  • ramm = Heterozygous to missing: (0,1) or (1,0) to (.,.)
  • rrmm = Homozygous ref to missing: (0,0) to (.,.)
  • aamm = Homozygous alt to missing: (1,1) to (.,.)

Installation

The vcferr tool is delivered as a Python module.

To install from PyPi:

pip install vcferr

Alternatively, clone the vcferr GitHub repository and use pip from the root of the directory:

pip install .

Note that the following dependencies are used by vcferr:

  • Python >=3.6.x
  • pysam
  • random
  • click

Usage

The examples below demonstrate basic usage with the example.vcf.gz in the data/ directory of the vcferr GitHub repository.

The following is a basic example that simulates 20% heterozygous dropout:

vcferr data/example.vcf.gz --sample='sample1' --p_rarr=0.2

By default, vcferr will stream output of the VCF with errors simulated. However, if an argument is given for "output_vcf" then the VCF will be written to disk:

vcferr data/example.vcf.gz --sample='sample1' --output_vcf=data/sample1sim.example.vcf.gz --p_rarr=0.2

Note that multiple kinds of error can be simulated simulatenously:

vcferr data/example.vcf.gz --sample='sample1' --p_rarr=0.2 --p_raaa=0.1 --p_rrra=0.2 --p_aara=0

The tool can also simulate missingness:

vcferr data/example.vcf.gz --sample='sample1' --p_rarr=0.2 --p_raaa=0.1 --p_rrra=0.2 --p_aara=0 --p_rrmm=0.5

Metadata

Release files for vcferr 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcferr 1.0.2
File Size Uploaded Provenance
vcferr-1.0.2.tar.gz 4.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vcferr 1.0.2
File Interpreter ABI Platform
vcferr-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / vcferr-1.0.2.tar.gz

Download URL vcferr-1.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
79d51ca9f1826e86d51cd660829fc117569c5349f868499daacc8d694030dc22
BLAKE2b-256 checksum
How to use checksums
1b5ab2c1a5f067b2c9f65dd8ae3414d1c0db3a099b850df276edf136ed9b3365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13

Release files / vcferr-1.0.2-py3-none-any.whl

Download URL vcferr-1.0.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
550de84864177113ddd1cf38371981831fcf5327e61807d8f4b8945589b7f443
BLAKE2b-256 checksum
How to use checksums
172066e14023dc3a36477f1d2b5ceccb2f4f92a198227241274a8fdcd42b79cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13

Security for vcferr 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page