/* hgStsMarkers - Load STS markers into database. */ #include "common.h" #include "linefile.h" #include "jksql.h" #include "hash.h" #include "bed.h" void usage() /* Explain usage and exit. */ { errAbort( "hgStsMarkers - Load STS markers into database\n" "usage:\n" " hgStsMarkers database markerDir\n"); } #define numMaps 6 char *markerFiles[numMaps] = { "genethon.BED", "marshfield.BED", "gm99_gb4.BED", "shgc_g3.BED", "wi_yac.BED", "shgc_tng.BED", }; #define maxWords 16 typedef char *WordArray[maxWords]; void makeTabFile(char *markerDir, char *tabName) /* Create tab-delimiter file synthesizing all maps. */ { FILE *f = NULL; struct lineFile *allLf[numMaps], *lf; char *allWords[numMaps][maxWords]; int wordCount, i,j; char fileName[512]; static int sharedFields[] = {0,1,2,3,4,5,8,9}; int lineCount = 0; /* Open all files. */ f = mustOpen(tabName, "w"); for (i=0; ilineIx, allLf[0]->fileName, allLf[i]->fileName, allWords[0][field], allWords[i][field]); } } } /* Write out chromosome and chrom start. */ if (sameString(allWords[0][0], "chr")) fprintf(f, "unknown\t"); else fprintf(f, "%s\t", allWords[0][0]); /* Write out other shared data fields. */ for (i=1; i