GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
bl_gff_index_add(3) FreeBSD Library Functions Manual bl_gff_index_add(3)

#include <biolibc/gff-index.h>
-lbiolibc -lxtend

int bl_gff_index_add(bl_gff_index_t *gi, bl_gff_t *feature)

gi      Pointer to gff_index_t object to which a record will be added
feature Pointer to GFF feature to be indexed

The gff_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_gff_read(3), which records the file position of each GFF feature it reads.

bl_gff_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_gff_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.

BL_GFF_INDEX_OK on success, BL_GFF_MALLOC_FAILED if memory could not be allocated

bl_gff_index_t  gi;
bl_gff_t        feature;
if ( bl_gff_read(&feature, gff_stream, BL_GFF_FIELD_ALL) == BL_READ_OK )
{
    if ( bl_gff_index_add(&gi, &feature) != BL_GFF_INDEX_OK )
        fprintf(stderr, "Error addind to GFF index.n");
}

bl_gff_index_seek_reverse(3), bl_gff_read(3)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.