eccLib 1.1.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
FastaBuff.h
Go to the documentation of this file.
1
6#ifndef FASTABUFF_H
7#define FASTABUFF_H
8
9#include <Python.h>
10#include <stdbool.h>
11#include <stdint.h>
12#include <stdlib.h>
13
30typedef struct {
31 PyObject_HEAD
35 uint8_t *buff;
40 size_t buffSize;
45 size_t buffLen;
50 bool RNA;
51} FastaBuff;
52
57extern PyTypeObject FastaBuffType;
58
59typedef struct {
60 PyObject_HEAD FastaBuff *buff;
61 bool reverse;
62 int64_t pos;
64
65extern PyTypeObject FastaBuff_iteratorType;
66
74FastaBuff *FastaBuff_new(uint8_t *restrict buff, size_t buffSize,
75 size_t buffLen, bool RNA);
76
82#define FastaBuff_Check(op) PyObject_TypeCheck(op, &FastaBuffType)
83
84#endif
PyTypeObject FastaBuff_iteratorType
Definition FastaBuff.c:733
FastaBuff * FastaBuff_new(uint8_t *restrict buff, size_t buffSize, size_t buffLen, bool RNA)
Creates a new FastaBuff object.
Definition FastaBuff.c:622
PyTypeObject FastaBuffType
The Python type definition for the FastaBuff object.
Definition FastaBuff.c:673
Definition FastaBuff.h:59
bool reverse
Definition FastaBuff.h:61
int64_t pos
Definition FastaBuff.h:62
FastaBuff * buff
Definition FastaBuff.h:60
A buffer that holds packed uint4 FASTA data.
Definition FastaBuff.h:30
bool RNA
If true, T will be converted to U.
Definition FastaBuff.h:50
uint8_t * buff
The buffer that holds the packed FASTA data.
Definition FastaBuff.h:35
size_t buffLen
The length of the sequence.
Definition FastaBuff.h:45
size_t buffSize
The size of the buffer in bytes.
Definition FastaBuff.h:40