Tabix (pysam)

petlx.tabix.fromtabix(filename, reference=None, start=None, end=None, region=None, header=None)[source]

Extract rows from a tabix indexed file. E.g.:

>>> from petlx.tabix import fromtabix
>>> from petl import look
>>> t = fromtabix('test.bed.gz', region='Pf3D7_02_v3:100000-200000')
>>> look(t)
+---------------+----------+----------+-----------------------------+
| '#chrom'      | 'start'  | 'end'    | 'region'                    |
+===============+==========+==========+=============================+
| 'Pf3D7_02_v3' | '23100'  | '105800' | 'SubtelomericHypervariable' |
+---------------+----------+----------+-----------------------------+
| 'Pf3D7_02_v3' | '105800' | '447300' | 'Core'                      |
+---------------+----------+----------+-----------------------------+

New in version 0.4.

Read the Docs v: v0.12
Versions
latest
v0.12
v0.11
v0.10
v0.9
v0.8
v0.7
v0.6
v0.5.1
v0.5
v0.4
v0.3
v0.2
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.