78e58e35abfe32f6d3a2708e07666af59454d159 hiram Fri Jan 24 08:45:45 2014 -0800 gather in the diaspora of haplotype check routines and add hg38 haplotype recognition refs #11681 diff --git src/hg/hgChroms/hgChroms.c src/hg/hgChroms/hgChroms.c index dcf2e43..f3b000d 100644 --- src/hg/hgChroms/hgChroms.c +++ src/hg/hgChroms/hgChroms.c @@ -3,54 +3,54 @@ #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 _hap0 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 && stringIn( "_hap", 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