![]() |
![]()
| ![]() |
![]()
NAMEbl_gff3_index_add() - Add a GFF3 feature to an in-memory index LIBRARY#include <biolibc/gff3-index.h> -lbiolibc -lxtend SYNOPSISint bl_gff3_index_add(bl_gff3_index_t *gi, bl_gff3_t *feature) ARGUMENTSgi Pointer to gff3_index_t object to which a record will be added feature Pointer to GFF feature to be indexed DESCRIPTIONThe gff3_index_t class maintains an in-memory index of GFF features, containing the GFF fields SEQ_ID, START, and END, and the offset into the file as reported by ftell(3), or by bl_gff3_read(3), which records the file position of each GFF feature it reads. bl_gff3_index_add_pos(3) adds a GFF feature with file position file_pos to the index. Features of interest, perhaps only genes or only exons, can be added to the index on-the fly while reading through a GFF file with bl_gff3_read(3). The index can later be searched or traversed forward or backward to quickly find the location of a feature and reposition a FILE pointer to it using fseek(3). This system eliminates the need to inhale large numbers of GFF features into memory. RETURN VALUESBL_GFF3_INDEX_OK on success, BL_GFF3_MALLOC_FAILED if memory could not be allocated EXAMPLESbl_gff3_index_t gi; bl_gff3_t feature; if ( bl_gff3_read(&feature, gff3_stream, BL_GFF3_FIELD_ALL) == BL_READ_OK ) { SEE ALSObl_gff3_index_seek_reverse(3), bl_gff3_read(3)
|