File: libcutils.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 (37 lines) | stat: -rw-r--r-- 1,596 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
# cython: language_level=3
#########################################################################
# Utility functions used across pysam
#########################################################################
cimport cython
from cpython cimport array as c_array

cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*)

cdef int libc_whence_from_io(int whence)

#########################################################################
# Utility functions for quality string conversions

cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
cpdef array_to_qualitystring(c_array.array arr, int offset=*)
cpdef qualities_to_qualitystring(qualities, int offset=*)

########################################################################
## String encoding configuration facilities
########################################################################

cpdef get_encoding_error_handler()
cpdef set_encoding_error_handler(name)

########################################################################
## Python 3 compatibility functions
########################################################################
cdef charptr_to_str(const char *s, encoding=*, errors=*)
cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
cdef force_str(object s, encoding=*, errors=*)
cdef bytes force_bytes(object s, encoding=*, errors=*)
cdef decode_bytes(bytes s, encoding=*, errors=*)
cdef bytes encode_filename(object filename)
cdef from_string_and_size(const char *s, size_t length)