|
eccLib 1.3.0
Python library for bioinformatics written in C
|
Header file for the GTF module. More...
#include <Python.h>#include <stdlib.h>#include "../classes/GtfDict/GtfDict.h"#include "../common.h"

Go to the source code of this file.
Macros | |
| #define | DEFAULT_ATTR_SIZE 64 |
| How many attributes should be allocated by default. | |
| #define | CORE_FIELD_COUNT 8 |
| The number of core fields in a GTF line. | |
| #define | GFF3_FASTA_HEADER "##FASTA" |
Enumerations | |
| enum | gtfFields { SEQNAME = 0 , SOURCE = 1 , FEATURE = 2 , START = 3 , END = 4 , SCORE = 5 , REVERSE = 6 , FRAME = 7 , ATTRIBUTES = 8 } |
| Enum containing the fields that a GTF line can contain. More... | |
Functions | |
| GtfDict * | createGTFdict (const occurrence_t *restrict token, PyObject *attr_tp, hashmap_t *restrict attr_keys, hashmap_t *restrict attr_vals) |
| Parses a singular GTF line into a Python dict. | |
| bool | validGTFLineToParse (const char *line, size_t len) |
| Determines if the provided line is a valid GTF line that can be parsed safely. | |
| char * | write_owned (char *restrict buf, size_t *restrict len, size_t *alloc, const char *restrict in, size_t inLen) |
| Writes a string to the output buffer, reallocing if necessary. | |
| char * | GtfDict_dump (GtfDict *restrict const self, char *restrict in, size_t *restrict len, size_t *restrict alloc) |
| Dumps the contents of a GtfDict to a string. | |
| int | GtfDict_as_annotation (PyObject *restrict object, long *restrict start, long *restrict end) |
| Converts a GtfDict or mapping object to an annotation. | |
Variables | |
| const char * | keywords [CORE_FIELD_COUNT] |
| Array containing the keywords of the GTF fields. | |
| const uint8_t | keyword_sizes [CORE_FIELD_COUNT] |
| Array containing the sizes of the keywords. | |
| const PyTypeObject * | keyword_types [CORE_FIELD_COUNT] |
| Array containing the types of the keywords. | |
Header file for the GTF module.
| #define GFF3_FASTA_HEADER "##FASTA" |
| int GtfDict_as_annotation | ( | PyObject *restrict | object, |
| long *restrict | start, | ||
| long *restrict | end | ||
| ) |
Converts a GtfDict or mapping object to an annotation.
| object | the object to convert |
| start | a pointer to the start of the annotation |
| end | a pointer to the end of the annotation |

| char * GtfDict_dump | ( | GtfDict *restrict const | self, |
| char *restrict | in, | ||
| size_t *restrict | len, | ||
| size_t *restrict | alloc | ||
| ) |
Dumps the contents of a GtfDict to a string.
| self | the GtfDict to dump |
| in | the input buffer to write to |
| len | a pointer to the length of the output string |
| alloc | a pointer to the size of the allocated output string |


| char * write_owned | ( | char *restrict | buf, |
| size_t *restrict | len, | ||
| size_t * | alloc, | ||
| const char *restrict | in, | ||
| size_t | inLen | ||
| ) |
Writes a string to the output buffer, reallocing if necessary.
| buf | The output buffer |
| len | The length of the output buffer |
| alloc | a pointer to the size of the allocated output buffer |
| in | The string to write |
| inLen | The length of the string to write |
