https://github.com/brentp/tabix-py
interface to tabix using cffi
https://github.com/brentp/tabix-py
Last synced: 3 months ago
JSON representation
interface to tabix using cffi
- Host: GitHub
- URL: https://github.com/brentp/tabix-py
- Owner: brentp
- Created: 2013-10-28T16:19:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-17T18:06:16.000Z (almost 11 years ago)
- Last Synced: 2025-01-17T20:46:03.472Z (5 months ago)
- Language: C
- Size: 250 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tabix
=====pythonic access to tabix files:
```Python
>>> from tabix import Tabix>>> t = Tabix('tabix/C/example.gtf.gz')
>>> t.sequences
[u'chr1', u'chr2']>>> len(list(t('chr1', 1, 2000))) == len(list(t('chr1:1-2000'))) == 6
True>>> next(t('chr1', 1, 2000))
'chr1\tENSEMBL\tUTR\t1737\t2090\t.\t+\t.\tgene_id "ENSG00000223972"; transcript_id "ENST00000456328"; gene_type "protein_coding"; gene_status "KNOWN"; gene_name "RP11-34P13.1"; transcript_type "protein_coding"; transcript_status "KNOWN"; transcript_name "RP11-34P13.1-201"; level 3; havana_gene "OTTHUMG00000000961";'```
note from the last example that it returns strings. Since we know the start and stop
columns, it would be simle to return an object that contains the chrom, start, end...