• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ optionExists函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中optionExists函数的典型用法代码示例。如果您正苦于以下问题:C++ optionExists函数的具体用法?C++ optionExists怎么用?C++ optionExists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了optionExists函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: bigWigInfo

void bigWigInfo(char *fileName)
/* bigWigInfo - Print out information about bigWig file.. */
{
struct bbiFile *bwf = bigWigFileOpen(fileName);

if (optionExists("minMax"))
    {
    struct bbiSummaryElement sum = bbiTotalSummary(bwf);
    printf("%f %f\n", sum.minVal, sum.maxVal);
    return;
    }

printf("version: %d\n", bwf->version);
printf("isCompressed: %s\n", (bwf->uncompressBufSize > 0 ? "yes" : "no"));
printf("isSwapped: %d\n", bwf->isSwapped);
printLabelAndLongNumber("primaryDataSize", bwf->unzoomedIndexOffset - bwf->unzoomedDataOffset);
if (bwf->levelList != NULL)
    {
    long long indexEnd = bwf->levelList->dataOffset;
    printLabelAndLongNumber("primaryIndexSize", indexEnd - bwf->unzoomedIndexOffset);
    }
printf("zoomLevels: %d\n", bwf->zoomLevels);
if (optionExists("zooms"))
    {
    struct bbiZoomLevel *zoom;
    for (zoom = bwf->levelList; zoom != NULL; zoom = zoom->next)
	printf("\t%d\t%d\n", zoom->reductionLevel, (int)(zoom->indexOffset - zoom->dataOffset));
    }
struct bbiChromInfo *chrom, *chromList = bbiChromList(bwf);
printf("chromCount: %d\n", slCount(chromList));
if (optionExists("chroms"))
    for (chrom=chromList; chrom != NULL; chrom = chrom->next)
	printf("\t%s %d %d\n", chrom->name, chrom->id, chrom->size);
struct bbiSummaryElement sum = bbiTotalSummary(bwf);
printLabelAndLongNumber("basesCovered", sum.validCount);
printf("mean: %f\n", sum.sumData/sum.validCount);
printf("min: %f\n", sum.minVal);
printf("max: %f\n", sum.maxVal);
printf("std: %f\n", calcStdFromSums(sum.sumData, sum.sumSquares, sum.validCount));
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:40,代码来源:bigWigInfo.c


示例2: main

int main(int argc, char *argv[])
/* Process command line. */
{
    optionInit(&argc, argv, options);
    if (argc != 2)
        usage();
    fieldListIn = optionVal("fieldListIn", NULL);
    fieldListOut = optionVal("fieldListOut", NULL);
    identifier = optionVal("identifier", NULL);
    database = optionVal("database", NULL);
    checkFields = optionExists("fields");
    foreignKeys = optionExists("keys");
    dbCoverage = optionExists("dbCoverage");
    tableCoverage = optionExists("tableCoverage");
    checkTimes = optionExists("times");
    if (optionExists("all"))
    {
        checkFields = foreignKeys = dbCoverage = tableCoverage = checkTimes = TRUE;
    }
    allDbHash = sqlHashOfDatabases();
    if (database)
    {
        if (! hashLookup(allDbHash, database))
            errAbort("specified database '%s' not available", database);
    }
    joinerCheck(argv[1]);
    return 0;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:28,代码来源:joinerCheck.c


示例3: printHelpAndQuit

CmdArgs::CmdArgs(int argc, char **argv) {
    if(optionExists(argv, argv + argc, "--help"))
        printHelpAndQuit(argc, argv);
    if(argc < 4)
        printErrorAndQuit(argc, argv);

    // Parse positional arguments.
    _input = argv[1];
    _output = argv[2];
    _numSamples = (int) strtol(argv[3], NULL, 10);
    stop_if(_numSamples <= 0, "Number of samples must be > 0.");

    // Init options with default values.
    _width = 800;
    _height = 600;
    _aaLevel = 1; // No AA.

    // Parse options.
    if(optionExists(argv, argv + argc, "-w")) {
        char *opt = getOption(argv, argv + argc, "-w");
        if(!opt) printErrorAndQuit(argc, argv);

        _width = (int) strtol(opt, NULL, 10);
    }
    if(optionExists(argv, argv + argc, "-h")) {
        char *opt = getOption(argv, argv + argc, "-h");
        if(!opt) printErrorAndQuit(argc, argv);

        _height = (int) strtol(opt, NULL, 10);
    }
    if(optionExists(argv, argv + argc, "-aa")) {
        char *opt = getOption(argv, argv + argc, "-aa");
        if(!opt) printErrorAndQuit(argc, argv);

        _aaLevel = (int) strtol(opt, NULL, 10);

        stop_if(_aaLevel <= 0,
                "Invalid anti aliasing level: must be > 0.");
    }
}
开发者ID:RenatoUtsch,项目名称:clTracer,代码行数:40,代码来源:CmdArgs.cpp


示例4: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
workChr = optionVal("chr", NULL);
bedFileName = optionVal("bedFile", NULL);
insane = optionExists("insane");
minGap = optionInt("minGap", minGap);
gapToLift(argv[1], argv[2]);
return 0;
}
开发者ID:blumroy,项目名称:kentUtils,代码行数:13,代码来源:gapToLift.c


示例5: main

int main(int argc, char *argv[])
/* Process command line. */
{
    boolean doGl = FALSE;

    optionHash(&argc, argv);

    if (argc != 4 && argc != 3)
        usage();

    noLoad = optionExists("noLoad");
    if (noLoad)
        verbose(2,"#\tnoLoad option, leaving SQL files, no table loading\n");

    doGl = !(optionExists("noGl") || optionExists("nogl"));

    if (argc == 3)
        hgGoldGap(argv[1], argv[2]);
    else
        hgGoldGapGl(argv[1], argv[2], argv[3], doGl, optionVal("chrom", NULL));
    return 0;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:22,代码来源:hgGoldGapGl.c


示例6: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
clMaxErr = optionInt("maxErr", clMaxErr);
clSqlSymbols = optionExists("sqlSymbols");
if (!clSqlSymbols)
    gReservedHash = sqlReservedHash();
tagStormCheck(argv[1], argv[2]);
return 0;
}
开发者ID:ucscGenomeBrowser,项目名称:kent,代码行数:13,代码来源:tagStormCheck.c


示例7: alphaChain

void alphaChain(char *readsFile, char *monomerOrderFile, char *outFile)
/* alphaChain - Create Markov chain of words and optionally output chain in two formats. */
{
struct wordStore *store = wordStoreForChainsInFile(readsFile, maxChainSize);
struct wordTree *wt = store->markovChains;
wordStoreLoadMonomerOrder(store, readsFile, monomerOrderFile);
wordStoreNormalize(store, outSize);

if (optionExists("chain"))
    {
    char *fileName = optionVal("chain", NULL);
    wordTreeWrite(wt, store->maxChainSize, fileName);
    }

wordTreeGenerateFile(store, store->maxChainSize, pickRandom(wt->children), outSize, outFile);

if (optionExists("afterChain"))
    {
    char *fileName = optionVal("afterChain", NULL);
    wordTreeWrite(wt, store->maxChainSize, fileName);
    }
}
开发者ID:davidhoover,项目名称:kent,代码行数:22,代码来源:alphaChain.c


示例8: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, optionSpecs);
if (argc != 6)
    usage();
minSpace = optionInt("minSpace", minSpace);
minFill = optionInt("minFill", minSpace/2);
minScore = optionInt("minScore", minScore);
inclHap = optionExists("inclHap");
chainNet(argv[1], argv[2], argv[3], argv[4], argv[5]);
return 0;
}
开发者ID:elmargb,项目名称:kentUtils,代码行数:13,代码来源:chainNet.c


示例9: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);

if (argc != 7)
    usage();

geneName = optionVal("geneName", geneName);
geneList = optionVal("geneList", geneList);
onlyChrom = optionVal("chrom", onlyChrom);
inExons = optionExists("exons");
noTrans = optionExists("noTrans");
transUC = optionExists("transUC");
delay = optionInt("delay", delay);

if ((geneName != NULL) && (geneList != NULL))
    errAbort("cannot specify both geneList and geneName");

mafToProtein(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6]);
return 0;
}
开发者ID:elmargb,项目名称:kentUtils,代码行数:22,代码来源:mafToProtein.c


示例10: borfMatcher

void borfMatcher(char *bedIn, char *borfIn, char *bedOutFile, char *genePredOutFile)
/* Top level function to open files and call other functions. */
{
struct borf *borf = NULL, *borfList = NULL;
struct bed *bed = NULL, *bedList = NULL;
struct genePred *gp = NULL;
float threshold = optionFloat("minScore", 50);
FILE *bedOut = mustOpen(bedOutFile, "w");
FILE *genePredOut = mustOpen(genePredOutFile, "w");
boolean keepSmall = optionExists("keepSmall");
boolean keepNmd = optionExists("keepNmd");

borfList = borfLoadAll(borfIn);
bedList = bedLoadAll(bedIn);
dotForUserInit(slCount(bedList)/10);
for(bed = bedList, borf = borfList; bed != NULL && borf != NULL; bed = bed->next, borf = borf->next)
    {
    dotForUser();
    if(!stringIn(bed->name, borf->name))
	errAbort("Trying to match up %s bed with %s borf - bad idea!", bed->name, borf->name);
    /* Have to adjust cds end. Borf puts stop codon outside of cds, 
       we put it inside. */
    borf->cdsEnd = min(borf->cdsEnd+3, borf->size);
    if((borf->score > threshold || (keepSmall && borf->cdsSize > 0)) && sameString(borf->strand, "+"))
	{
	setThickStartStop(bed, borf);
	if(keepNmd || !nmdTarget(bed))
	    {
	    gp = bedToGenePred(bed);
	    bedTabOutN(bed, 12, bedOut);
	    genePredTabOut(gp, genePredOut);
	    genePredFree(&gp);
	    }
	}
    }
warn("Done.");
carefulClose(&bedOut);
carefulClose(&genePredOut);
}
开发者ID:apmagalhaes,项目名称:kentUtils,代码行数:39,代码来源:borfMatcher.c


示例11: hgLoadSqlTab

void hgLoadSqlTab(char *database, char *table, char *createFile,
                  int inCount, char *inNames[])
/* hgLoadSqlTab - Load table into database from SQL and text files. */
{
    struct sqlConnection *conn = sqlConnect(database);

    int loadOptions = 0;
    int i=0;
    boolean oldTable = optionExists("oldTable") || optionExists("append");
    if (optionExists("warn"))
        loadOptions |= SQL_TAB_FILE_WARN_ON_ERROR;

    if (! optionExists("notOnServer"))
        loadOptions |= SQL_TAB_FILE_ON_SERVER;

    if (! oldTable)
    {
        struct dyString *dy = readAndReplaceTableName(createFile, table);
        sqlRemakeTable(conn, table, dy->string);
        dyStringFree(&dy);
    }
    verbose(1, "Scanning through %d files\n", inCount);
    for (i=0;  i < inCount;  i++)
    {
        verbose(2, "Loading file %s into table %s\n", inNames[i], table);
        if (sameString("stdin", inNames[i]))
            sqlLoadTabFile(conn, "/dev/stdin", table,
                           (loadOptions & ~SQL_TAB_FILE_ON_SERVER));
        else
            sqlLoadTabFile(conn, inNames[i], table, loadOptions);
    }
    if (oldTable)
        hgHistoryComment(conn, "Add contents of %d text file(s) to table %s.",
                         inCount, table);
    else
        hgHistoryComment(conn, "Load table %s directly from .sql and %d text file(s).",
                         table, inCount);
    sqlDisconnect(&conn);
}
开发者ID:sktu,项目名称:kentUtils,代码行数:39,代码来源:hgLoadSqlTab.c


示例12: main

int main(int argc, char *argv[])
/* Process command line. */
{
char *database, *accFile, *outFaFile;

optionInit(&argc, argv, optionSpecs);
if (argc != 4)
    usage();
database = argv[1];
accFile = argv[2];
outFaFile = argv[3];
cdsUpper = optionExists("cdsUpper");
cdsUpperAll = optionExists("cdsUpperAll");
if (cdsUpperAll)
    cdsUpper = TRUE;
inclVer = optionExists("inclVer");
peptides = optionExists("peptides");
if (peptides && (cdsUpper || cdsUpperAll))
    errAbort("can't specify -peptides with -cdsUpper or -cdsUpperAll");
getRna(database, accFile, outFaFile);
return 0;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:22,代码来源:getRna.c


示例13: doGenePreds

void doGenePreds(struct sqlConnection *conn, char *db, char *orthoDb, char *chrom, 
	    char *netTable, char *geneFileName, char *geneTableName,
	    char *outBedName, char *selectedFileName, int *foundCount, int *notFoundCount)	
/* Map over genePreds. */
{
FILE *bedOut = NULL;
FILE *selectedOut = NULL;
FILE *cdsErrorFp = NULL;
struct genePred *gene = NULL, *geneList = NULL;
struct bed *bed = NULL;

//init output files
if(optionExists("cdsErrorFile"))
{
    cdsErrorFp = fopen( optionVal("cdsErrorFile", NULL), "w" );
    fprintf( cdsErrorFp, "#name\tchrom\ttxStart\ttxEnd\tcdsStart\tcdsEnd\tstrand\texonCount\n" );
    fclose(cdsErrorFp);
}

warn("Loading Gene Predictions.");
assert(outBedName);
if(geneFileName)
    geneList=genePredLoadAll(geneFileName);
else
    geneList=loadGeneFromTable(conn, geneTableName, chrom, 0, BIGNUM);
/* Convert genePreds. */
warn("Converting genes.");
bedOut = mustOpen(outBedName, "w");
if (selectedFileName != NULL)
    selectedOut = mustOpen(selectedFileName, "w");
for(gene = geneList; gene != NULL; gene = gene->next)
    {
    struct genePred *synGene = NULL;
    if(differentString(gene->chrom, chrom))
	continue;
    synGene = orthoBedFromGene(conn, db, orthoDb, netTable, gene);
    occassionalDot();
    if(synGene != NULL && synGene->exonCount > 0)
	{
	(*foundCount)++;
	genePredTabOut(synGene, bedOut);
        if (selectedOut != NULL)
            genePredTabOut(gene, selectedOut);
	}
    else
	(*notFoundCount)++;
    genePredFree(&synGene);
    }
carefulClose(&selectedOut);
 carefulClose(&bedOut);
}
开发者ID:ucscGenomeBrowser,项目名称:kent,代码行数:51,代码来源:orthoMap.c


示例14: weedLines

void weedLines(char *weedFile, char *file, char *output, 
	boolean invert, char *invertOutput)
/* weedLines - Selectively remove lines from file. */
{
struct hash *hash = hashWordsInFile(weedFile, 16);
struct hashEl *weedList = hashElListHash(hash);
verbose(2, "%d words in weed file %s\n", hash->elCount, weedFile);
struct lineFile *lf = lineFileOpen(file, TRUE);
char *line, *word;
FILE *f = mustOpen(output, "w");
FILE *fInvert = NULL;
boolean embedded = optionExists("embedded");
if (invertOutput != NULL)
    fInvert = mustOpen(invertOutput, "w");

while (lineFileNext(lf, &line, NULL))
    {
    boolean doWeed = FALSE;
    char *dupe = NULL;
    if (embedded)
	{
	struct hashEl *hel;
	for (hel = weedList; hel != NULL; hel = hel->next)
	    {
	    if (stringIn(hel->name, line))
	        doWeed = TRUE;
	    }
	}
    else
	{
	dupe = cloneString(line);
	while ((word = nextWord(&line)) != NULL)
	    {
	    if (hashLookup(hash, word))
		doWeed = TRUE;
	    }
	line = dupe;
	}
    if (invert)
	doWeed = !doWeed;
    if (!doWeed)
	fprintf(f, "%s\n", line);
    else
	{
	if (fInvert != NULL)
	    fprintf(fInvert, "%s\n", line);
	}
    freez(&dupe);
    }
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:50,代码来源:weedLines.c


示例15: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
maxGap = optionInt("maxGap", maxGap);
maxChain = optionInt("maxChain", maxChain);
minIdRatio = optionFloat("minId", 0.0)/100.0;
minScore = optionFloat("minScore", minScore);
bedOut = optionExists("bed");
if (argc != 5)
    usage();
doIt(argv[1], argv[2], argv[3], argv[4]);
return 0;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:14,代码来源:chainToAxt.c


示例16: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
database = optionVal("database", database);
doAverage = optionExists("average");
transpose = optionExists("transpose");
minAbsVal = optionFloat("minAbsVal", minAbsVal);
minMaxVal = optionInt("minMaxVal", minMaxVal);
c = optionDouble("addConst", c);
clump = optionVal("clump", clump);
doLoad = !optionExists("noLoad");
if (optionExists("tab"))
    {
    tabDir = optionVal("tab", tabDir);
    makeDir(tabDir);
    }
limit = optionInt("limit", limit);
hgRatioMicroarray(argv[1], argv[2]);
return 0;
}
开发者ID:elmargb,项目名称:kentUtils,代码行数:23,代码来源:hgRatioMicroarray.c


示例17: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
struct hash *totals = NULL;
if (optionExists("total"))
    totals = newHash(0);
char *hubUrl = NULL;
if (argc == 2)
    hubUrl = argv[1];
else if (argc != 1)
    usage();
return hubTrackSettings(hubUrl, totals);
}
开发者ID:davidhoover,项目名称:kent,代码行数:14,代码来源:hubTrackSettings.c


示例18: main

int main(int argc, char *argv[])
/* Process command line. */
{
    optionInit(&argc, argv, optionSpecs);
    if (argc != 6)
        usage();
    raName = optionVal("raName", raName);
    release = optionVal("release", release);
    releaseBit = getReleaseBit(release);
    adjustTrackDbName(argv[3]);
    hgFindSpec(argv[1], argv[2], argv[3], argv[4], argv[5],
               optionExists("strict"));
    return 0;
}
开发者ID:ucsc-mus-strain-cactus,项目名称:kent,代码行数:14,代码来源:hgFindSpec.c


示例19: main

int main(int argc, char *argv[])
{
optionInit(&argc, argv, optionSpecs);

if(argc < 2)
    usage();

convolve_count = optionInt("count", 4);
logs = optionExists("logs");
html = optionExists("html");

if (verboseLevel() >= 2)
    {
    printf("options: -verbose, input file(s):\n");
    printf("-count=%d\n", convolve_count);
    printf("data input is in %s format\n", logs ? "log" : "probability");
    if (html) printf ("output in html format\n");
    }

convolve(argc, argv);

return(0);
}
开发者ID:sktu,项目名称:kentUtils,代码行数:23,代码来源:convolve.c


示例20: main

int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc < 3)
    usage();
if (optionExists("clampMax"))
    {
    gotClampMax = TRUE;
    clampMax = optionDouble("clampMax", clampMax);
    }
wigCorrelate(argc-1, argv+1, "stdout");
return 0;
}
开发者ID:sktu,项目名称:kentUtils,代码行数:14,代码来源:wigCorrelate.c



注:本文中的optionExists函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ optionInt函数代码示例发布时间:2022-05-30
下一篇:
C++ optionChanged函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap