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/hgChroms/hgChroms.c src/hg/hgChroms/hgChroms.c index 0c3ee3b..526ce9c 100644 --- src/hg/hgChroms/hgChroms.c +++ src/hg/hgChroms/hgChroms.c @@ -1,78 +1,78 @@ /* hgChroms - print chromosomes for a genome. */ /* Copyright (C) 2014 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 "hdb.h" #include "options.h" void usage() /* Explain usage and exit. */ { errAbort( "hgChroms - print chromosomes for a genome.\n" "\n" "usage:\n" " hgChroms [options] db\n" "\n" "Options:\n" " -noRandom - omit random and Un chromsomes\n" " -noHap - omit _hap|_alt chromsomes\n" " -noPrefix - omit \"chr\" prefix\n" ); } /* command line */ static struct optionSpec optionSpec[] = { {"noRandom", OPTION_BOOLEAN}, {"noHap", OPTION_BOOLEAN}, {"noPrefix", OPTION_BOOLEAN}, {NULL, 0} }; boolean noRandom; boolean noHap; boolean noPrefix; bool inclChrom(struct slName *chrom) /* check if a chromosome should be included */ { return !((noRandom && (endsWith(chrom->name, "_random") || startsWith("chrUn", chrom->name))) || (noHap && haplotype(chrom->name))); } void hgChroms(char *db) /* hgChroms - print chromosomes for a genome. */ { struct slName *chrom, *chroms = hAllChromNames(db); for (chrom = chroms; chrom != NULL; chrom = chrom->next) { if (inclChrom(chrom)) { if (noPrefix && startsWith("chr", chrom->name)) { printf("%s\n", chrom->name + strlen("chr")); } else { printf("%s\n", chrom->name); } } } } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, optionSpec); if (argc != 2) usage(); noRandom = optionExists("noRandom"); noHap = optionExists("noHap"); noPrefix = optionExists("noPrefix"); hgChroms(argv[1]); return 0; }