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/pslMaxMap/pslMaxMap.c src/hg/pslMaxMap/pslMaxMap.c index 3517fa9..8f2f823 100644 --- src/hg/pslMaxMap/pslMaxMap.c +++ src/hg/pslMaxMap/pslMaxMap.c @@ -1,72 +1,72 @@ /* Copyright (C) 2004 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" int maxMap = 10; void usage() /* Explain usage and exit. */ { errAbort( "pslMaxMap - filter out psls that map more than N times\n" "usage:\n" " pslMaxMap inPsl outPsl\n" "options:\n" " -maxMap=10 (default)\n" ); } static struct optionSpec options[] = { {"maxMap", OPTION_INT}, {NULL, 0}, }; struct name { int count; }; void pslMaxMap(char *pslIn, char *pslOut) /* pslMaxMap - make clusters out of a psl file. */ { FILE *out = mustOpen(pslOut, "w"); struct psl *pslList = pslLoadAll(pslIn); struct hash *nameHash = newHash(0); struct psl *psl; struct name *name; for(psl = pslList; psl ; psl = psl->next) { name = hashFindVal(nameHash, psl->qName); if (name == NULL) { AllocVar(name); hashAdd(nameHash, psl->qName, name); } name->count++; } for(psl = pslList; psl ; psl = psl->next) { name = hashFindVal(nameHash, psl->qName); if (name->count <= maxMap) pslTabOut(psl, out); } } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, options); maxMap = optionInt("maxMap", maxMap); if (argc != 3) usage(); pslMaxMap(argv[1], argv[2]); return 0; }