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/utils/pslUniq/pslUniq.c src/hg/utils/pslUniq/pslUniq.c index 00dba21..9c33d07 100644 --- src/hg/utils/pslUniq/pslUniq.c +++ src/hg/utils/pslUniq/pslUniq.c @@ -1,58 +1,58 @@ /* pslUniq - strip out all but first record found */ /* 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 "options.h" #include "psl.h" #include "obscure.h" int numAllow = 1; void usage() /* Explain usage and exit. */ { errAbort("usage: pslUniq in.psl out.psl\n" " -numAllow=N how many of each identifier to keep (default 1)\n" ); } void pslUniq( char *pslName, char *outName, int numAllow) { struct psl *psl; struct hash *pslHash = newHash(0); struct hashEl *hel; FILE *out = mustOpen(outName, "w"); struct lineFile *pslF = pslFileOpen(pslName); while ((struct psl *)NULL != (psl = pslNext(pslF))) { if ( (hel = hashLookup(pslHash, psl->qName)) == NULL) { hashAdd(pslHash, psl->qName, intToPt(1)); pslTabOut(psl, out); } else { hel->val++; if (ptToInt(hel->val) <= numAllow) pslTabOut(psl, out); } } lineFileClose(&pslF); } int main(int argc, char *argv[]) /* Process command line. */ { optionHash(&argc, argv); numAllow = optionInt("numAllow", 1); if (argc != 3) usage(); pslUniq(argv[1], argv[2], numAllow); return 0; }