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

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

Data Structures

struct  GtfList
 A list that holds geneDicts. More...
 

Functions

static int GtfList_init (GtfList *restrict self, PyObject *args, PyObject *restrict kwds)
 Initializes a new GtfList object.
 
static PyObject * GtfList_findHost (GtfList *restrict self, PyObject *restrict args)
 Finds the host gene of the gene in args assuming this object contains the correct host gene.
 
static int GtfList_mp_ass_subscript (GtfList *restrict self, PyObject *restrict key, PyObject *restrict value)
 Wrapper over the default setitem that performs a type check.
 
static PyObject * GtfList_append (GtfList *restrict self, PyObject *restrict args)
 Wrapper over list.append that throws a type error if the provided arg is not a GtfDict.
 
static PyObject * GtfList_inplace_concat (GtfList *restrict self, PyObject *restrict o)
 concatenates o to self
 
static PyObject * GtfList_extend (GtfList *restrict self, PyObject *restrict args)
 Custom list extend that does a type check.
 
static PyObject * GtfList_insert (GtfList *restrict self, PyObject *restrict args)
 A wrapper over the default list insert that does a type check.
 
static PyObject * GtfList_concat (GtfList *restrict self, PyObject *restrict other)
 non discriminatory implementation of add. Does no checks and returns a LIST
 
static PyObject * GtfList_str (GtfList *restrict self)
 Generates a complete GTF file.
 
static PyObject * GtfList_repr (GtfList *restrict self)
 Generates a representation of the GtfList object.
 
static PyObject * GtfList_sq_split (GtfList *restrict self)
 Splits the gene list into a dict of GtfLists with each GtfList having only one seqname.
 
static PyObject * GtfList_column (GtfList *restrict self, PyObject *restrict args, PyObject *restrict kwargs)
 Gets the values of a column in the GtfList.
 
static PyObject * GtfList_find (GtfList *restrict self, PyObject *restrict args, PyObject *restrict kwargs)
 Finds a sequence within the GtfList.
 

Variables

PyTypeObject GtfListType
 The Python type definition for the GtfList object.
 

Detailed Description

All methods and objects related to the GtfList object.

The GtfList object is a list that holds geneDicts. It is used to store the parsed GTF data. It exists to provide type checking and to allow for easy processing method implementation

Function Documentation

◆ GtfList_append()

static PyObject * GtfList_append ( GtfList *restrict  self,
PyObject *restrict  args 
)
static

Wrapper over list.append that throws a type error if the provided arg is not a GtfDict.

Parameters
self
argsstandard python arg tuple
Returns
None or NULL on error

◆ GtfList_column()

static PyObject * GtfList_column ( GtfList *restrict  self,
PyObject *restrict  args,
PyObject *restrict  kwargs 
)
static

Gets the values of a column in the GtfList.

Parameters
self
argstuple with a single str
kwargsoptional pad argument
Returns
a list of values
Here is the call graph for this function:

◆ GtfList_concat()

static PyObject * GtfList_concat ( GtfList *restrict  self,
PyObject *restrict  other 
)
static

non discriminatory implementation of add. Does no checks and returns a LIST

Parameters
self
otheran iterable to be concatenated
Returns
a new list object

◆ GtfList_extend()

static PyObject * GtfList_extend ( GtfList *restrict  self,
PyObject *restrict  args 
)
static

Custom list extend that does a type check.

Parameters
self
argstuple with a single iterable
Returns
None or NULL on error
Here is the call graph for this function:

◆ GtfList_find()

static PyObject * GtfList_find ( GtfList *restrict  self,
PyObject *restrict  args,
PyObject *restrict  kwargs 
)
static

Finds a sequence within the GtfList.

Parameters
self
argsA list of functions to check the objects against
kwargsA dict of key -> value | function to check the value under the key
Returns
a list of matching objects
Here is the call graph for this function:

◆ GtfList_findHost()

static PyObject * GtfList_findHost ( GtfList *restrict  self,
PyObject *restrict  args 
)
static

Finds the host gene of the gene in args assuming this object contains the correct host gene.

Parameters
self
argsstandard python argument tuple
Returns
None or a new GtfDict reference
Here is the call graph for this function:

◆ GtfList_init()

static int GtfList_init ( GtfList *restrict  self,
PyObject *  args,
PyObject *restrict  kwds 
)
static

Initializes a new GtfList object.

Parameters
self
argsthe arguments tuple, either a tuple of values for a new list, or a tuple with a iterable inside to convert
kwdsmust be NULL or else error

◆ GtfList_inplace_concat()

static PyObject * GtfList_inplace_concat ( GtfList *restrict  self,
PyObject *restrict  o 
)
static

concatenates o to self

Parameters
self
othe object to concatenate to self
Returns
self as a new reference
Here is the caller graph for this function:

◆ GtfList_insert()

static PyObject * GtfList_insert ( GtfList *restrict  self,
PyObject *restrict  args 
)
static

A wrapper over the default list insert that does a type check.

Parameters
self
argstuple with (index, value)
Returns
None or NULL on error

◆ GtfList_mp_ass_subscript()

static int GtfList_mp_ass_subscript ( GtfList *restrict  self,
PyObject *restrict  key,
PyObject *restrict  value 
)
static

Wrapper over the default setitem that performs a type check.

Parameters
self
keyint or slice
valueGtfDict or iterable of GtfDicts
Returns
-1 on error

◆ GtfList_repr()

static PyObject * GtfList_repr ( GtfList *restrict  self)
static

Generates a representation of the GtfList object.

Parameters
self
Returns
a string representation of the object

◆ GtfList_sq_split()

static PyObject * GtfList_sq_split ( GtfList *restrict  self)
static

Splits the gene list into a dict of GtfLists with each GtfList having only one seqname.

Parameters
self
Returns
A dict seqname->GtfList
Here is the call graph for this function:

◆ GtfList_str()

static PyObject * GtfList_str ( GtfList *restrict  self)
static

Generates a complete GTF file.

Parameters
self
Returns
Str PyObject or NULL on error
Here is the call graph for this function:

Variable Documentation

◆ GtfListType

PyTypeObject GtfListType
extern

The Python type definition for the GtfList object.