Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.1.0 instead.
Reason given by maintainers: Please upgrade to 0.3.0 for critical bug fixes and new features

OctopusV: Advanced Structural Variant Analysis Toolkit 🐙

PyPI version License: MIT

OctopusV is a comprehensive toolkit for analyzing, comparing, and standardizing structural variant (SV) calls from multiple SV callers. It provides a unified framework for SV analysis, offering tools for standardization, merging, benchmarking, and visualization of structural variants.

Key Features

  • Standardization: Convert various SV caller outputs to a unified SVCF format
  • Merging: Combine SV calls from multiple callers with flexible strategies
  • Benchmarking: Compare SV calls against truth sets using industry-standard metrics
  • Visualization: Generate informative plots for SV analysis
  • Format Conversion: Convert between different SV formats (VCF, BED, BEDPE)

Installation

pip install octopusv

Quick Start

1. Convert SV Calls to Standardized Format

Convert VCF files from different callers to the standardized SVCF format:

# Basic conversion
octopusv convert -i input.vcf -o output.svcf

# With position tolerance adjustment
octopusv convert -i input.vcf -o output.svcf --pos-tolerance 5

2. Merge SV Calls

Combine SV calls from multiple callers with various strategies:

# Intersect calls from multiple callers
octopusv merge -i caller1.svcf caller2.svcf -o merged.svcf --intersect

# Union of calls
octopusv merge -i caller1.svcf caller2.svcf -o merged.svcf --union

# Get SVs supported by at least 2 callers
octopusv merge -i caller1.svcf caller2.svcf caller3.svcf -o merged.svcf --min-support 2

# Extract caller-specific SVs
octopusv merge -i caller1.svcf caller2.svcf -o specific.svcf --specific caller1.svcf

# Complex merging with expression
octopusv merge -i caller1.svcf caller2.svcf caller3.svcf -o merged.svcf \
    --expression "(caller1 AND caller2) AND NOT caller3"

# Generate UpSet plot of intersections
octopusv merge -i caller1.svcf caller2.svcf caller3.svcf -o merged.svcf \
    --intersect --upsetr --upsetr-output intersections.png

3. Benchmark Against Truth Sets

Evaluate SV calls against a truth set:

octopusv benchmark \
    truth.svcf \
    test.svcf \
    -o benchmark_results \
    --reference-distance 500 \
    --size-similarity 0.7 \
    --reciprocal-overlap 0.0 \
    --size-min 50 \
    --size-max 50000

4. Generate Statistics

Analyze SV characteristics with comprehensive statistics and visualizations:

# Basic statistics output to text file
octopusv stat -i variants.svcf -o stats.txt

# With size filters
octopusv stat -i variants.svcf -o stats.txt --min-size 50 --max-size 10000

# Generate comprehensive HTML report with visualizations
octopusv stat -i variants.svcf -o stats.txt --report

# Generate only plots
octopusv plot stats.txt -o plots

The --report option generates an interactive HTML report that includes:

  • Summary statistics for all SV types
  • SV type distribution visualization
  • Size distribution analysis
  • Chromosome coverage plots
  • Quality metrics and genotype information

HTML Report Example

5. Create Visualizations

Generate plots from statistics:

octopusv plot -i stats.txt -o output_prefix

This will create:

  • output_prefix_chromosome_distribution.png: SV distribution across chromosomes

  • output_prefix_sv_types.png: Distribution of SV types

  • output_prefix_sv_sizes.png: SV size distribution

6. Format Conversion

Convert between different SV formats:

# Convert SVCF to BED
octopusv svcf2bed -i variants.svcf -o variants.bed

# Convert SVCF to BEDPE
octopusv svcf2bedpe -i variants.svcf -o variants.bedpe

# Convert SVCF back to VCF
octopusv svcf2vcf -i variants.svcf -o variants.vcf

Advanced Usage

Merge Configuration Options

  • --max-distance: Maximum distance between start/end positions (default: 50)
  • --max-length-ratio: Maximum ratio between event lengths (default: 1.3)
  • --min-jaccard: Minimum Jaccard index for overlap (default: 0.7)
  • --tra-delta: Position uncertainty for translocations (default: 50)
  • --tra-min-overlap: Minimum overlap ratio for translocations (default: 0.5)
  • --tra-strand-consistency: Require strand consistency (default: True)

Benchmark Configuration Options

  • --reference-distance: Maximum reference location distance
  • --size-similarity: Minimum size similarity ratio
  • --reciprocal-overlap: Minimum reciprocal overlap
  • --type-ignore: Allow type mismatches
  • --enable-sequence-comparison: Enable sequence similarity comparison
  • --sequence-similarity: Minimum sequence similarity threshold

Contributing

We welcome contributions! Here's how you can help:

  1. Clone the repository:

    git clone https://github.com/ylab-hi/octopusV.git
    
  2. Create a feature branch:

    git checkout -b feature/your-feature-name
    
  3. Install development dependencies:

    poetry install
    
  4. Make your changes and ensure all checks pass:

    pre-commit run -a
    
  5. Submit a pull request with a clear description of your changes

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions and feedback:

Metadata

Release files for OctopuSV 0.1.0

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

Source distribution (sdist)

Source distribution for OctopuSV 0.1.0
File Size Uploaded Provenance Actions
octopusv-0.1.0.tar.gz 230.3 kB Without provenance Details for octopusv-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for OctopuSV 0.1.0
File Interpreter ABI Platform Actions
octopusv-0.1.0-py3-none-any.whl Python 3 none any Details for octopusv-0.1.0-py3-none-any.whl

Total release size: 479.9 kB

Release files / octopusv-0.1.0.tar.gz

Download URL octopusv-0.1.0.tar.gz
Size 230.3 kB
Tags Source
SHA-256 checksum
How to use checksums
10e4241473440285ea4704f6a5a367cc28b35552776ca00753bdf5860001cc6d
BLAKE2b-256 checksum
How to use checksums
60ad0bb5eafd5d848617e6ec244bacc69f2f38f59edd3de901257d8c64cc471f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.8 Darwin/23.6.0

Release files / octopusv-0.1.0-py3-none-any.whl

Download URL octopusv-0.1.0-py3-none-any.whl
Size 249.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d52f220dc7b3cf750638a3a42baa271cbac67860c744274af35c4c03bb7357e
BLAKE2b-256 checksum
How to use checksums
ac3a81ba441aca5a420ba69d8b981981bf669c1d6232d2b09f3a464dcab5ae1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.8 Darwin/23.6.0

Security for OctopuSV 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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