![]() |
![]()
| ![]() |
![]()
NAMEbl_gff3_index_seek_reverse() - Search backward through GFF3 index LIBRARY#include <biolibc/gff3-index.h> -lbiolibc -lxtend SYNOPSISint bl_gff3_index_seek_reverse(bl_gff3_index_t *gi, FILE *stream, bl_gff3_t *feature, int64_t feature_count, int64_t max_nt) ARGUMENTSgi Pointer to the gff3_index_t object used to search feature Feature from which search starts feature_count Number of indexed features to back up from feature max_nt Maximum number of nucleotides to back up 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_seek_reverse(3) moved the FILE pointer stream to feature_count indexed features upstream of feature, or to the most upstream feature within max_nt of feature. A max_nt of 0 indicates no maximum distance, i.e. the search will proceed to feature_count features behind feature or to the beginning of the file, whichever is encontered first. The max_nt parameter refers to the END of a feature, i.e. bl_gff3_index_seek_reverse() will back up to a feature that overlaps the position of feature minus max_nt. The START position of the feature moved to could be more than max_nt nucleotides behind the START of feature. Note that this function counts only *indexed* features, i.e. those added to gi by bl_gff3_index_add(3), not all features in the GFF file. An application may only add genes to the index, for example, ignoring exons, etc. RETURN VALUESThe return value of fseek(), i.e. 0 upon success, -1 on error EXAMPLESbl_gff3_index_t gi; bl_gff3_t feature; long new_pos; new_pos = bl_gff3_index_seek_reverse(&gi, &feature, 4, 200000); SEE ALSObl_gff3_index_add(3), fseek(3), bl_gff3_read(3)
|