Straw bound with pybind11
Project description
Straw: rapidly stream data from .hic files
Straw is library which allows rapid streaming of contact data from .hic files. Besides Python, there are C++, R, Matlab, Java and Javascript versions of Straw.
- For the Python, C++, R, Matlab versions of Straw, see: https://github.com/aidenlab/straw
- For the Java version of Straw, see: https://github.com/aidenlab/java-straw/
- For the Javascript version of Straw, see: https://github.com/igvteam/hic-straw/
Quick Start Python
To install Straw type: pip install straw
Then import the module via import straw and run it using either straw.straw or straw.strawC.
API Usage
straw.straw("observed/oe/expected", "normalization", "hicFile(s)", "region1", "region2", "units", "binsize")
- observed/oe/expected - observed, expected or observed/expected (oe) contacts between loci pairs
- normalization - string indicating normalization scheme. Available options are: NONE, VC, VC_SQRT or KR.
- hicFile(s) - the hic file(s) to query. They can be either local or remote (eg on S3)
- region 1 - genomic region "chr1:x1:x2" in base pair or fragment units. Interval convention is zero based 1/2 open
- region 2 - genomic region "chr2:y1:y2"
- units -- "BP" for base pairs
- binSize -- size of each bin in base pair or fragment units. Bins are square
Example
import straw
result = straw.straw('observed', 'KR', 'HIC001.hic', '1:109050000:109055000', '1:109105000:109110000', 'BP', 5000)
for i in range(len(result)):
print("{0}\t{1}\t{2}".format(result[i].binX, result[i].binY, result[i].counts))
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
hic-straw-1.0.0.1.tar.gz
(15.9 kB
view hashes)
Built Distribution
Close
Hashes for hic_straw-1.0.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52282d8ca9ed91b121baf08a511bfae34548bd1f96aafb6a98c1ea4403837bf4 |
|
MD5 | cbab1204bafd314e5b1a33b8fae142ff |
|
BLAKE2b-256 | 0f2774d140215ca8b246971566707e35c6865dd2076d59a1dcba4b21d20aed7f |