a44421a79fb36cc2036fe116b97ea3bc9590cd0c braney Fri Dec 2 09:34:39 2011 -0800 removed rcsid (#295) diff --git src/hg/var/fixConrad.c src/hg/var/fixConrad.c index 301124a..28e5baa 100644 --- src/hg/var/fixConrad.c +++ src/hg/var/fixConrad.c @@ -1,71 +1,70 @@ /* fixConrad - Assign unique identifer to Conrad input. */ #include "common.h" #include "chromInfo.h" #include "hdb.h" #include "linefile.h" #include "jksql.h" -static char const rcsid[] = "$Id: fixConrad.c,v 1.3 2006/01/23 20:12:05 heather Exp $"; int countByChrom[25]; void usage() /* Explain usage and exit. */ { errAbort( "fixConrad - Assign unique identifier to Conrad input\n" "usage:\n" " fixConrad file\n"); } int getChromIndex(char *chromString) /* there is probably a library function that does this... */ { if (sameString(chromString, "X")) return 23; if (sameString(chromString, "Y")) return 24; if (sameString(chromString, "M")) return 25; return atoi(chromString); } void fixConrad(char *filename) /* fixConrad - read file. */ { struct lineFile *lf = lineFileOpen(filename, TRUE); char *line; int lineSize; char *row[5]; int wordCount; int chromInt = 0; char *chromName; while (lineFileNext(lf, &line, &lineSize)) { wordCount = chopByWhite(line, row, ArraySize(row)); chromName = cloneString(row[0]); stripString(row[0], "chr"); chromInt = getChromIndex(row[0]); countByChrom[chromInt] = countByChrom[chromInt] + 1; printf("%s.%d\t%s\t+\t%s\t%s\t%s\t%s\t1\t%s,\t%s,\n", chromName, countByChrom[chromInt], chromName, row[1], row[2], row[3], row[4], row[1], row[2]); } } int main(int argc, char *argv[]) { int i; if (argc != 2) usage(); for (i = 0; i++; i<25) countByChrom[i] = 0; fixConrad(argv[1]); return 0; }