All methods and objects related to the FastaBuff object.
More...
|
static int | FastaBuff_init (FastaBuff *self, PyObject *restrict args, PyObject *restrict kwds) |
| Initializes a FastaBuff object.
|
|
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 args) |
| Counts the number of occurrences of the specified value in this FastaBuff.
|
|
static PyObject * | FastaBuff_dump (FastaBuff *restrict self, PyObject *args) |
| Converts the FastaBuff to a bytes object.
|
|
static PyObject * | FastaBuff_get_annotated (FastaBuff *restrict self, PyObject *restrict args) |
| Returns the annotated sequence.
|
|
static PyObject * | FastaBuff_richcompare (FastaBuff *restrict self, PyObject *restrict other, const int op) |
| FastaBuff comparison function.
|
|
static PyObject * | FastaBuff_getSubscript (FastaBuff *restrict self, PyObject *restrict key) |
| Gets a subsequence of the FastaBuff.
|
|
static PyObject * | FastaBuff_find (FastaBuff *restrict self, PyObject *restrict args) |
| Finds occurrences of the specified sequence in this FastaBuff.
|
|
static void | FastaBuff_dealloc (FastaBuff *self) |
| Deallocates the FastaBuff.
|
|
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.
◆ FastaBuff_contains()
static int FastaBuff_contains |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
value |
|
) |
| |
|
static |
Checks if the FastaBuff contains the specified value.
- Parameters
-
self | the FastaBuff to search in |
value | the value to search for |
- Returns
- 1 if the FastaBuff contains the value, 0 if it does not, -1 on error
◆ FastaBuff_count()
static PyObject * FastaBuff_count |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
args |
|
) |
| |
|
static |
Counts the number of occurrences of the specified value in this FastaBuff.
- Parameters
-
self | the FastaBuff to search in |
args | the arguments to search for |
- Returns
- the number of occurrences of the specified value
◆ FastaBuff_dealloc()
static void FastaBuff_dealloc |
( |
FastaBuff * |
self | ) |
|
|
static |
◆ FastaBuff_dump()
static PyObject * FastaBuff_dump |
( |
FastaBuff *restrict |
self, |
|
|
PyObject * |
args |
|
) |
| |
|
static |
Converts the FastaBuff to a bytes object.
- Parameters
-
- Returns
- the bytes representation of the FastaBuff
◆ FastaBuff_find()
static PyObject * FastaBuff_find |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
args |
|
) |
| |
|
static |
Finds occurrences of the specified sequence in this FastaBuff.
- Parameters
-
self | the FastaBuff to search in |
args | the arguments to search for |
- Returns
- a list of the indices of the first occurrence of the specified sequence in this FastaBuff.
◆ FastaBuff_get_annotated()
static PyObject * FastaBuff_get_annotated |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
args |
|
) |
| |
|
static |
Returns the annotated sequence.
- Parameters
-
self | the FastaBuff to get the annotated sequence from |
args | the arguments to get the annotated sequence with |
- Returns
- the annotated sequence
◆ FastaBuff_getSubscript()
static PyObject * FastaBuff_getSubscript |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
key |
|
) |
| |
|
static |
Gets a subsequence of the FastaBuff.
- Parameters
-
self | the FastaBuff to get the subsequence from |
key | the key to get the subsequence with |
- Returns
- the subsequence
◆ FastaBuff_index()
static PyObject * FastaBuff_index |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
args |
|
) |
| |
|
static |
Returns the index of the first occurrence of the specified value in this FastaBuff.
- Parameters
-
self | the FastaBuff to search in |
args | the arguments to search for |
- Returns
- the index of the first occurrence of the specified value, or -1 on error
◆ FastaBuff_init()
static int FastaBuff_init |
( |
FastaBuff * |
self, |
|
|
PyObject *restrict |
args, |
|
|
PyObject *restrict |
kwds |
|
) |
| |
|
static |
Initializes a FastaBuff object.
- Parameters
-
self | the FastaBuff to initialize |
args | the arguments to initialize the FastaBuff with |
kwds | the keyword arguments to initialize the FastaBuff with. Should always be NULL |
◆ FastaBuff_len()
static Py_ssize_t FastaBuff_len |
( |
FastaBuff * |
self | ) |
|
|
static |
◆ FastaBuff_richcompare()
static PyObject * FastaBuff_richcompare |
( |
FastaBuff *restrict |
self, |
|
|
PyObject *restrict |
other, |
|
|
const int |
op |
|
) |
| |
|
static |
FastaBuff comparison function.
- Parameters
-
self | the FastaBuff to compare |
other | the other object to compare |
op | the operation to perform |
- Returns
- the result of the comparison
◆ FastaBuff_setItem()
static int FastaBuff_setItem |
( |
FastaBuff * |
self, |
|
|
Py_ssize_t |
index, |
|
|
PyObject * |
value |
|
) |
| |
|
static |
Sets a part of the sequence.
- Parameters
-
self | the FastaBuff to set the part in |
index | the index to set the part at |
value | the value to set |
- Returns
- 0 on success, -1 on error
◆ FastaBuff_str()
static PyObject * FastaBuff_str |
( |
FastaBuff * |
self | ) |
|
|
static |
Converts the FastaBuff to a string.
- Parameters
-
- Returns
- the string representation of the FastaBuff
◆ FastaBuffType
PyTypeObject FastaBuffType |
|
extern |
The Python type definition for the FastaBuff object.