eccLib 1.1.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Macros | Enumerations | Functions | Variables
gtf.h File Reference

Header file for the GTF module. More...

#include <Python.h>
#include <stdlib.h>
#include "../classes/GtfDict.h"
#include "../common.h"
Include dependency graph for gtf.h:
This graph shows which files directly or indirectly include this file:

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

GtfDictcreateGTFdict (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 * gtf_percent_encode (const char *restrict str, size_t len, size_t *restrict outLen)
 Percent encodes restricted GTF characters.
 

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.
 

Detailed Description

Header file for the GTF module.

Macro Definition Documentation

◆ GFF3_FASTA_HEADER

#define GFF3_FASTA_HEADER   "##FASTA"

Function Documentation

◆ gtf_percent_encode()

char * gtf_percent_encode ( const char *restrict  str,
size_t  len,
size_t *restrict  outLen 
)

Percent encodes restricted GTF characters.

Parameters
strthe string to percent encode
lenthe length of the string
outLenthe length of the output string
Returns
a newly allocated string with percent encoded characters
Here is the call graph for this function:
Here is the caller graph for this function: