12#include "../classes/GtfDict/GtfDict.h"
27#define DEFAULT_ATTR_SIZE \
44 hashmap_t *restrict attr_keys,
45 hashmap_t *restrict attr_vals);
68char *
write_owned(
char *restrict buf,
size_t *restrict len,
size_t *alloc,
69 const char *restrict in,
size_t inLen);
82 size_t *restrict len,
size_t *restrict alloc);
117#define CORE_FIELD_COUNT 8
137#define GFF3_FASTA_HEADER "##FASTA"
const PyTypeObject * keyword_types[CORE_FIELD_COUNT]
Array containing the types of the keywords.
Definition gtf.c:671
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.
const char * keywords[CORE_FIELD_COUNT]
Array containing the keywords of the GTF fields.
Definition gtf.c:665
bool validGTFLineToParse(const char *line, size_t len)
Determines if the provided line is a valid GTF line that can be parsed safely.
Definition gtf.c:23
#define CORE_FIELD_COUNT
The number of core fields in a GTF line.
Definition gtf.h:117
const uint8_t keyword_sizes[CORE_FIELD_COUNT]
Array containing the sizes of the keywords.
Definition gtf.c:669
gtfFields
Enum containing the fields that a GTF line can contain.
Definition gtf.h:100
@ SOURCE
Definition gtf.h:102
@ SEQNAME
Definition gtf.h:101
@ START
Definition gtf.h:104
@ FRAME
Definition gtf.h:108
@ ATTRIBUTES
Definition gtf.h:109
@ REVERSE
Definition gtf.h:107
@ FEATURE
Definition gtf.h:103
@ END
Definition gtf.h:105
@ SCORE
Definition gtf.h:106
int GtfDict_as_annotation(PyObject *restrict object, long *restrict start, long *restrict end)
Converts a GtfDict or mapping object to an annotation.
Definition gtf.c:633
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.
Definition gtf.c:520
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.
Definition gtf.c:590
A dict that holds GTF data.
Definition GtfDict.h:30
An occurrence of a token in a string.
Definition common.h:30