A fast reader for local or remote UCSC twobit sequence files.
Project description
pyTwobit
Package for fetching sequence from twobit files from local paths or URLs.
Installing
pip install pyTwobit
Usage
To fetch sequence for a genomic region create a TwoBit object with either a local file path or url. Sequence
is fetched with the fetch function which takes chromosome name, start, and end coordinates.
The UCSC coordinate convention is used (0 start, half-open).
Local file
from pytwobit import TwoBit
twobit = TwoBit('test.2bit')
seq = twobit.fetch("chr1", 50, 57) # -> "CTATCTA"
Remote file
from pytwobit import TwoBit
twobit = TwoBit("https://igv.org/genomes/data/hg38/hg38.2bit")
seq = twobit.fetch("chr1", 120565294, 120565335) # -> "TATGAACTTTTGTTCGTTGGTgctcagtcctagaccctttt"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytwobit-0.3.1.tar.gz.
File metadata
- Download URL: pytwobit-0.3.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30f7ff8b50e8aa8ee933a3f49911d275299def9de43c4287fd26411c2b49d62f
|
|
| MD5 |
a24d5118513cb5ddb6e5d57fc4c54620
|
|
| BLAKE2b-256 |
ab883af2a82a2220016ac6c5609e9ce14e95449954e5046997f5f6ea8f049aef
|
File details
Details for the file pytwobit-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pytwobit-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7f1d27f0e5bf5a99b8130d8fce72c0bedf1815f8178467631fff5e49ad8432
|
|
| MD5 |
e32b9515f0725693f50b976f95dbda38
|
|
| BLAKE2b-256 |
9d1e5aced5817befbf374106b3381f02cfaed2301bd5c68c86eb99f44aab74ef
|