Skip to main content

No project description provided

Project description

pygv

a minimal, scriptable genome browser for python built with anywidget

installation

Here be dragons 🐉

pip install pygv

usage

import pygv

# set the reference genome
pygv.ref("mm10")

# set the locus
pygv.locus("chr17:31,531,100-31,531,259")

# create a browser instance
pygv.browse("fragments.bed", "10x_cov.bw")

igv.js in Jupyter Notebook

That's it. By default, pygv infers the track and data-types by file extension. If a file format has an index file, it must be specified as a tuple (remote URLs also work):

pygv.browse(
  (
    "https://example.com/example.bam",     # data file
    "https://example.com/example.bam.bai"  # index file
  )
)

You can use track to adjust track properties beyond the defaults:

pygv.browse(
  pygv.track("10x_cov.bw", name="10x coverage", autoscale=True),
)

Multiple tracks are supported by adding to the browse call:

pygv.browse(
  # track 1
  (
      "https://example.com/example.bam",
      "https://example.com/example.bam.bai"
  ),
  # track 2
  pygv.track("10x_cov.bw", name="10x coverage", autoscale=True),
  # track 3
  pygv.track("genes.bed", name="Genes", color="blue"),
)

development

development requires uv

uv run jupyter lab # open notebook with editable install
uv run pytest      # testing
uv run ruff check  # linting
uv run ruff format # formatting

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygv-0.1.0.tar.gz (92.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygv-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pygv-0.1.0.tar.gz.

File metadata

  • Download URL: pygv-0.1.0.tar.gz
  • Upload date:
  • Size: 92.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pygv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a844af870c77abeb5f4d431580a6d6ddda843e6bd1851587e2a5f433b6ffce9
MD5 bc3295e8cfa9fef1584bedfc4246b41c
BLAKE2b-256 9ad1e3c0266d92d429618ef949e766ca6fa346d43bb6d29bf8dd3444ea830907

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygv-0.1.0.tar.gz:

Publisher: release.yml on manzt/pygv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pygv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pygv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44ca63b5354f91383709b51e16ffab05996eafb81202639ba78d732165b4b5e6
MD5 79edc41a171e60f5b4b7bc0975f2c1a9
BLAKE2b-256 4e178d23f07ff550dd428779a6dc664b4686d41c3356053f8e5c78165e6e4b69

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygv-0.1.0-py3-none-any.whl:

Publisher: release.yml on manzt/pygv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page