Skip to main content

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.

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")

  1. observed/oe/expected - observed, expected or observed/expected (oe) contacts between loci pairs
  2. normalization - string indicating normalization scheme. Available options are: NONE, VC, VC_SQRT or KR.
  3. hicFile(s) - the hic file(s) to query. They can be either local or remote (eg on S3)
  4. region 1 - genomic region "chr1:x1:x2" in base pair or fragment units. Interval convention is zero based 1/2 open
  5. region 2 - genomic region "chr2:y1:y2"
  6. units -- "BP" for base pairs
  7. binSize -- size of each bin in base pair or fragment units. Bins are square


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

Download files

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

Files for hic-straw, version
Filename, size File type Python version Upload date Hashes
Filename, size hic_straw- (137.5 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size hic-straw- (15.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page