ARB
|
Go to the source code of this file.
Classes | |
struct | ReadSeqVars |
Macros | |
#define | __NO_CTYPE |
#define | Local static /* local functions */ |
#define | kStartLength 500000 /* 20Apr93 temp. bug fix */ |
#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 | |
prettyopts | gPretty |
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 __NO_CTYPE |
Definition at line 27 of file ureadseq.c.
#define Local static /* local functions */ |
Definition at line 70 of file ureadseq.c.
#define kStartLength 500000 /* 20Apr93 temp. bug fix */ |
Definition at line 73 of file ureadseq.c.
Referenced by addseq(), readSeq(), and readSeqFp().
#define fixmatchchar | ( | s | ) |
Referenced by readPAUPinterleaved().
#define tolowerstr | ( | s | ) |
Referenced by readSeqMain().
#define ReadOneLine | ( | sp | ) |
Referenced by seqFileFormatFp().
#define kMaxseqwidth 250 |
Referenced by writeSeq().
Definition at line 34 of file ureadseq.c.
Definition at line 48 of file ureadseq.c.
References diff(), and to_upper.
Referenced by checkopt().
Definition at line 115 of file ureadseq.c.
Referenced by addinfo(), readGenBank(), readSeq(), and readSeqFp().
Definition at line 120 of file ureadseq.c.
Referenced by readGenBank().
Definition at line 126 of file ureadseq.c.
Referenced by addinfo().
Definition at line 131 of file ureadseq.c.
Referenced by GetLine().
Local void GetLine | ( | struct ReadSeqVars * | V | ) |
Definition at line 144 of file ureadseq.c.
References ReadSeqVars::f, ReadSeqVars::linestart, readline(), and ReadSeqVars::s.
Referenced by readEMBL(), readGenBank(), readIG(), readLoop(), readMSF(), readNBRF(), readOlsen(), readPAUPinterleaved(), readPAUPsequential(), readPearson(), readPhylipInterleaved(), readPhylipSequential(), readPIR(), readPlain(), readSeqMain(), readStrider(), readUWGCG(), and readZuker().
Local void unGetLine | ( | struct ReadSeqVars * | V | ) |
Definition at line 149 of file ureadseq.c.
References ReadSeqVars::f, and ReadSeqVars::linestart.
Referenced by readLoop().
Local void addseq | ( | char * | s, |
struct ReadSeqVars * | V | ||
) |
Definition at line 155 of file ureadseq.c.
References ReadSeqVars::addit, eMemFull, ReadSeqVars::err, ReadSeqVars::isseqchar, ReadSeqVars::isseqcharfirst8, kStartLength, ReadSeqVars::maxseq, ReadSeqVars::seq, and ReadSeqVars::seqlen.
Referenced by addinfo(), readLoop(), readMSF(), readOlsen(), readPAUPinterleaved(), readPAUPsequential(), readPhylipInterleaved(), readPlain(), and readUWGCG().
Local void countseq | ( | char * | s, |
struct ReadSeqVars * | V | ||
) |
Definition at line 181 of file ureadseq.c.
References ReadSeqVars::isseqchar, and ReadSeqVars::seqlencount.
Referenced by endPhylipSequential(), and readPAUPsequential().
Local void addinfo | ( | char * | s, |
struct ReadSeqVars * | V | ||
) |
Definition at line 194 of file ureadseq.c.
References ReadSeqVars::addit, addseq(), isAnyChar(), ReadSeqVars::isseqchar, isSeqChar(), and ReadSeqVars::nseq.
Referenced by readLoop(), readMSF(), readOlsen(), readPAUPinterleaved(), readPAUPsequential(), readPhylipInterleaved(), readPlain(), and readUWGCG().
Local void readLoop | ( | short | margin, |
boolean | addfirst, | ||
boolean(*)(boolean *addend, boolean *ungetend, struct ReadSeqVars *V) | endTest, | ||
struct ReadSeqVars * | V | ||
) |
Definition at line 214 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlen, and unGetLine().
Referenced by readEMBL(), readFitch(), readGenBank(), readIG(), readNBRF(), readPearson(), readPhylipSequential(), readPIR(), readStrider(), and readZuker().
Local boolean endIG | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readIG | ( | struct ReadSeqVars * | V | ) |
Definition at line 252 of file ureadseq.c.
References ReadSeqVars::allDone, endIG(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endStrider | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readStrider | ( | struct ReadSeqVars * | V | ) |
Definition at line 281 of file ureadseq.c.
References ReadSeqVars::allDone, endStrider(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endPIR | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readPIR | ( | struct ReadSeqVars * | V | ) |
Definition at line 306 of file ureadseq.c.
References ReadSeqVars::allDone, endPIR(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endGB | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readGenBank | ( | struct ReadSeqVars * | V | ) |
Definition at line 334 of file ureadseq.c.
References ReadSeqVars::allDone, endGB(), ReadSeqVars::f, GetLine(), ReadSeqVars::isseqchar, isSeqChar(), ReadSeqVars::isseqcharfirst8, isSeqNumChar(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endNBRF | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readNBRF | ( | struct ReadSeqVars * | V | ) |
Definition at line 379 of file ureadseq.c.
References ReadSeqVars::allDone, endNBRF(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endPearson | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readPearson | ( | struct ReadSeqVars * | V | ) |
Definition at line 402 of file ureadseq.c.
References ReadSeqVars::allDone, endPearson(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endEMBL | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readEMBL | ( | struct ReadSeqVars * | V | ) |
Definition at line 424 of file ureadseq.c.
References ReadSeqVars::allDone, endEMBL(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endZuker | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readZuker | ( | struct ReadSeqVars * | V | ) |
1st string is Zuker's Fortran format
Definition at line 451 of file ureadseq.c.
References ReadSeqVars::allDone, endZuker(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local boolean endFitch | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Local void readFitch | ( | struct ReadSeqVars * | V | ) |
Definition at line 480 of file ureadseq.c.
References ReadSeqVars::allDone, endFitch(), ReadSeqVars::f, readLoop(), ReadSeqVars::s, and ReadSeqVars::seqid.
Referenced by readSeqMain().
Local void readPlain | ( | struct ReadSeqVars * | V | ) |
Definition at line 494 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, ReadSeqVars::fname, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by readSeqMain().
Local void readUWGCG | ( | struct ReadSeqVars * | V | ) |
Definition at line 512 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by readSeqMain().
Local void readOlsen | ( | struct ReadSeqVars * | V | ) |
Definition at line 539 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by readSeqMain().
Local void readMSF | ( | struct ReadSeqVars * | V | ) |
Definition at line 622 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlen, and skipwhitespace.
Referenced by readSeqMain().
Local void readPAUPinterleaved | ( | struct ReadSeqVars * | V | ) |
Definition at line 685 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, fixmatchchar, GetLine(), kListSequences, ReadSeqVars::matchchar, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlen, ReadSeqVars::seqlencount, skipwhitespace, and ReadSeqVars::topnseq.
Referenced by readSeqMain().
Local void readPAUPsequential | ( | struct ReadSeqVars * | V | ) |
Definition at line 774 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, countseq(), ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlen, ReadSeqVars::seqlencount, skipwhitespace, and ReadSeqVars::topseqlen.
Referenced by readSeqMain().
Local void readPhylipInterleaved | ( | struct ReadSeqVars * | V | ) |
Definition at line 851 of file ureadseq.c.
References addinfo(), ReadSeqVars::addit, addseq(), ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::done, ReadSeqVars::f, GetLine(), kListSequences, ReadSeqVars::nseq, ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlen, ReadSeqVars::seqlencount, skipwhitespace, ReadSeqVars::topnseq, and ReadSeqVars::topseqlen.
Referenced by readSeqMain().
Local boolean endPhylipSequential | ( | boolean * | addend, |
boolean * | ungetend, | ||
struct ReadSeqVars * | V | ||
) |
Definition at line 904 of file ureadseq.c.
References countseq(), ReadSeqVars::s, ReadSeqVars::seqlencount, and ReadSeqVars::topseqlen.
Referenced by readPhylipSequential().
Local void readPhylipSequential | ( | struct ReadSeqVars * | V | ) |
Definition at line 912 of file ureadseq.c.
References ReadSeqVars::allDone, endPhylipSequential(), ReadSeqVars::f, GetLine(), readLoop(), ReadSeqVars::s, ReadSeqVars::seqid, ReadSeqVars::seqlencount, skipwhitespace, ReadSeqVars::topnseq, and ReadSeqVars::topseqlen.
Referenced by readSeqMain().
Local void readSeqMain | ( | struct ReadSeqVars * | V, |
const long | skiplines_, | ||
const short | format_ | ||
) |
Definition at line 937 of file ureadseq.c.
References ReadSeqVars::allDone, eFileNotFound, eNoData, ReadSeqVars::err, eUnknownFormat, ReadSeqVars::f, ReadSeqVars::filestart, GetLine(), interleaved, kEMBL, kFitch, kGCG, kGenBank, kIG, kMSF, kNBRF, kOlsen, kPAUP, kPearson, kPhylip2, kPhylip4, kPIR, kPlain, kStrider, kZuker, ReadSeqVars::linestart, ReadSeqVars::matchchar, readEMBL(), readFitch(), readGenBank(), readIG(), readMSF(), readNBRF(), readOlsen(), readPAUPinterleaved(), readPAUPsequential(), readPearson(), readPhylipInterleaved(), readPhylipSequential(), readPIR(), readPlain(), readStrider(), readUWGCG(), readZuker(), ReadSeqVars::s, ReadSeqVars::seq, ReadSeqVars::seqid, ReadSeqVars::seqlen, tolowerstr, ReadSeqVars::topnseq, and ReadSeqVars::topseqlen.
Referenced by readSeq(), and readSeqFp().
char* readSeqFp | ( | const short | whichEntry_, |
FILE * | fp_, | ||
const long | skiplines_, | ||
const short | format_, | ||
long * | seqlen_, | ||
short * | nseq_, | ||
short * | error_, | ||
char * | seqid_ | ||
) |
Definition at line 1033 of file ureadseq.c.
References ReadSeqVars::addit, ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::err, eUnknownFormat, ReadSeqVars::f, ReadSeqVars::filestart, ReadSeqVars::fname, ReadSeqVars::isseqchar, isSeqChar(), ReadSeqVars::isseqcharfirst8, kListSequences, kMaxFormat, kStartLength, ReadSeqVars::maxseq, ReadSeqVars::nseq, readSeqMain(), ReadSeqVars::seq, ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by main().
char* readSeq | ( | const short | whichEntry_, |
const char * | filename_, | ||
const long | skiplines_, | ||
const short | format_, | ||
long * | seqlen_, | ||
short * | nseq_, | ||
short * | error_, | ||
char * | seqid_ | ||
) |
Definition at line 1082 of file ureadseq.c.
References ReadSeqVars::addit, ReadSeqVars::allDone, ReadSeqVars::choice, ReadSeqVars::err, eUnknownFormat, ReadSeqVars::f, ReadSeqVars::filestart, ReadSeqVars::fname, ReadSeqVars::isseqchar, isSeqChar(), ReadSeqVars::isseqcharfirst8, kListSequences, kMaxFormat, kStartLength, ReadSeqVars::maxseq, ReadSeqVars::nseq, readSeqMain(), ReadSeqVars::seq, ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by listSeqs(), and main().
char* listSeqs | ( | const char * | filename_, |
const long | skiplines_, | ||
const short | format_, | ||
short * | nseq_, | ||
short * | error_ | ||
) |
Definition at line 1134 of file ureadseq.c.
References kListSequences, readSeq(), ReadSeqVars::seqid, and ReadSeqVars::seqlen.
Referenced by main().
Definition at line 1151 of file ureadseq.c.
References format(), and seqFileFormatFp().
Referenced by main().
Definition at line 1165 of file ureadseq.c.
References ReadSeqVars::done, eFileNotFound, format(), getseqtype(), kAmino, kASN1, kASNseqentry, kASNseqset, kDNA, kEMBL, kFitch, kGCG, kGenBank, kIG, kMSF, kNBRF, kNoformat, kNucleic, kOlsen, kOtherSeq, kPAUP, kPearson, kPhylip, kPhylip2, kPhylip4, kPIR, kPlain, kRNA, kStrider, kUnknown, kZuker, ReadSeqVars::linestart, ReadOneLine, seq, and ReadSeqVars::sp.
Referenced by seqFileFormat().
Definition at line 1420 of file ureadseq.c.
References ReadSeqVars::seqlen, and to_upper.
Referenced by main(), and writeSeq().
Definition at line 1492 of file ureadseq.c.
References ReadSeqVars::seqlen, and to_upper.
Definition at line 1511 of file ureadseq.c.
References kAmino, kDNA, kNucleic, kOtherSeq, kRNA, min, and to_upper.
Referenced by main(), seqFileFormatFp(), and writeSeq().
short writeSeq | ( | FILE * | outf, |
const char * | seq, | ||
const long | seqlen, | ||
const short | outform, | ||
const char * | seqid | ||
) |
added 31jan91
added 31jan91
Definition at line 1583 of file ureadseq.c.
References prettyopts::atseq, prettyopts::baseonlynum, prettyopts::domatch, fputc(), prettyopts::gapchar, GCGchecksum(), getseqtype(), kAmino, kASN1, kDNA, kEMBL, kFitch, kGCG, kGenBank, kIG, kMaxseqwidth, kMSF, kNBRF, kNucleic, kOlsen, kOtherSeq, kPAUP, kPearson, kPhylip2, kPhylip4, kPIR, kPlain, kPretty, kRNA, kStrider, kUnknown, kZuker, prettyopts::matchchar, min, prettyopts::nameleft, prettyopts::nameright, prettyopts::nametop, prettyopts::namewidth, prettyopts::numleft, prettyopts::numline, prettyopts::numright, s, seqchecksum, ReadSeqVars::seqlen, prettyopts::seqwidth, skipwhitespace, prettyopts::spacer, prettyopts::tab, and tab().
Referenced by main().
prettyopts gPretty |
Definition at line 31 of file ureadseq.c.
Referenced by main(), readopt(), and resetGlobals().
const char* aminos = "ABCDEFGHIKLMNPQRSTVWXYZ*" |
Definition at line 75 of file ureadseq.c.
const char* primenuc = "ACGTU" |
Definition at line 76 of file ureadseq.c.
const char* protonly = "EFIPQZ" |
Definition at line 77 of file ureadseq.c.
const char kNocountsymbols[5] = "_.-?" |
Definition at line 79 of file ureadseq.c.
const char stdsymbols[6] = "_.-*?" |
Definition at line 80 of file ureadseq.c.
const char allsymbols[32] = "_.-*?<>{}[]()!@#$%^&=+;:'/|`~\"\\" |
Definition at line 81 of file ureadseq.c.
|
static |
Definition at line 82 of file ureadseq.c.
const char nummask[11] = "0123456789" |
Definition at line 84 of file ureadseq.c.
const char nonummask[11] = "~!@#$%^&*(" |
Definition at line 85 of file ureadseq.c.
const unsigned long crctab[] |
Definition at line 1437 of file ureadseq.c.