4898794edd81be5285ea6e544acbedeaeb31bf78 max Tue Nov 23 08:10:57 2021 -0800 Fixing pointers to README file for license in all source code files. refs #27614 diff --git src/hg/oneShot/findContigsWithClones/findContigsWithClones.c src/hg/oneShot/findContigsWithClones/findContigsWithClones.c index 9f354fe..1fdc2b1 100644 --- src/hg/oneShot/findContigsWithClones/findContigsWithClones.c +++ src/hg/oneShot/findContigsWithClones/findContigsWithClones.c @@ -1,81 +1,81 @@ /* findContigsWithClones - find contigs that contain clones. */ /* Copyright (C) 2011 The Regents of the University of California - * See README in this or parent directory for licensing information. */ + * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "cheapcgi.h" #include "ooUtils.h" #include "obscure.h" void usage() /* Explain usage and exit. */ { errAbort( "findContigsWithClones - find contigs that contain clones\n" "usage:\n" " findContigsWithClones cloneList ooDir fileName\n" "example:\n" " findContigsWithClones chr22.lst oo.29 gold.99\n" ); } boolean snoopInFile(char *fileName, struct slName *wordList) /* Return TRUE if any word in list occurs in file. */ { struct lineFile *lf = lineFileOpen(fileName, TRUE); char *line; struct slName *el; boolean foundIt = FALSE; while (lineFileNext(lf, &line, NULL)) { for (el = wordList; el != NULL; el = el->next) { if (strstr(line, el->name)) { foundIt = TRUE; break; } } if (foundIt) break; } lineFileClose(&lf); return foundIt; } struct slName *cloneList; char *snoopFileName; void doContig(char *dir, char *chrom, char *contig) /* Report contigs that have clone in them. */ { char fileName[512]; sprintf(fileName, "%s/%s", dir, snoopFileName); if (snoopInFile(fileName, cloneList)) printf("%s/%s\n", chrom, contig); } void findContigsWithClones(char *cloneFile, char *ooDir, char *snoopIn) /* findContigsWithClones - find contigs that contain clones. */ { struct slName *el; cloneList = readAllLines(cloneFile); for (el = cloneList; el != NULL; el = el->next) chopSuffix(el->name); snoopFileName = snoopIn; ooToAllContigs(ooDir, doContig); } int main(int argc, char *argv[]) /* Process command line. */ { cgiSpoof(&argc, argv); if (argc != 4) usage(); findContigsWithClones(argv[1], argv[2], argv[3]); return 0; }