File: libctabixproxies.pxd

package info (click to toggle)
python-pysam 0.23.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,468 kB
  • sloc: ansic: 158,936; python: 8,604; sh: 338; makefile: 264; perl: 41
file content (64 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# cython: language_level=3

from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t

cdef class TupleProxy:

    cdef:
        char * data
        char ** fields
        int nfields
        int nbytes
        int offset
        bint is_modified

    cdef encoding

    cpdef int getMaxFields(self)
    cpdef int getMinFields(self)
#    cdef char * _getindex(self, int idx)

    cdef take(self, char * buffer, size_t nbytes)
    cdef present(self, char * buffer, size_t nbytes)
    cdef copy(self, char * buffer, size_t nbytes, bint reset=*)
    cdef update(self, char * buffer, size_t nbytes)


cdef class TupleProxyIterator:
    cdef TupleProxy proxy
    cdef int index


cdef class NamedTupleProxy(TupleProxy):
    pass


cdef class GTFProxy(NamedTupleProxy):
    cdef object attribute_dict
    cpdef int getMaxFields(self)
    cpdef int getMinFields(self)


cdef class GFF3Proxy(GTFProxy):
    pass


cdef class BedProxy(NamedTupleProxy):

    cdef:
        char * contig
        uint32_t start
        uint32_t end
        int bedfields

    cpdef int getMaxFields(self)
    cpdef int getMinFields(self)
    cdef update(self, char * buffer, size_t nbytes)

cdef class VCFProxy(NamedTupleProxy) :

    cdef:
        char * contig
        uint32_t pos

    cdef update(self, char * buffer, size_t nbytes)