Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ureadseq.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "ureadseq.h"

Defines

#define UREADSEQ_G
#define Local   static
#define kStartLength   500
#define fixmatchchar(s)
#define tolowerstr(s)
#define ReadOneLine(sp)
#define kMaxseqwidth   250

Functions

int Strcasecmp (const char *a, const char *b)
int Strncasecmp (const char *a, const char *b, long maxn)
int isSeqChar (int c)
int isSeqNumChar (int c)
int isAnyChar (int c)
Local void readline (FILE *f, char *s, long *linestart)
Local void getline (struct ReadSeqVars *V)
Local void ungetline (struct ReadSeqVars *V)
Local void addseq (char *s, struct ReadSeqVars *V)
Local void countseq (char *s, struct ReadSeqVars *V)
Local void addinfo (char *s, struct ReadSeqVars *V)
Local void readLoop (short margin, boolean addfirst, boolean(*endTest)(boolean *addend, boolean *ungetend, struct ReadSeqVars *V), struct ReadSeqVars *V)
Local boolean endIG (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readIG (struct ReadSeqVars *V)
Local boolean endStrider (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readStrider (struct ReadSeqVars *V)
Local boolean endPIR (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readPIR (struct ReadSeqVars *V)
Local boolean endGB (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readGenBank (struct ReadSeqVars *V)
Local boolean endNBRF (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readNBRF (struct ReadSeqVars *V)
Local boolean endPearson (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readPearson (struct ReadSeqVars *V)
Local boolean endEMBL (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readEMBL (struct ReadSeqVars *V)
Local boolean endZuker (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readZuker (struct ReadSeqVars *V)
Local boolean endFitch (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readFitch (struct ReadSeqVars *V)
Local void readPlain (struct ReadSeqVars *V)
Local void readUWGCG (struct ReadSeqVars *V)
Local void readOlsen (struct ReadSeqVars *V)
Local void readMSF (struct ReadSeqVars *V)
Local void readPAUPinterleaved (struct ReadSeqVars *V)
Local void readPAUPsequential (struct ReadSeqVars *V)
Local void readPhylipInterleaved (struct ReadSeqVars *V)
Local boolean endPhylipSequential (boolean *addend, boolean *ungetend, struct ReadSeqVars *V)
Local void readPhylipSequential (struct ReadSeqVars *V)
Local void readSeqMain (struct ReadSeqVars *V, const long skiplines_, const short format_)
char * readSeqFp (const short whichEntry_, FILE *fp_, const long skiplines_, const short format_, long *seqlen_, short *nseq_, short *error_, char *seqid_)
char * readSeq (const short whichEntry_, const char *filename_, const long skiplines_, const short format_, long *seqlen_, short *nseq_, short *error_, char *seqid_)
char * listSeqs (const char *filename_, const long skiplines_, const short format_, short *nseq_, short *error_)
short seqFileFormat (const char *filename, long *skiplines, short *error)
short seqFileFormatFp (FILE *fseq, long *skiplines, short *error)
unsigned long GCGchecksum (const char *seq, const long seqlen, unsigned long *checktotal)
unsigned long CRC32checksum (const char *seq, const long seqlen, unsigned long *checktotal)
short getseqtype (const char *seq, const long seqlen)
char * compressSeq (const char gapc, const char *seq, const long seqlen, long *newlen)
short writeSeq (FILE *outf, const char *seq, const long seqlen, const short outform, const char *seqid)

Variables

const char * aminos = "ABCDEFGHIKLMNPQRSTVWXYZ*"
const char * primenuc = "ACGTU"
const char * protonly = "EFIPQZ"
const char kNocountsymbols [5] = "_.-?"
const char stdsymbols [6] = "_.-*?"
const char allsymbols [32] = "_.-*?<>{}[]()!@#$%^&=+;:'/|`~\"\\"
static const char * seqsymbols = allsymbols
const char nummask [11] = "0123456789"
const char nonummask [11] = "~!@#$%^&*("
const unsigned long crctab []

Define Documentation

#define fixmatchchar  ) 
 

Value:

{ \
  for (ifmc=0; ifmc<saveseqlen; ifmc++) \
    if (s[ifmc] == V->matchchar) s[ifmc]= saveseq[ifmc]; }

#define kMaxseqwidth   250
 

#define kStartLength   500
 

#define Local   static
 

#define ReadOneLine sp   ) 
 

Value:

{ done |= (feof(fseq)); \
    readline( fseq, sp, &linestart);  \
    if (!done) { splen = strlen(sp); ++nlines; } }

#define tolowerstr  ) 
 

Value:

{ long Itlwr, Ntlwr= strlen(s); \
  for (Itlwr=0; Itlwr<Ntlwr; Itlwr++) s[Itlwr]= to_lower(s[Itlwr]); }

#define UREADSEQ_G
 


Function Documentation

Local void addinfo char *  s,
struct ReadSeqVars V
 

Local void addseq char *  s,
struct ReadSeqVars V
 

char* compressSeq const char  gapc,
const char *  seq,
const long  seqlen,
long *  newlen
 

Local void countseq char *  s,
struct ReadSeqVars V
 

unsigned long CRC32checksum const char *  seq,
const long  seqlen,
unsigned long *  checktotal
 

Local boolean endEMBL boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endFitch boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endGB boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endIG boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endNBRF boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endPearson boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endPhylipSequential boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endPIR boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endStrider boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

Local boolean endZuker boolean addend,
boolean ungetend,
struct ReadSeqVars V
 

unsigned long GCGchecksum const char *  seq,
const long  seqlen,
unsigned long *  checktotal
 

Local void getline struct ReadSeqVars V  ) 
 

short getseqtype const char *  seq,
const long  seqlen
 

int isAnyChar int  c  ) 
 

int isSeqChar int  c  ) 
 

int isSeqNumChar int  c  ) 
 

char* listSeqs const char *  filename_,
const long  skiplines_,
const short  format_,
short *  nseq_,
short *  error_
 

Local void readEMBL struct ReadSeqVars V  ) 
 

Local void readFitch struct ReadSeqVars V  ) 
 

Local void readGenBank struct ReadSeqVars V  ) 
 

Local void readIG struct ReadSeqVars V  ) 
 

Local void readline FILE *  f,
char *  s,
long *  linestart
 

Local void readLoop short  margin,
boolean  addfirst,
boolean(*)(boolean *addend, boolean *ungetend, struct ReadSeqVars *V)  endTest,
struct ReadSeqVars V
 

Local void readMSF struct ReadSeqVars V  ) 
 

Local void readNBRF struct ReadSeqVars V  ) 
 

Local void readOlsen struct ReadSeqVars V  ) 
 

Local void readPAUPinterleaved struct ReadSeqVars V  ) 
 

Local void readPAUPsequential struct ReadSeqVars V  ) 
 

Local void readPearson struct ReadSeqVars V  ) 
 

Local void readPhylipInterleaved struct ReadSeqVars V  ) 
 

Local void readPhylipSequential struct ReadSeqVars V  ) 
 

Local void readPIR struct ReadSeqVars V  ) 
 

Local void readPlain struct ReadSeqVars V  ) 
 

char* readSeq const short  whichEntry_,
const char *  filename_,
const long  skiplines_,
const short  format_,
long *  seqlen_,
short *  nseq_,
short *  error_,
char *  seqid_
 

char* readSeqFp const short  whichEntry_,
FILE *  fp_,
const long  skiplines_,
const short  format_,
long *  seqlen_,
short *  nseq_,
short *  error_,
char *  seqid_
 

Local void readSeqMain struct ReadSeqVars V,
const long  skiplines_,
const short  format_
 

Local void readStrider struct ReadSeqVars V  ) 
 

Local void readUWGCG struct ReadSeqVars V  ) 
 

Local void readZuker struct ReadSeqVars V  ) 
 

1st string is Zuker's Fortran format

short seqFileFormat const char *  filename,
long *  skiplines,
short *  error
 

short seqFileFormatFp FILE *  fseq,
long *  skiplines,
short *  error
 

int Strcasecmp const char *  a,
const char *  b
 

int Strncasecmp const char *  a,
const char *  b,
long  maxn
 

Local void ungetline struct ReadSeqVars V  ) 
 

short writeSeq FILE *  outf,
const char *  seq,
const long  seqlen,
const short  outform,
const char *  seqid
 

added 31jan91

added 31jan91


Variable Documentation

const char allsymbols[32] = "_.-*?<>{}[]()!@#$%^&=+;:'/|`~\"\\"
 

const char* aminos = "ABCDEFGHIKLMNPQRSTVWXYZ*"
 

const unsigned long crctab[]
 

const char kNocountsymbols[5] = "_.-?"
 

const char nonummask[11] = "~!@#$%^&*("
 

const char nummask[11] = "0123456789"
 

const char* primenuc = "ACGTU"
 

const char* protonly = "EFIPQZ"
 

const char* seqsymbols = allsymbols [static]
 

const char stdsymbols[6] = "_.-*?"
 


Generated on Fri Aug 11 16:19:43 2006 for GENtle by  doxygen 1.4.1