https://github.com/brentp/python-giggle
python (cython) wrapper for https://github.com/ryanlayer/giggle for fast interval searching of huge datasets.
https://github.com/brentp/python-giggle
Last synced: 4 months ago
JSON representation
python (cython) wrapper for https://github.com/ryanlayer/giggle for fast interval searching of huge datasets.
- Host: GitHub
- URL: https://github.com/brentp/python-giggle
- Owner: brentp
- License: apache-2.0
- Created: 2017-06-27T22:36:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-13T17:11:09.000Z (over 7 years ago)
- Last Synced: 2025-02-02T04:41:12.012Z (4 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Giggle
```Python
from giggle import Giggle
index = Giggle('existing-index-dir') # or Giggle.create('new-index-dir', 'files/*.bed')
print(index.files)result = index.query('chr1', 9999, 20000)
print(result.n_files)
print(result.n_total_hits) # integer number sum of hits across all filesprint(result.n_hits(0)) # integer number of hits for the 0th file...
for hit in result[0]:
print(hit) # hit is a string
```### Installation
make sure you have `liz`, `libcurl`, `libcrypto`, `libbz2` and `liblzma` installed in the appropriate
place on your system.
```
git clone --recursive https://github.com/brentp/python-giggle
cd python-giggle
python setup.py test
python setup.py install
```