A python package for finding genomic range overlaps
Project description
a python library for finding genomic range overlaps based on cgranges.
Installation
pygros is available on PyPi, to install it:
pip install pygros
Usage
>>> import pygros
>>> ranges = pygros.Ranges()
>>> ranges.add('chr1', 10, 20)
>>> ranges.add('chr1', 30, 50)
>>> ranges.add('chr1', 25, 40)
>>> ranges.index()
>>> ranges.overlap('chr1', 30, 40)
[(25, 40, -1), (30, 50, -1)]
API reference
pygros.Ranges(intervals=[])
create a Ranges object to store genomic ranges
@param intervals: a list or tuple containing multiple ranges
@return Ranges object
add(chrom, start, end, label=-1)
add genomic range into Ranges object
@param chrom: chromosome name or sequence name
@param start: start of range
@param end: end of range
@param label: an integer
index()
After add new genomic ranges, use this method to build index
overlap(chrom, start, end)
get genomic ranges that overlapped with your given range (start, end)
@param chrom: chromosome or sequence name
@param start: start of range
@param end: end of range
@return: a list of ranges
within(chrom, start, end)
get genomic ranges within given range (start, end)
@param chrom: chromosome or sequence name
@param start: start of range
@param end: end of range
@return: a list of ranges
contain(chrom, start, end)
get genomic ranges that contained in given range (start, end)
@param chrom: chromosome or sequence name
@param start: start of range
@param end: end of range
@return: a list of ranges
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 Distributions
Hashes for pygros-0.1.4-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1063c54fca1ecb8860e615f8c2511eff6bc6d00c97e542daadaee4a86c6b8670 |
|
MD5 | d1274c0a018d68d62f3539dafbc60ad1 |
|
BLAKE2b-256 | 2b4d60d56aa719a2020ffb03b9127a15b6e5ddc1a0d881d57b95f12e9b975018 |
Hashes for pygros-0.1.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcf48c1f43c0cfd12a29664961ad2661db92e35f0fe284277c9b36e54c4064ea |
|
MD5 | d70936778d2322f0ca7d54d3c76ad229 |
|
BLAKE2b-256 | 883530bd56ba40db4817f29012109f2d45195c348f06b207fc7ca1d607550483 |
Hashes for pygros-0.1.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77a5c514d6d7bc15c3eb0b546498ac66334d1b589fee41d556fa3b7dec0dd3e |
|
MD5 | 371c0faaa36106f17a30dc62ee796764 |
|
BLAKE2b-256 | 4d5b144e584d7b9a3e56fa96fc3ba84a458d2043b1f1d1e9528f83d9253a18fd |
Hashes for pygros-0.1.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1e15c7d4f2ecbb7eb749d2b63dd8737c63c8a88f856425b2f0f7b46e3d04297 |
|
MD5 | fc68a7f464571656784e198e5b31f9bb |
|
BLAKE2b-256 | da647f7b2c80e5acd06d9b13df9d3c581b8baa3b31ff243159615280b470e006 |
Hashes for pygros-0.1.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2efb1c6dee4b601471f142232a540863d5f0bd5ead5e09257a1e13ff8f3e750e |
|
MD5 | 5126ed124c22762dbe922f74981aa99b |
|
BLAKE2b-256 | 0e618d62cd52f84d507422803aac67e289a6980dd98e6d8754f71e7306f006d7 |
Hashes for pygros-0.1.4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c9dcc182b126b8cb3d1028d373bf5c923d466bffa66ce5335d486351480d79e |
|
MD5 | 3784ca0ffdbb06dded4b0cddbd7fabcb |
|
BLAKE2b-256 | 7db8361c0e1b269766d236d144396e03208b05a955a64c7093275e52ba36cc34 |
Hashes for pygros-0.1.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a0b770a52deb8029cb24c41c2c500e52204b8848ec03485f91b91cb2eeebcea |
|
MD5 | 397ff8a5ded6e968db31dd76871bb30e |
|
BLAKE2b-256 | 61c8f93ce61e19f325553f58f43c7e7ef541dce75365977bf7659245d708806a |
Hashes for pygros-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b597c3619a42a84fc6b1308adc23543bc4098a15e5580a69432eea93fa11473b |
|
MD5 | d1b642db1e8e9cade0864f62508c0068 |
|
BLAKE2b-256 | 118630ed9513d353c4c69be3c2fe6229163e37dad3c19303db12c79fc778776d |
Hashes for pygros-0.1.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be8678b2046d0cae931249aa59600661c5bbf75dc5a43ffd853a4ff00c424bcf |
|
MD5 | 7d07cf07b88bbf25af7b147717505873 |
|
BLAKE2b-256 | 170ee9316f3770963e830c24f4796128113a3793a80887054e1bc2bba8abb9e9 |
Hashes for pygros-0.1.4-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771927101310db2c4eda57ee802b9b883d46f037134b46015d744d8a927a89d5 |
|
MD5 | af820a8959d08edf75d3c8a14056b0c3 |
|
BLAKE2b-256 | 558091f6000db94f05dd27d19611ff346ee0ad32c2b2c77de2c1196302fd6c01 |
Hashes for pygros-0.1.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d252552775d213bec207012d59ea8de157d9c680eb731599df65b8c5ab0bc8b1 |
|
MD5 | 00af2b9132a6294974e4305d544015c6 |
|
BLAKE2b-256 | 776791a1725b74c3fb0a784e5880797a23764b1fda93aabb1e090eca7389c631 |
Hashes for pygros-0.1.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3312819d336aedffad617fc4b307b1427a1a345d1171daeb23e3c18760494df3 |
|
MD5 | 93e09719f19d7dcf6e9e5327aaa5d370 |
|
BLAKE2b-256 | b963e687176072c9408a00783bc9408a681411d98372a6bf53346320f9a522ad |
Hashes for pygros-0.1.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da98c1967e1c0b4e8d610c68d44c94b6af3fe1957eeb367ae05d6c7ff19c6950 |
|
MD5 | 4b6fefbe6f32f5d29fee00e2a5d8aa75 |
|
BLAKE2b-256 | ed06ff63fbc7968e777b3ddd4c88774704b8cf074f577e5af6fa9ff8f9c2c04f |
Hashes for pygros-0.1.4-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4f6d9a189395af2a46b2eef1ef8e16eced1ba4abd168c065216d076e4041f9a |
|
MD5 | f5847e4c3e03e895951374671373c6c2 |
|
BLAKE2b-256 | 07c69c70d3324807a77b32de9e4164dc21e74dcbfcfcb397f8ba719503165533 |
Hashes for pygros-0.1.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3c626b58fd76eae3172d59c4ee3a4b6e54a56fcff1d98a218e24f9b408a6af |
|
MD5 | adc29f446515078ea1548a4c0200ea94 |
|
BLAKE2b-256 | a13f7eee11d3e21c71c472ee35eed26afda3c1b1430241bbd8aefb9a6d284677 |
Hashes for pygros-0.1.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cea7f4829e1e79c66f35641c241237dc8cd1eb739ffcd5c3e7aabe0a1ba4d46c |
|
MD5 | 25fdbc4534b32e2fb1322ec654cc9523 |
|
BLAKE2b-256 | 7079081dd8d64154e96b4ea48f832e7ed002a2735a724411a325d1690d72d0fe |
Hashes for pygros-0.1.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29a1945510244582f190946221a1016a374f128df817c956e100c774845277f8 |
|
MD5 | 47d3f53a455e725fd9b7d749169ace9a |
|
BLAKE2b-256 | 47134fb15da4acac7da363f81cb94bc2d7de1d4f071cf167528a0aa824eb76ac |
Hashes for pygros-0.1.4-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052b0755c0bb398e8ed87a25a3b3d01c66415b8981378f652040f3a9a18f5135 |
|
MD5 | d27777eb4132e421cd823e6560a03950 |
|
BLAKE2b-256 | 72220dc29d526cd48feea7b9667cf08ca61f550a832a604d29c750b58c442ffd |
Hashes for pygros-0.1.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7975bccd102207f3ba4e754ead181cd3ef02f21de919ca7ea5927710c065500 |
|
MD5 | 607092d76092a432dd40eb877cfb6ad2 |
|
BLAKE2b-256 | d04f430f29c8fe92f8576a8a41af8e90696097c256d2c7dac97ded253d129364 |
Hashes for pygros-0.1.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 490493fe7fc58992af1b878e2154eb733aa99cdf65f9af6f39ef78bd7048a70d |
|
MD5 | c498357e89ce1a68c689c5c98f8ccfb0 |
|
BLAKE2b-256 | 2c1452665960e87258b975e33e49d08382338ca06fc546ad6e27bcfcc79c4cdf |
Hashes for pygros-0.1.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f643d41325867fb1b3e2ad3af8ddf730a9f7aadd2c066394b980c42254ee9432 |
|
MD5 | 84d395362627dd1c75bebbd35109e770 |
|
BLAKE2b-256 | 0c76d99c29793d5bdfcef66a257867ea6149ee120fac37d162ee22b1ee60932b |
Hashes for pygros-0.1.4-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 234c94a9c05db8e90bec30d396bc495ccc30736310539fba57f48e69f5f71349 |
|
MD5 | d5c9738f8d2c8f3873af4a657729af32 |
|
BLAKE2b-256 | b458b11810a11d4ed75d6980e75d6b8abf1dfdf1fb4538cd55eefc5c71082586 |
Hashes for pygros-0.1.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8613a97b8dc7deb4a91c54efa521b627b70162c6371de21fd9d6d8ad32579df |
|
MD5 | eec00fefad6b2e8d77cf5cfe06590974 |
|
BLAKE2b-256 | b9c235e5d19ee41e66681e3800533208c489c35d19d887ea76885abb34eb00f0 |
Hashes for pygros-0.1.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57a4abc1e29d6db6ec6352158548a79fd28e70344aa7a880ec29de99a594638 |
|
MD5 | 28b92ff5554a84900aedf4725a37f429 |
|
BLAKE2b-256 | 56ad1d9e43d4f0f2601a11fc0fe551fb50eff00fbad59c448d209cb25d986935 |