gsuffix/gs2k.h File Reference

Main header file for the gsuffix library. More...

#include <stdio.h>

Include dependency graph for gs2k.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  plain_sequence
 Represents a sequence entry. More...
struct  plain_fasta
 Represents the contents of a fasta file without any further interpretation. More...
struct  labeled_sequence
 Represents a labeled sequence. More...
struct  labeled_fasta
 Represents labeled sequences. More...
struct  gsuffix
 An opaque data type representing an index. More...

Defines

#define is_amino(c)   (__amino[(unsigned char)c])
 is the given character an amino acid?
#define is_extamino(c)   (__ext_amino[(unsigned char)c])
 is the given character an extended amino acid?
#define is_dna(c)   (__dna[(unsigned char)(c)])
 is the given character an dna character?
#define GENSARRAY_OPT_DIRECT_INDEX_SEARCH   (1<<0)
#define GENSARRAY_OPT_BINARY_INDEX_SEARCH   (1<<1)
#define GENSARRAY_OPT_8BIT   (1<<2)
#define GENHASH_OPT_DIRECT_INDEX_SEARCH   (1<<0)
#define GENHASH_OPT_BINARY_INDEX_SEARCH   (1<<1)

Enumerations

enum  gsuffix_type {
  GSUFFIX_SUFFIXARRAY, GSUFFIX_LOTRUNCSUFFIXTREE, GSUFFIX_HASH, GSUFFIX_LOSUFFIXTREE,
  GSUFFIX_DIRECT
}
 types of index data structures supported by gsuffix_create(). More...

Functions

void init_amino (void)
 initialize character tables.
int are_sequences_dna (const char **seq, int nseq)
int fasta_read (FILE *fh, int(*sequence_function)(char *name, char *sequence, int sequence_len, void *userdata), void *userdata)
 Read and parse a FASTA file.
struct plain_fastafasta_read_plain (FILE *fh)
 Parses the FASTA file from the given filehandle and returns the contents.
void fasta_free_plain (struct plain_fasta *fasta)
 Free all memory associated with the given fasta instance.
struct labeled_fastafasta_read_labeled (FILE *fh)
 Parse and read a labeled FASTA file.
void fasta_free_labeled (struct labeled_fasta *fasta)
 Frees all memory associated with the given a labeled fasta instance.
struct gsuffixgsuffix_create (char **strings, int nstrings, enum gsuffix_type type, int query_length, int options)
 Create an index data structure of the given type.
void gsuffix_delete (struct gsuffix *gs)
 Frees all resources of the given gsuffix instance.
int gsuffix_lookup (struct gsuffix *gs, const char *p, int m, int(*hit_callback)(int index, int pos, void *userdata), void *userdata)
 Look up an individual query sequence.
int gsuffix_lookup_exists (struct gsuffix *gs, const char *p, int m)
 Check whether the given pattern of size m exists in the index.
int gsuffix_enum_k_mers (struct gsuffix *gs, int k, int(*callback)(char *kmer, int id, int pos, void *userdata), void *userdata)
 Enumerates all k-mers of the given length.

Variables

unsigned char __amino [256]
 table for amino acids
unsigned char __ext_amino [256]
 table for extended amio acids
unsigned char __dna [256]
 table for dna


Detailed Description

Main header file for the gsuffix library.


Function Documentation

int are_sequences_dna ( const char **  seq,
int  nseq 
)

Returns whether the given sequences are all dna sequences.

Parameters:
seq array of sequences to be checked. Every sequence should be 0-byte terminated.
nseq number of sequences to be checked.
Returns:
1 if all sequences are composed of letters of the DNA alphabet.
Examples:
measure.c.

void init_amino ( void   ) 

initialize character tables.

Call this before using is_amino(), is_extamino(c), is_dna(), or are_sequences_dna().

Examples:
measure.c.


Generated on Wed May 27 16:40:40 2009 for gsuffix-1.0.0 by  doxygen 1.5.9