Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

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

NAME
       bl_fastq_read() - Read a	FASTQ record

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

SYNOPSIS
       int     bl_fastq_read(bl_fastq_t	*record, FILE *fastq_stream)

ARGUMENTS
       fastq_stream    FILE stream from	which FASTQ data are read
       record	       Pointer to a bl_fastq_t structure to receive data

DESCRIPTION
       Read  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 VALUES
       BL_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	available

EXAMPLES
       bl_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 ALSO
       bl_fastq_write(3),	  bl_fastq_read(3),	    bl_fastq_write(3),
       bl_fastq_free(3)

							      bl_fastq_read(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=bl_fastq_read&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help