Imported Upstream version 0.5
[pysam.git] / pysam / ctabix.pxd
index ef735b64f9230f8851b1ab147a77fcad2835ce1b..950e28e6252b9d741b71d26fc13e03ee5e0a427a 100644 (file)
@@ -101,9 +101,14 @@ cdef extern from "bgzf.h":
 # tabix support
 cdef extern from "tabix.h":
 
-  ctypedef struct ti_index_t:
-    pass
+  ctypedef struct ti_conf_t:
+    int32_t preset
+    int32_t sc, bc, ec
+    int32_t meta_char, line_skip
 
+  ctypedef struct ti_index_t:
+     pass
+      
   ctypedef struct tabix_t: 
     BGZF *fp
     ti_index_t *idx
@@ -113,11 +118,6 @@ cdef extern from "tabix.h":
   ctypedef struct ti_iter_t:
     pass
 
-  ctypedef struct ti_conf_t:
-    int32_t preset
-    int32_t sc, bc, ec
-    int32_t meta_char, line_skip
-
   tabix_t *ti_open(char *fn, char *fnidx)
 
   int ti_lazy_index_load(tabix_t *t)
@@ -135,7 +135,6 @@ cdef extern from "tabix.h":
   #    pointer should be freed by a single free() call by the routine
   #    calling this function. The number of sequences is returned at *n
   char **ti_seqname(ti_index_t *idx, int *n)
-
   
   # Destroy the iterator
   void ti_iter_destroy(ti_iter_t iter)
@@ -169,3 +168,12 @@ cdef extern from "tabix.h":
 
   #  /* Get the data line pointed by the iterator and iterate to the next record. */
   # char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
+
+cdef class Tabixfile:
+    cdef char * filename
+
+    # pointer to tabixfile
+    cdef tabix_t * tabixfile
+     
+cdef class Parser:
+     pass