eccLib 1.3.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
GtfDict

All methods and objects related to the GtfDict object. More...

Data Structures

struct  GtfDict
 A dict that holds GTF data. More...
 

Functions

static int GtfDict_init_state (GtfDict *self)
 Initializes the state of a GtfDict object.
 
static GtfDictGtfDict_new (PyTypeObject *type, PyObject *args, PyObject *kwargs)
 Creates a new GtfDict object.
 
static int GtfDict_init (GtfDict *restrict self, PyObject *restrict args, PyObject *restrict kwargs)
 GtfDict.__init__()
 
static PyObject * GtfDict_getattro (GtfDict *restrict self, PyObject *restrict attr)
 A wrapper over the dict getattro that also acts as a getter for the 7 key GTF keys.
 
static int GtfDict_setattro (GtfDict *restrict self, PyObject *restrict attr, PyObject *restrict value)
 A wrapper over the dict setattro that also acts as a setter for the 7 key GTF keys.
 
static PyObject * GtfDict_richcompare (GtfDict *restrict self, PyObject *restrict other, const int op)
 A custom GtfDict richcompare.
 
static PyObject * GtfDict_overlaps (GtfDict *restrict self, PyObject *restrict other)
 A custom method that determines if self overlaps with a different GtfDict.
 
static PyObject * GtfDict_contains (GtfDict *restrict self, PyObject *restrict other)
 Wrapper over GtfDict_containsValue() that allows for this method to be used as standalone.
 
static PyObject * GtfDict_coverage (GtfDict *restrict self, PyObject *restrict other)
 A custom method that returns the percentage of the gene that is covered by the other GtfDict.
 
static Py_ssize_t GtfDict_len (GtfDict *restrict self)
 Custom len method that returns actually the result of subtracting start from end.
 
static PyObject * GtfDict_str (GtfDict *restrict self)
 returns the GTF representation of the GtfDict
 
static int GtfDict_setitem (GtfDict *restrict self, PyObject *restrict key, PyObject *restrict value)
 A custom setitem that also checks the core attributes.
 
static PyObject * GtfDict_values (GtfDict *restrict self)
 A function that returns the values of the GtfDict.
 
static PyObject * GtfDict_items (GtfDict *restrict self)
 A custom items method that also checks the core attributes.
 
static PyObject * GtfDict_iter (GtfDict *restrict self)
 Returns the iterator for the GtfDict.
 
static PyObject * GtfDict_pop (GtfDict *restrict self, PyObject *restrict args)
 A custom pop method that also checks the core attributes.
 
static PyObject * GtfDict_get (GtfDict *restrict self, PyObject *restrict args)
 A custom get method that also allows for a default value to be provided.
 
static PyObject * GtfDict_update (GtfDict *restrict self, PyObject *restrict args, PyObject *restrict kwargs)
 A custom update method that also checks the core attributes.
 
static void GtfDict_free_state (GtfDict *self)
 Frees the state of a GtfDict object.
 
static PyObject * GtfDict_clear (GtfDict *self)
 Clears the contents of a GtfDict object.
 
static void GtfDict_dealloc (GtfDict *restrict self)
 Custom deallocator that deallocates all the core attributes.
 
static PyObject * GtfDict_repr (PyObject *restrict self)
 A custom repr method that returns a dict representation of the GtfDict.
 
static PyObject * GtfDict_attributes (GtfDict *restrict self)
 Returns a dict representation of the attributes of the GtfDict.
 
static PyObject * GtfDict_getstate (GtfDict *restrict self)
 Returns the state of the GtfDict as a tuple.
 
static PyObject * GtfDict_setstate (PyObject *self, PyObject *state)
 Creates a new GtfDict from a state tuple.
 
PyObject * GtfDict_keys (GtfDict *restrict self)
 GtfDict.keys()
 
PyObject * GtfDict_getitem (GtfDict *restrict self, PyObject *restrict key)
 A custom getitem that also checks the core attributes.
 

Variables

PyTypeObject GtfDictType
 The Python type definition for the GtfDict object.
 

Detailed Description

All methods and objects related to the GtfDict object.

Function Documentation

◆ GtfDict_attributes()

static PyObject * GtfDict_attributes ( GtfDict *restrict  self)
static

Returns a dict representation of the attributes of the GtfDict.

Parameters
self
Returns
the dict representation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_clear()

static PyObject * GtfDict_clear ( GtfDict self)
static

Clears the contents of a GtfDict object.

Parameters
selfThe GtfDict object to clear.
Here is the call graph for this function:

◆ GtfDict_contains()

static PyObject * GtfDict_contains ( GtfDict *restrict  self,
PyObject *restrict  other 
)
static

Wrapper over GtfDict_containsValue() that allows for this method to be used as standalone.

Parameters
self
otherthe other GtfDict to compare with
Returns
PyBool result
Here is the call graph for this function:

◆ GtfDict_coverage()

static PyObject * GtfDict_coverage ( GtfDict *restrict  self,
PyObject *restrict  other 
)
static

A custom method that returns the percentage of the gene that is covered by the other GtfDict.

Parameters
self
otherthe other GtfDict to compare with
Returns
PyFloat representing the coverage percentage

◆ GtfDict_dealloc()

static void GtfDict_dealloc ( GtfDict *restrict  self)
static

Custom deallocator that deallocates all the core attributes.

Parameters
self
Here is the call graph for this function:

◆ GtfDict_free_state()

static void GtfDict_free_state ( GtfDict self)
static

Frees the state of a GtfDict object.

Parameters
selfThe GtfDict object to free.
Note
This function does not free the GtfDict object itself, only its state.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_get()

static PyObject * GtfDict_get ( GtfDict *restrict  self,
PyObject *restrict  args 
)
static

A custom get method that also allows for a default value to be provided.

Parameters
self
argsthe argument tuple
Returns
new reference to the gotten value
Here is the call graph for this function:

◆ GtfDict_getattro()

static PyObject * GtfDict_getattro ( GtfDict *restrict  self,
PyObject *restrict  attr 
)
static

A wrapper over the dict getattro that also acts as a getter for the 7 key GTF keys.

Parameters
self
attrPyUnicode encoded attribute name string
Returns
the gotten attr value

◆ GtfDict_getitem()

PyObject * GtfDict_getitem ( GtfDict *restrict  self,
PyObject *restrict  key 
)

A custom getitem that also checks the core attributes.

Parameters
self
keythe key to get
Returns
new reference to the gotten value
Here is the caller graph for this function:

◆ GtfDict_getstate()

static PyObject * GtfDict_getstate ( GtfDict *restrict  self)
static

Returns the state of the GtfDict as a tuple.

Parameters
self
Returns
the state tuple
Here is the call graph for this function:

◆ GtfDict_init()

static int GtfDict_init ( GtfDict *restrict  self,
PyObject *restrict  args,
PyObject *restrict  kwargs 
)
static

GtfDict.__init__()

Parameters
selfthe GtfDict instance being instantiated
argsthe passed argument tuple
kwargsthe passed keywords argument as a dict
Returns
-1 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_init_state()

static int GtfDict_init_state ( GtfDict self)
static

Initializes the state of a GtfDict object.

Parameters
selfthe GtfDict to initialize
Returns
0 on success, -1 on failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_items()

static PyObject * GtfDict_items ( GtfDict *restrict  self)
static

A custom items method that also checks the core attributes.

Parameters
self
Returns
a list of tuples containing the key-value pairs
Here is the call graph for this function:

◆ GtfDict_iter()

static PyObject * GtfDict_iter ( GtfDict *restrict  self)
static

Returns the iterator for the GtfDict.

Parameters
self
Returns
the iterator
Here is the call graph for this function:

◆ GtfDict_keys()

PyObject * GtfDict_keys ( GtfDict *restrict  self)

GtfDict.keys()

Parameters
self
Returns
a list of keys
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_len()

static Py_ssize_t GtfDict_len ( GtfDict *restrict  self)
static

Custom len method that returns actually the result of subtracting start from end.

Parameters
self
Returns
the gene length

◆ GtfDict_new()

static GtfDict * GtfDict_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwargs 
)
static

Creates a new GtfDict object.

Parameters
typethe GtfDict type object
argsthe passed argument tuple
kwargsthe passed keywords argument as a dict
Returns
a new GtfDict object, or NULL on error
Here is the call graph for this function:

◆ GtfDict_overlaps()

static PyObject * GtfDict_overlaps ( GtfDict *restrict  self,
PyObject *restrict  other 
)
static

A custom method that determines if self overlaps with a different GtfDict.

Parameters
self
otherthe other GtfDict to compare with
Returns
PyBool

◆ GtfDict_pop()

static PyObject * GtfDict_pop ( GtfDict *restrict  self,
PyObject *restrict  args 
)
static

A custom pop method that also checks the core attributes.

Parameters
self
argsthe argument tuple
Returns
new reference to the popped value
Here is the call graph for this function:

◆ GtfDict_repr()

static PyObject * GtfDict_repr ( PyObject *restrict  self)
static

A custom repr method that returns a dict representation of the GtfDict.

Parameters
self
Returns
the dict representation

◆ GtfDict_richcompare()

static PyObject * GtfDict_richcompare ( GtfDict *restrict  self,
PyObject *restrict  other,
const int  op 
)
static

A custom GtfDict richcompare.

Parameters
self
otherthe object that should be compared with self. Mapping or GtfDict
opwhat operation is being performed
Returns
PyBool describing the result
Note
Here the operator overrides are defined

◆ GtfDict_setattro()

static int GtfDict_setattro ( GtfDict *restrict  self,
PyObject *restrict  attr,
PyObject *restrict  value 
)
static

A wrapper over the dict setattro that also acts as a setter for the 7 key GTF keys.

Parameters
self
attrPyUnicode encoded attribute name string
valuethe value that the attribute should be set to. Doesn't steal the reference. Hopefully that's the expected behaviour
Returns
-1 on error
Here is the call graph for this function:

◆ GtfDict_setitem()

static int GtfDict_setitem ( GtfDict *restrict  self,
PyObject *restrict  key,
PyObject *restrict  value 
)
static

A custom setitem that also checks the core attributes.

Parameters
self
keythe key to set
valueborrowed value to set
Returns
-1 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GtfDict_setstate()

static PyObject * GtfDict_setstate ( PyObject *  self,
PyObject *  state 
)
static

Creates a new GtfDict from a state tuple.

Parameters
self
statethe state tuple
Returns
the new GtfDict
Note
This is a static method of the GtfDict class
Here is the call graph for this function:

◆ GtfDict_str()

static PyObject * GtfDict_str ( GtfDict *restrict  self)
static

returns the GTF representation of the GtfDict

Parameters
self
Returns
PyUnicode GTF representation
Here is the call graph for this function:

◆ GtfDict_update()

static PyObject * GtfDict_update ( GtfDict *restrict  self,
PyObject *restrict  args,
PyObject *restrict  kwargs 
)
static

A custom update method that also checks the core attributes.

Parameters
self
argsthe argument tuple
kwargsthe keyword arguments
Returns
None
Here is the call graph for this function:

◆ GtfDict_values()

static PyObject * GtfDict_values ( GtfDict *restrict  self)
static

A function that returns the values of the GtfDict.

Parameters
self
Returns
a list of the values
Here is the call graph for this function:

Variable Documentation

◆ GtfDictType

PyTypeObject GtfDictType
extern

The Python type definition for the GtfDict object.