|
eccLib 1.1.0
Python library for bioinformatics written in C
|
Module providing functions for handling GTF data. More...
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. | |
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. | |
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. | |
Module providing functions for handling GTF data.
| #define CORE_FIELD_COUNT 8 |
The number of core fields in a GTF line.
This is better than using ATTRIBUTES, as it's more descriptive
| #define DEFAULT_ATTR_SIZE 64 |
How many attributes should be allocated by default.
| enum gtfFields |
| 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.
| token | the GTF line to parse. It should contain a minimum of 7 \t, else it will throw an error |
| attr_tp | a mapping containing the callable to use to convert the attribute values to the correct type, or None |
| attr_keys | a hashmap containing the keys of the attributes |
| attr_vals | a hashmap containing the values of the attributes |
| bool validGTFLineToParse | ( | const char * | line, |
| size_t | len | ||
| ) |
Determines if the provided line is a valid GTF line that can be parsed safely.
A line is considered valid if it doesn't start with a # and contains at least one \t
| line | the line to check |
| len | the length of the line |

|
extern |
Array containing the sizes of the keywords.
|
extern |
Array containing the keywords of the GTF fields.