9c497a369f82a2262cc9767761ae09b04ec5a78d hiram Mon Mar 2 09:06:05 2020 -0800 correct one line header in usage message no redmine diff --git src/hg/estOrient/estOrient.c src/hg/estOrient/estOrient.c index 040bc07..73b1ff8 100644 --- src/hg/estOrient/estOrient.c +++ src/hg/estOrient/estOrient.c @@ -20,38 +20,35 @@ {"info", OPTION_STRING}, {"inclVer", OPTION_BOOLEAN}, {"fileInput", OPTION_BOOLEAN}, {"estOrientInfo", OPTION_STRING}, {NULL, 0} }; static struct slName *gChroms = NULL; static boolean gKeepDisoriented = FALSE; static boolean gInclVer = FALSE; static boolean gFileInput = FALSE; static char *gDisoriented = NULL; static char *gEstOrientInfoFile = NULL; static char *gInfo = NULL; -void usage(char *msg, ...) +void usage() /* usage msg and exit */ { -va_list ap; -va_start(ap, msg); -vfprintf(stderr, msg, ap); -errAbort("\n%s", - "estOrient [options] db estTable outPsl\n" +errAbort("estOrient - convert ESTs so that orientation matches directory of transcription\n" + "\nusage: estOrient [options] db estTable outPsl\n" "\n" "Read ESTs from a database and determine orientation based on\n" "estOrientInfo table or direction in gbCdnaInfo table. Update\n" "PSLs so that the strand reflects the direction of transcription.\n" "By default, PSLs where the direction can't be determined are dropped.\n" "\n" "Options:\n" " -chrom=chr - process this chromosome, maybe repeated\n" " -keepDisoriented - don't drop ESTs where orientation can't\n" " be determined.\n" " -disoriented=psl - output ESTs that where orientation can't\n" " be determined to this file.\n" " -inclVer - add NCBI version number to accession if not already\n" " present.\n" " -fileInput - estTable is a psl file\n" @@ -323,31 +320,31 @@ if (gFileInput) orientEstsFile(db, estTable, outPslFh, disorientedFh, infoFh); else orientEstsTbl(db, estTable, outPslFh, disorientedFh, infoFh); carefulClose(&infoFh); carefulClose(&disorientedFh); carefulClose(&outPslFh); } int main(int argc, char *argv[]) /* Process command line */ { optionInit(&argc, argv, optionSpecs); if (argc != 4) - usage("wrong # of args:"); + usage(); ZeroVar(&gbCacheAcc); char *db = argv[1], *estTable = argv[2], *outPslFile = argv[3]; gChroms = optionMultiVal("chrom", NULL); gKeepDisoriented = optionExists("keepDisoriented"); gDisoriented = optionVal("disoriented", NULL); gInfo = optionVal("info", NULL); gInclVer = optionExists("inclVer"); gFileInput = optionExists("fileInput"); gEstOrientInfoFile = optionVal("estOrientInfo", NULL); if (gKeepDisoriented && (gDisoriented != NULL)) errAbort("can't specify both -keepDisoriented and -disoriented"); if (gFileInput && (gChroms != NULL)) errAbort("can't specify both -fileInput and -chrom"); if (gFileInput && gInclVer) errAbort("can't specify both -fileInput and -inclVer");