If you pick up the SEQIO package, whose new version I just
released, then the following program will do what you want
(except that you need to fill in the actual sequence
analysis part):
#include <stdio.h>
#include <stdlib.h>
#include "seqio.h"
int main(int argc, char *argv[])
{
int i, len;
char *seq;
SEQFILE *sfp;
for (i=1; i < argc; i++) {
if ((sfp = seqfopen2(argv[i])) == NULL)
exit(1);
while ((seq = seqfgetseq(sfp, &len, 0)) != NULL) {
/*
* Fill in the sequence analysis on "seq", whose
* length is "len", here.
*/
}
seqfclose(sfp);
}
return 0;
}
Once compiled with the package, this program can read
one or more files, or read one, a couple or all of the
entries from the Swiss-Prot database.
Jim