home | help
bl_gff3_read(3) 	    Library Functions Manual		 bl_gff3_read(3)

NAME
     bl_gff3_read() - Read a GFF3 feature

LIBRARY
     #include <biolibc/gff3.h>
     -lbiolibc -lxtend

SYNOPSIS
     int     bl_gff3_read(bl_gff3_t *feature, FILE *gff3_stream,
     gff3_field_mask_t field_mask)

ARGUMENTS
     feature	     Pointer to a bl_gff3_t structure
     gff3_stream      A FILE stream from which to read the line
     field_mask      Bit mask indicating which fields to store in feature

DESCRIPTION
     Read next feature (line) from a GFF file.

     feature must be initialized using BL_GFF3_INIT or bl_gff3_init() before be-
     ing passed to this function.

     bl_gff3_read()  will  allocate memory for string fields as needed.  The ob-
     ject should be passed to bl_gff3_free() as soon as possible after the  data
     are no longer needed.

     If  passed  an  object  that is not in an initialized state, bl_gff3_read()
     will free and initialize it before repopulating it with a new feature.

     If field_mask is not BL_GFF3_FIELD_ALL, fields not indicated by a 1 in  the
     bit  mask	are  discarded rather than stored in feature.  That field in the
     structure is then populated with an appropriate marker, such as '.'.   Pos-
     sible mask values are:

     BL_GFF3_FIELD_ALL		BL_GFF3_FIELD_SEQID	    BL_GFF3_FIELD_SOURCE
     BL_GFF3_FIELD_TYPE 	 BL_GFF3_FIELD_START	       BL_GFF3_FIELD_END
     BL_GFF3_FIELD_SCORE	 BL_GFF3_FIELD_STRAND	     BL_GFF3_FIELD_PHASE
     BL_GFF3_FIELD_ATTRIBUTES

RETURN VALUES
     BL_READ_OK on successful read BL_READ_EOF if EOF  is  encountered	after  a
     complete  feature BL_READ_TRUNCATED if EOF or bad data is encountered else-
     where

EXAMPLES
     bl_gff3_skip_header(stdin);
     bl_gff3_init(&feature);

     bl_gff3_read(&feature, stdin, BL_GFF3_FIELD_ALL);
     bl_gff3_read(&feature, gff3_stream,
	 BL_GFF3_FIELD_SEQID|BL_GFF3_FIELD_START|BL_GFF3_FIELD_END);

SEE ALSO
     bl_gff3_write(3)

								 bl_gff3_read(3)

home | help