1 /* This is a throwaway wrapper program for doing quick
2 * and dirty tests on sequence databases. Archives of past
3 * versions are kept and logged in RCS.
4 * RCS $Id: weetest.c,v 1.1.1.1 2005/03/22 08:34:07 cmzmasek Exp $
8 cc -g -o weetest -I ~/lib/squid.linux -L/nfs/wol2/people/eddy/lib/squid.linux weetest.c alphabet.o camJul97.o core_algorithms.o histogram.o hmmio.o mathsupport.o masks.o misc.o modelmakers.o debug.o prior.o trace.o plan7.o states.o tophits.o -lsquid-debug -lm
10 * or, for optimized version:
11 cc -O2 -o weetest -I ~/lib/squid.linux -L/nfs/wol2/people/eddy/lib/squid.linux weetest.c alphabet.o camJul97.o core_algorithms.o histogram.o hmmio.o mathsupport.o masks.o misc.o modelmakers.o debug.o prior.o trace.o plan7.o states.o tophits.o -lsquid -lm
14 /* This test looks at histogram of protein lengths in Swissprot
24 main(int argc, char **argv)
34 struct histogram_s *h;
37 if (! SeqfileFormat(file, &format, "BLASTDB"))
38 Die("SeqfileFormat()");
39 if ((sqfp = SeqfileOpen(file, format, "BLASTDB")) == NULL)
42 h = AllocHistogram(0, 10000, 1000);
43 while (ReadSeq(sqfp, format, &seq, &sqinfo))
44 AddToHistogram(h, (float) sqinfo.len);
46 GaussianFitHistogram(h, 999999.);
47 PrintASCIIHistogram(stdout, h);
49 printf("mean = %f\n", h->param[GAUSS_MEAN]);
50 printf("sd = %f\n", h->param[GAUSS_SD]);