a44421a79fb36cc2036fe116b97ea3bc9590cd0c braney Fri Dec 2 09:34:39 2011 -0800 removed rcsid (#295) diff --git src/utils/faCount/faCount.c src/utils/faCount/faCount.c index a79feaa..49c8127 100644 --- src/utils/faCount/faCount.c +++ src/utils/faCount/faCount.c @@ -1,185 +1,184 @@ /* faCount - count base statistics and CpGs in FA files */ #include "common.h" #include "fa.h" #include "dnautil.h" #include "options.h" -static char const rcsid[] = "$Id: faCount.c,v 1.8 2009/08/02 19:51:20 markd Exp $"; static struct optionSpec optionSpecs[] = { {"summary", OPTION_BOOLEAN}, {"dinuc", OPTION_BOOLEAN}, {"strands", OPTION_BOOLEAN}, {NULL, 0}, }; bool summary = FALSE; bool dinuc = FALSE; bool strands = FALSE; void usage() /* Print usage info and exit. */ { errAbort("faCount - count base statistics and CpGs in FA files.\n" "usage:\n" " faCount file(s).fa\n" " -summary show only summary statistics\n" " -dinuc include statistics on dinucletoide frequencies\n" " -strands count bases on both strands\n" ); } void faCount(char *faFiles[], int faCount) /* faCount - count bases. */ { int f, i, j, k; struct dnaSeq seq; unsigned long long totalLength = 0; unsigned long long totalBaseCount[5]; unsigned long long totalDinucleotideCount[5][5]; unsigned long long totalCpgCount = 0; struct lineFile *lf; ZeroVar(&seq); for (i = 0; i < ArraySize(totalBaseCount); i++) totalBaseCount[i] = 0; for (i = 0; i < ArraySize(totalDinucleotideCount); i++) for (j = 0; j < ArraySize(totalDinucleotideCount[i]); j++) totalDinucleotideCount[i][j] = 0; printf("#seq\tlen\tA\tC\tG\tT\tN\tcpg"); if (dinuc) printf("\tAA\tAC\tAG\tAT\tCA\tCC\tCG\tCT\tGA\tGC\tGG\tGT\tTA\tTC\tTG\tTT"); printf("\n"); dnaUtilOpen(); for (f = 0; f