eccLib 1.3.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
67FastaBuff *FastaBuff_New(uint8_t *restrict buff, size_t buffSize,
68 size_t buffLen, bool RNA);
69
77PyObject *FastaBuff_getSubscript(FastaBuff *restrict self,
78 PyObject *restrict key);
79
87uint8_t FastaBuff_getItem(FastaBuff *self, Py_ssize_t index);
88
94#define FastaBuff_Check(op) PyObject_TypeCheck(op, &FastaBuffType)
95
96#endif
PyTypeObject FastaBuffType
The Python type definition for the FastaBuff object.
Definition FastaBuff.c:725
uint8_t FastaBuff_getItem(FastaBuff *self, Py_ssize_t index)
Gets an item from the FastaBuff.
Definition FastaBuff.c:173
FastaBuff * FastaBuff_New(uint8_t *restrict buff, size_t buffSize, size_t buffLen, bool RNA)
Creates a new FastaBuff object.
Definition FastaBuff.c:607
PyObject * FastaBuff_getSubscript(FastaBuff *restrict self, PyObject *restrict key)
Gets a subsequence of the FastaBuff.
Definition FastaBuff.c:488
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