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

NAME
     bl_next_stop_codon() - Find next stop codon

LIBRARY
     #include <biolibc/translate.h>
     -lbiolibc

SYNOPSIS
     long    bl_next_stop_codon(FILE *rna_stream, char codon[4])

ARGUMENTS
     rna_stream  FILE stream containing RNA sequence data
     codon	 4-character buffer to receive codon sequence
     Set to "" if no codon found

DESCRIPTION
     Locate  the next stop codon in stream and report its position in the input.
     Reported positions are 0-based offsets from the file position at  the  time
     of the call.  Hence, to find the absolute positions of codons within a file
     stream  across  multiple  calls to next_start_codon() or next_stop_codon(),
     their return values should added to the previous return value + 3 (the size
     of the previous codon).  For example, givent the following input:

     acaucauguucguggugacc

     A call to next_start_codon() will return 5 (off set of AUG from the  begin-
     ning of the sequence and a subsequent call to next_stop_codon() will return
     7 (offset of UGA from the first base after the AUG).

RETURN VALUES
     1-based  position	of  the  next  stop codon within the stream or EOF if no
     codon is found.

EXAMPLES
     unsigned long   pos;
     char	     codon[4];

     if ( (pos = next_start_codon(stdin)) != EOF )
     {
	 printf("Start codon at %lu.n", pos);
	 if ( (pos = next_stop_codon(stdin, codon)) != EOF )
	     printf("Stop codon %s at %lu.n", codon, pos);
	 else
	     puts("No stop codon found.");
     }
     else
	 puts("No start codon found.");

SEE ALSO
     next_stop_codon(3)

							   bl_next_stop_codon(3)

home | help