[Bio] / FigKernelScripts / gjoseqio.h Repository:
ViewVC logotype

View of /FigKernelScripts/gjoseqio.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon Jun 11 20:08:03 2012 UTC (7 years, 5 months ago) by golsen
Branch: MAIN
CVS Tags: rast_rel_2014_0729, rast_rel_2014_0912, HEAD
Support for codon usage analyses.

/*
 *   gjoseqio.h
 */

#ifndef GJOSEQIO_H
#define GJOSEQIO_H

#include <stdio.h>      // FILE
#include "gjoseqlib.h"  // seq_t

#define IDBUFSIZE     1024
#define DEFBUFSIZE   65536
#define SEQBUFSIZE 1048576

typedef struct databuf
{
    size_t              segsize;
    size_t              nsegalloc;
    size_t              datasize;
    struct databufseg * seg;
}  databuf_t, *databufptr_t;

typedef struct databufseg
{
    struct databuf    * buffer;
    size_t              segnum;
    size_t              segsize;
    char              * datum;
    struct databufseg * next;
} databufseg_t, *databufsegptr_t;


int
write_fasta_entry( FILE * fptr, seq_t * entry );

seqptr_t
read_next_fasta( FILE * fptr );

int
read_fasta_id( FILE * fptr, databuf_t * idbuf );

int
init_buffer( databuf_t * buf );

databufseg_t *
next_buffer_seg( databufseg_t * seg );

int
buffer_2_string( databuf_t * buffer, char ** strptr, size_t * lenptr );

databufseg_t *
extend_buffer( databuf_t * buffer, databufseg_t * prev, size_t segsize );


#endif

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3