|
LIBRARY#include <biolibc/fastq.h> -lbiolibc -lxtend SYNOPSISint bl_fastq_read(bl_fastq_t *record, FILE *fastq_stream)ARGUMENTSfastq_stream FILE stream from which FASTQ data are read record Pointer to a bl_fastq_t structure to receive data DESCRIPTIONRead a FASTQ record from a FILE stream. Each record must begin with a description line (beginning with '@'), which is then followed by one or more lines of sequence data, a separator line beginning with '+', and a line of quality scores. The end of the sequence is marked either by the next description line or EOF. If desc_len and seq_len are 0 (e.g. the structure is initialized with BL_FASTQ_INIT or bl_fastq_init(3), has been freed with bl_fastq_free(3), then memory is allocated for each line.Otherwise, the existing allocated buffers are reused. Hence, when reading many FASTQ records of the same length, only one allocation is needed. In any case, the buffers are automatically enlarged if they become full and automatically trimmed to the actual data size after reading is complete. Buffer memory should be freed as soon as possible by calling bl_fastq_free(3). RETURN VALUESBL_READ_OK upon successful read of description and sequence BL_READ_BAD_DATA if something is amiss with input format BL_READ_EOF if no more data are availableEXAMPLESbl_fastq_t rec = BL_FASTQ_INIT; while ( bl_fastq_read(stdin, &rec) != BL_READ_EOF ) bl_fastq_write(stdout, &rec, BL_FASTQ_LINE_UNLIMITED); bl_fastq_free(&rec); SEE ALSObl_fastq_write(3), bl_fastq_read(3), bl_fastq_write(3), bl_fastq_free(3) Visit the GSP FreeBSD Man Page Interface. |