File: libcutils.pxd

package info (click to toggle)
python-pysam 0.20.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,348 kB
  • sloc: ansic: 137,388; python: 8,501; sh: 283; makefile: 263; perl: 41
file content (34 lines) | stat: -rw-r--r-- 1,527 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
#########################################################################
# Utility functions used across pysam
#########################################################################
cimport cython
from cpython cimport array as c_array

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

#########################################################################
# 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)