eccLib 1.3.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Functions | Variables
FastaBuffViews.c File Reference
#include "FastaBuffViews.h"
#include <stdbool.h>
#include <stdint.h>
#include <Python.h>
#include "../../formats/fasta.h"
#include "../../formats/gtf.h"
Include dependency graph for FastaBuffViews.c:

Functions

void FastaBuff_iterator_initialise (FastaBuff_iterator *iter, FastaBuff *buff, bool reverse)
 
static void FastaBuff_iterator_dealloc (FastaBuff_iterator *self)
 
static PyObject * FastaBuff_iterator_iter (FastaBuff_iterator *self)
 
static PyObject * FastaBuff_iterator_next (FastaBuff_iterator *self)
 
PyObject * FastaBuff_view_initialise (FastaBuff_view *view, FastaBuff *buff, Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step, Py_ssize_t slicelength)
 
int FastaBuff_view_init (FastaBuff_view *self, PyObject *args, PyObject *kwds)
 
static void FastaBuff_view_dealloc (FastaBuff_view *self)
 
static PyObject * FastaBuff_view_iter (FastaBuff_view *self)
 
static PyObject * FastaBuff_view_reversed (FastaBuff_view *self)
 
static Py_ssize_t FastaBuff_view_len (FastaBuff_view *self)
 
static PyObject * FastaBuff_view_subscript (FastaBuff_view *self, PyObject *key)
 
static PyObject * FastaBuff_view_richcompare (FastaBuff_view *restrict self, PyObject *restrict other, const int op)
 
static int64_t view_index (FastaBuff_view *restrict self, PyObject *restrict other, size_t start, size_t end)
 
static PyObject * FastaBuff_view_index (FastaBuff_view *self, PyObject *args, PyObject *kwargs)
 
static int FastaBuff_view_contains (FastaBuff_view *self, PyObject *other)
 
static PyObject * FastaBuff_view_count (FastaBuff_view *self, PyObject *other)
 
static PyObject * FastaBuff_view_get_annotated (FastaBuff_view *restrict self, PyObject *restrict first)
 
static PyObject * FastaBuff_view_str (FastaBuff_view *self)
 

Variables

PyTypeObject FastaBuff_iteratorType
 
static PyMethodDef FastaBuff_viewMethods []
 
static PyMappingMethods FastaBuffMap
 
static PySequenceMethods FastaBuffSeq
 
PyTypeObject FastaBuff_viewType
 

Function Documentation

◆ FastaBuff_iterator_dealloc()

static void FastaBuff_iterator_dealloc ( FastaBuff_iterator self)
static

◆ FastaBuff_iterator_initialise()

void FastaBuff_iterator_initialise ( FastaBuff_iterator iter,
FastaBuff buff,
bool  reverse 
)
Here is the caller graph for this function:

◆ FastaBuff_iterator_iter()

static PyObject * FastaBuff_iterator_iter ( FastaBuff_iterator self)
static

◆ FastaBuff_iterator_next()

static PyObject * FastaBuff_iterator_next ( FastaBuff_iterator self)
static
Here is the call graph for this function:

◆ FastaBuff_view_contains()

static int FastaBuff_view_contains ( FastaBuff_view self,
PyObject *  other 
)
static
Here is the call graph for this function:

◆ FastaBuff_view_count()

static PyObject * FastaBuff_view_count ( FastaBuff_view self,
PyObject *  other 
)
static
Here is the call graph for this function:

◆ FastaBuff_view_dealloc()

static void FastaBuff_view_dealloc ( FastaBuff_view self)
static

◆ FastaBuff_view_get_annotated()

static PyObject * FastaBuff_view_get_annotated ( FastaBuff_view *restrict  self,
PyObject *restrict  first 
)
static
Here is the call graph for this function:

◆ FastaBuff_view_index()

static PyObject * FastaBuff_view_index ( FastaBuff_view self,
PyObject *  args,
PyObject *  kwargs 
)
static
Here is the call graph for this function:

◆ FastaBuff_view_init()

int FastaBuff_view_init ( FastaBuff_view self,
PyObject *  args,
PyObject *  kwds 
)
Here is the call graph for this function:

◆ FastaBuff_view_initialise()

PyObject * FastaBuff_view_initialise ( FastaBuff_view view,
FastaBuff buff,
Py_ssize_t  start,
Py_ssize_t  stop,
Py_ssize_t  step,
Py_ssize_t  slicelength 
)
Here is the caller graph for this function:

◆ FastaBuff_view_iter()

static PyObject * FastaBuff_view_iter ( FastaBuff_view self)
static
Here is the call graph for this function:

◆ FastaBuff_view_len()

static Py_ssize_t FastaBuff_view_len ( FastaBuff_view self)
static

◆ FastaBuff_view_reversed()

static PyObject * FastaBuff_view_reversed ( FastaBuff_view self)
static
Here is the call graph for this function:

◆ FastaBuff_view_richcompare()

static PyObject * FastaBuff_view_richcompare ( FastaBuff_view *restrict  self,
PyObject *restrict  other,
const int  op 
)
static
Here is the call graph for this function:

◆ FastaBuff_view_str()

static PyObject * FastaBuff_view_str ( FastaBuff_view self)
static
Here is the call graph for this function:

◆ FastaBuff_view_subscript()

static PyObject * FastaBuff_view_subscript ( FastaBuff_view self,
PyObject *  key 
)
static
Here is the call graph for this function:

◆ view_index()

static int64_t view_index ( FastaBuff_view *restrict  self,
PyObject *restrict  other,
size_t  start,
size_t  end 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FastaBuff_iteratorType

PyTypeObject FastaBuff_iteratorType
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "eccLib.FastaBuff_iterator",
.tp_basicsize = sizeof(FastaBuff_iterator),
.tp_doc =
PyDoc_STR("An iterator for a buffer for storing a FASTA sequence"),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_new = PyType_GenericNew,
.tp_getattro = PyObject_GenericGetAttr,
.tp_iter = (getiterfunc)FastaBuff_iterator_iter,
.tp_iternext = (iternextfunc)FastaBuff_iterator_next,
.tp_dealloc = (destructor)FastaBuff_iterator_dealloc}
static PyObject * FastaBuff_iterator_next(FastaBuff_iterator *self)
Definition FastaBuffViews.c:30
static PyObject * FastaBuff_iterator_iter(FastaBuff_iterator *self)
Definition FastaBuffViews.c:25
static void FastaBuff_iterator_dealloc(FastaBuff_iterator *self)
Definition FastaBuffViews.c:20
Definition FastaBuffViews.h:14

◆ FastaBuff_viewMethods

PyMethodDef FastaBuff_viewMethods[]
static
Initial value:
= {
{"get_annotated", (PyCFunction)FastaBuff_view_get_annotated, METH_O, ""},
{"index", (PyCFunction)FastaBuff_view_index, METH_VARARGS | METH_KEYWORDS,
"Returns the index of the first occurrence of a subsequence"},
{"count", (PyCFunction)FastaBuff_view_count, METH_O,
"Returns the number of occurrences of a subsequence"},
{"__reversed__", (PyCFunction)FastaBuff_view_reversed, METH_NOARGS,
"Returns the reverse of the sequence"},
{NULL, NULL, 0, NULL}
}
static PyObject * FastaBuff_view_reversed(FastaBuff_view *self)
Definition FastaBuffViews.c:136
static PyObject * FastaBuff_view_index(FastaBuff_view *self, PyObject *args, PyObject *kwargs)
Definition FastaBuffViews.c:301
static PyObject * FastaBuff_view_count(FastaBuff_view *self, PyObject *other)
Definition FastaBuffViews.c:335
static PyObject * FastaBuff_view_get_annotated(FastaBuff_view *restrict self, PyObject *restrict first)
Definition FastaBuffViews.c:352

◆ FastaBuff_viewType

PyTypeObject FastaBuff_viewType
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "eccLib.FastaBuff_view",
.tp_basicsize = sizeof(FastaBuff_view),
.tp_doc = PyDoc_STR("An view into a buffer for storing a FASTA sequence"),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_new = PyType_GenericNew,
.tp_init = (initproc)FastaBuff_view_init,
.tp_getattro = PyObject_GenericGetAttr,
.tp_iter = (getiterfunc)FastaBuff_view_iter,
.tp_dealloc = (destructor)FastaBuff_view_dealloc,
.tp_str = (reprfunc)FastaBuff_view_str,
.tp_as_mapping = &FastaBuffMap,
.tp_as_sequence = &FastaBuffSeq,
.tp_methods = FastaBuff_viewMethods,
.tp_richcompare = (richcmpfunc)FastaBuff_view_richcompare,
}
static PyObject * FastaBuff_view_str(FastaBuff_view *self)
Definition FastaBuffViews.c:366
static PyObject * FastaBuff_view_iter(FastaBuff_view *self)
Definition FastaBuffViews.c:121
static PySequenceMethods FastaBuffSeq
Definition FastaBuffViews.c:398
static PyMappingMethods FastaBuffMap
Definition FastaBuffViews.c:395
static void FastaBuff_view_dealloc(FastaBuff_view *self)
Definition FastaBuffViews.c:116
int FastaBuff_view_init(FastaBuff_view *self, PyObject *args, PyObject *kwds)
Definition FastaBuffViews.c:90
static PyObject * FastaBuff_view_richcompare(FastaBuff_view *restrict self, PyObject *restrict other, const int op)
Definition FastaBuffViews.c:174
static PyMethodDef FastaBuff_viewMethods[]
Definition FastaBuffViews.c:384
Definition FastaBuffViews.h:26

◆ FastaBuffMap

PyMappingMethods FastaBuffMap
static
Initial value:
= {
.mp_subscript = (binaryfunc)FastaBuff_view_subscript}
static PyObject * FastaBuff_view_subscript(FastaBuff_view *self, PyObject *key)
Definition FastaBuffViews.c:155

◆ FastaBuffSeq

PySequenceMethods FastaBuffSeq
static
Initial value:
= {
.sq_length = (lenfunc)FastaBuff_view_len,
.sq_contains = (objobjproc)FastaBuff_view_contains,
}
static int FastaBuff_view_contains(FastaBuff_view *self, PyObject *other)
Definition FastaBuffViews.c:331
static Py_ssize_t FastaBuff_view_len(FastaBuff_view *self)
Definition FastaBuffViews.c:151