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
60FastaBuff *FastaBuff_new(uint8_t *restrict buff, size_t buffSize,
61 size_t buffLen, bool RNA);
62
67extern PyTypeObject FastaBuffType;
68
74#define FastaBuff_Check(op) PyObject_TypeCheck(op, &FastaBuffType)
75
76#endif
FastaBuff * FastaBuff_new(uint8_t *restrict buff, size_t buffSize, size_t buffLen, bool RNA)
Creates a new FastaBuff object.
Definition FastaBuff.c:587
PyTypeObject FastaBuffType
The Python type definition for the FastaBuff object.
Definition FastaBuff.c:636
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