|
eccLib 1.3.0
Python library for bioinformatics written in C
|
All methods and objects related to the FastaBuff object. More...
Data Structures | |
| struct | FastaBuff |
| A buffer that holds packed uint4 FASTA data. More... | |
Functions | |
| static FastaBuff * | FastaBuff_new (PyTypeObject *type, PyObject *args, PyObject *kwargs) |
| Allocates a new FastaBuff object. | |
| static int | FastaBuff_init (FastaBuff *self, PyObject *restrict args, PyObject *restrict kwds) |
| Initializes a FastaBuff object. Equivalent to the constructor in Python. | |
| static Py_ssize_t | FastaBuff_len (FastaBuff *self) |
| Returns the length of the FastaBuff. | |
| static PyObject * | FastaBuff_str (FastaBuff *self) |
| Converts the FastaBuff to a string. | |
| static int | FastaBuff_setItem (FastaBuff *self, Py_ssize_t index, PyObject *value) |
| Sets a part of the sequence. | |
| static int | FastaBuff_contains (FastaBuff *restrict self, PyObject *restrict value) |
| Checks if the FastaBuff contains the specified value. | |
| static PyObject * | FastaBuff_index (FastaBuff *restrict self, PyObject *restrict args) |
| Returns the index of the first occurrence of the specified value in this FastaBuff. | |
| static PyObject * | FastaBuff_count (FastaBuff *restrict self, PyObject *restrict value) |
| Counts the number of occurrences of the specified value in this FastaBuff. | |
| static PyObject * | FastaBuff_dump (FastaBuff *restrict self) |
| Converts the FastaBuff to a bytes object. | |
| static PyObject * | FastaBuff_get_annotated (FastaBuff *restrict self, PyObject *restrict first) |
| Returns the annotated sequence. | |
| static PyObject * | FastaBuff_richcompare (FastaBuff *restrict self, PyObject *restrict other, const int op) |
| FastaBuff comparison function. | |
| static PyObject * | FastaBuff_find (FastaBuff *restrict self, PyObject *restrict firstArg) |
| Finds occurrences of the specified sequence in this FastaBuff. | |
| static void | FastaBuff_dealloc (FastaBuff *self) |
| Deallocates the FastaBuff. | |
| FastaBuff * | FastaBuff_New (uint8_t *restrict buff, size_t buffSize, size_t buffLen, bool RNA) |
| Creates a new FastaBuff object. | |
| PyObject * | FastaBuff_getSubscript (FastaBuff *restrict self, PyObject *restrict key) |
| Gets a subsequence of the FastaBuff. | |
| uint8_t | FastaBuff_getItem (FastaBuff *self, Py_ssize_t index) |
| Gets an item from the FastaBuff. | |
Variables | |
| PyTypeObject | FastaBuffType |
| The Python type definition for the FastaBuff object. | |
All methods and objects related to the FastaBuff object.
The FastaBuff object is a memory efficient buffer for FASTA data. It stores the data in a packed format, with each byte containing two 4 bit values. This allows for a 50% reduction in memory usage compared to a regular byte array. The object also provides methods for easy manipulation of the data.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| uint8_t FastaBuff_getItem | ( | FastaBuff * | self, |
| Py_ssize_t | index | ||
| ) |
| PyObject * FastaBuff_getSubscript | ( | FastaBuff *restrict | self, |
| PyObject *restrict | key | ||
| ) |
|
static |
|
static |
Initializes a FastaBuff object. Equivalent to the constructor in Python.
Either loads a valid buffer, from a bytes object, or parses a string from the provided string or file, into a buffer.
| self | the FastaBuff to initialize |
| args | positional arguments |
| kwds | the keyword arguments |

|
static |
|
static |
Allocates a new FastaBuff object.
Used as the allocator by Python for FastaBuff, initializes the object, ensuring all the fields are valid, but does not actually initialize the object.
| type | the type of the object to allocate |
| args | the arguments to initialize the FastaBuff with |
| kwargs | the keyword arguments to initialize the FastaBuff with. Should always be NULL |
| FastaBuff * FastaBuff_New | ( | uint8_t *restrict | buff, |
| size_t | buffSize, | ||
| size_t | buffLen, | ||
| bool | RNA | ||
| ) |
|
static |
|
static |
Sets a part of the sequence.
| self | the FastaBuff to set the part in |
| index | the index to set the part at |
| value | the value to set |
|
static |
|
extern |
The Python type definition for the FastaBuff object.