当前位置: 首页>>代码示例>>C++>>正文


C++ embInit函数代码示例

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


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

示例1: main

int main(int argc, char **argv)
{
    AjPSeqall seqall;
    AjPSeqout seqout;
    AjPSeq seq = NULL;
    AjBool firstonly;

    embInit("seqret", argc, argv);

    seqout = ajAcdGetSeqoutall("outseq");
    seqall = ajAcdGetSeqall("sequence");

    firstonly = ajAcdGetBoolean("firstonly");
    while(ajSeqallNext(seqall, &seq))
    {
	ajSeqoutWriteSeq(seqout, seq);
	if(firstonly)
	    break;
    }

    ajSeqoutClose(seqout);

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);
    ajSeqoutDel(&seqout);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:30,代码来源:seqret.c

示例2: main

int main(int argc, char **argv)
{

    AjPSeqout seqout;
    AjPSeqall seqall;
    AjPSeq seq = NULL;

    embInit("seqretallfeat", argc, argv);

    seqout = ajAcdGetSeqoutall("outseq");
    seqall = ajAcdGetSeqall("sequence");

    while (ajSeqallNext(seqall, &seq))
    {
	ajSeqoutWriteSeq(seqout, seq);
	ajSeqTrace(seq);
    }
    ajSeqoutClose(seqout);

    ajFeatTest();

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);
    ajSeqoutDel(&seqout);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:29,代码来源:seqretallfeat.c

示例3: main

int main(int argc, char **argv)
{
    /* Variable declarations */
    AjPFile outf = NULL;    
    AjPXmlall xmlall = NULL;

    AjPXml xml     = NULL;

    /* ACD processing */
    embInit("xmltext", argc, argv);

    xmlall    = ajAcdGetXmlall("xml");
    outf   = ajAcdGetOutfile("outfile");
    
    while(ajXmlallNext(xmlall, &xml))
    {
        ajFmtPrintF(outf,"%S",ajXmlGetEntry(xml));
    }

    /* Memory clean-up and exit */

    ajXmlallDel(&xmlall);
    ajXmlDel(&xml);

    ajFileClose(&outf);
   
    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:30,代码来源:xmltext.c

示例4: main

int main(int argc, char **argv)
{
    AjPFeattaball featin;
    AjPFeattable feat = NULL;

    embInit("benchmark", argc, argv);

    featin = ajAcdGetFeaturesall("features");

    long counter = 0;

    while(ajFeattaballNext(featin, &feat))
    {
      counter++;
    }

    ajFeattableDel(&feat);
    ajFeattaballDel(&featin);

    printf("Read %li records\n", counter);

    embExit();

    return 0;
}
开发者ID:mamarjan,项目名称:gff3-examples,代码行数:25,代码来源:benchmark.c

示例5: main

int main(int argc, char **argv)
{
    /* Variable declarations */
    AjPOutfile outfile = NULL;    
    AjPVarload varload = NULL;
    AjPVar variation = NULL;

    /* ACD processing */
    embInit("variationget", argc, argv);

    varload   = ajAcdGetVariation("variation");
    outfile   = ajAcdGetOutvariation("outfile");
   
    while(ajVarloadNext(varload, &variation))
    {
        while(ajVarloadMore(varload, &variation))
        {
            ajVaroutWriteNext(outfile, variation);
        }
        ajOutfileReset(outfile);
    }

    /* Memory clean-up and exit */

    ajVarloadDel(&varload);
    ajVarDel(&variation);

    ajOutfileClose(&outfile);
   
    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:33,代码来源:variationget.c

示例6: main

int main(int argc, char **argv)
{
    /* Variable declarations */
    AjPFile outfile = NULL;    
    AjPResourceall resourceall = NULL;

    AjPResource resource = NULL;

    /* ACD processing */
    embInit("drtext", argc, argv);

    resourceall = ajAcdGetResourceall("resources");
    outfile   = ajAcdGetOutfile("outfile");
    
    while(ajResourceallNext(resourceall, &resource))
    {
        ajFmtPrintF(outfile,"%S",ajResourceGetEntry(resource));
    }

    ajResourceallDel(&resourceall);
    ajResourceDel(&resource);
    ajFileClose(&outfile);
   
    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:27,代码来源:drtext.c

示例7: main

int main(int argc, char **argv)
{
    /* Variable declarations */
    AjPOutfile outfile = NULL;    
    AjPResourceall resourceall = NULL;

    AjPResource resource = NULL;

    /* ACD processing */
    embInit("drget", argc, argv);

    resourceall = ajAcdGetResourceall("resources");
    outfile   = ajAcdGetOutresource("outfile");
    
    while(ajResourceallNext(resourceall, &resource))
    {
        ajResourceoutWrite(outfile, resource);
    }

    ajResourceallDel(&resourceall);
    ajResourceDel(&resource);
    ajOutfileClose(&outfile);
   
    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:27,代码来源:drget.c

示例8: main

int main(int argc, char **argv)
{

    AjPSeqall seqall;
    AjPSeqout seqout;
    AjPSeqout junkout;
    AjPSeq seq = NULL;
    AjPStr exclude = NULL;
    AjPStr pattern = NULL;
    AjPStr name = NULL;
    AjPStr acc  = NULL;

    embInit("notseq", argc, argv);

    seqout  = ajAcdGetSeqoutall("outseq");
    junkout = ajAcdGetSeqoutall("junkoutseq");
    seqall  = ajAcdGetSeqall("sequence");
    exclude = ajAcdGetString("exclude");

    notseq_readfile(exclude, &pattern);

    while(ajSeqallNext(seqall, &seq))
    {
	ajStrAssignS(&name, ajSeqGetNameS(seq));
	ajStrAssignS(&acc, ajSeqGetAccS(seq));

	if(embMiscMatchPatternDelimC(name, pattern, ",;") ||
           embMiscMatchPatternDelimC(acc, pattern, ",;"))
	    ajSeqoutWriteSeq(junkout, seq);
	else
	    /* no match, so not excluded */
	    ajSeqoutWriteSeq(seqout, seq);

	ajStrSetClear(&name);
	ajStrSetClear(&acc);
    }

    ajSeqoutClose(seqout);
    ajSeqoutClose(junkout);

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);
    ajSeqoutDel(&seqout);
    ajSeqoutDel(&junkout);
    ajStrDel(&exclude);
    ajStrDel(&pattern);
    ajStrDel(&name);
    ajStrDel(&acc);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:53,代码来源:notseq.c

示例9: main

int main(int argc, char **argv)
{
    AjPSeqall  seqall;
    AjPSeq     a;
    AjPSeqout  outf;
    AjPStr     substr;
    AjPStr     back;
    AjPStr     gctable;
    AjPCod     codon = NULL;
 
    ajint      gctablenum;

    ajint beg;
    ajint end;

    embInit("backtranambig", argc, argv);

    seqall    = ajAcdGetSeqall("sequence");
    outf      = ajAcdGetSeqoutall("outfile");
    gctable   = ajAcdGetListSingle("table");
    ajStrToInt(gctable, &gctablenum);

    codon = ajCodNewCodenum(gctablenum);
    while(ajSeqallNext(seqall, &a))
    {
        substr = ajStrNew();
        beg    = ajSeqGetBegin(a);
        end    = ajSeqGetEnd(a);
        ajStrAssignSubC(&substr,ajSeqGetSeqC(a),beg-1,end-1);

        back = ajStrNew();
        ajCodBacktranslateAmbig(&back,substr,codon);

        ajSeqAssignSeqS (a, back);
        ajSeqSetNuc(a);

        ajSeqoutWriteSeq(outf,a);
    }

    ajSeqoutClose(outf);

    ajStrDel(&back);
    ajStrDel(&substr);
    ajSeqoutDel(&outf);
    ajCodDel(&codon);
    ajStrDel(&gctable);
    ajSeqallDel(&seqall);
    ajSeqDel(&a);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:53,代码来源:backtranambig.c

示例10: main

int main(int argc, char **argv)
{
    /* Variable Declarations */
    AjPFile   inf     = NULL;
    AjPFile   outf    = NULL; 

    AjPStr    line    = NULL;  /* Line from inf     */
    AjPStr    option  = NULL;
    AjBool    doall   = AJFALSE;
    AjBool    doend   = AJFALSE;
    AjBool    doexcess = AJFALSE;

    /* ACD File Processing */
    embInit("nospace", argc, argv);
    inf  = ajAcdGetInfile("infile");
    outf = ajAcdGetOutfile("outfile");
    option = ajAcdGetListSingle("menu");

    if(ajStrMatchC(option, "all"))
        doall = ajTrue;
    else if(ajStrMatchC(option, "end"))
        doend = ajTrue;
    else if(ajStrMatchC(option, "excess"))
        doexcess = ajTrue;

    /* Application logic */
    line    = ajStrNew();

    while(ajReadline(inf,&line))
      {
          if(doall)
              ajStrRemoveWhite(&line);
          else if(doend)
              ajStrTrimWhiteEnd(&line);
          else if(doexcess)
              ajStrRemoveWhiteExcess(&line);
	ajFmtPrintF(outf, "%S\n", line);
      }

    /* Memory management and exit */
    ajFileClose(&inf);
    ajFileClose(&outf);

    ajStrDel(&line);
    ajStrDel(&option);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:50,代码来源:nospace.c

示例11: main

int main(int argc, char **argv)
{
    if(argc < 2)
	ajFatal("Error - must specify an application to compile\n");

    ajAcdSetControl("acdtrace");
    ajAcdSetControl("acdnocommandline");
    embInit(argv[1], argc-1, &argv[1]);

    ajAcdExit(ajTrue);		/* turn off the 'never used' ACD warnings */

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:15,代码来源:acdtrace.c

示例12: main

int main(int argc, char **argv)
{
    AjPSeqall seqall;
    AjPSeq seq;
    AjPFile outf;
    AjPCod codon;
    AjPStr substr;
    ajint beg;
    ajint end;
    ajint ccnt;


    embInit("cusp", argc, argv);

    seqall = ajAcdGetSeqall("sequence");
    outf   = ajAcdGetOutfile("outfile");

    ccnt   = 0;
    substr = ajStrNew();
    codon  = ajCodNewCodenum(0);
    ajCodSetNameS(codon, ajFileGetPrintnameS(outf));

    while(ajSeqallNext(seqall, &seq))
    {
	beg = ajSeqallGetseqBegin(seqall);
	end  = ajSeqallGetseqEnd(seqall);
	ajStrAssignSubS(&substr,ajSeqGetSeqS(seq),beg-1,end-1);
	ajCodSetTripletsS(codon,substr,&ccnt);
    }

    ajCodCalcUsage(codon,ccnt);

    ajCodSetDescC(codon, "CUSP codon usage file");
    ajCodWrite(codon, outf);
    ajFileClose(&outf);

    ajStrDel(&substr);
    ajCodDel(&codon);

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:46,代码来源:cusp.c

示例13: main

int main(int argc, char **argv)
{
    AjPSeqall seqall;
    AjPSeq seq;
    AjPTable table = 0;
    AjPFile outf;
    ajint wordsize;
    ajint mincount;

    embInit("wordcount", argc, argv);

    seqall = ajAcdGetSeqall("sequence1");

    wordsize = ajAcdGetInt("wordsize");
    outf     = ajAcdGetOutfile("outfile");
    mincount = ajAcdGetInt("mincount");

    embWordLength(wordsize);

    while (ajSeqallNext(seqall, &seq))
    {
        embWordGetTable(&table, seq);		/* get table of words   */
    }

    embWordPrintTableFI(table, mincount, outf); /* print table of words */
    /*
     **  test if table can be added to
     **  if(getWordTable(&table, seq, wordcount)) ?? get table of words ??
     **  {
     **       printWordTable(table);              ?? print table of words ??
     **  }
     */
    embWordFreeTable(&table);	/* free table of words */

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);
    ajFileClose(&outf);

    embExit();

    return 0;
}
开发者ID:remills,项目名称:CodonShuffle,代码行数:42,代码来源:wordcount.c

示例14: main

int main(int argc, char **argv)
{
    /* Variable Declarations */
    AjPSeqset seqset  = NULL;
    AjPSeqout seqout  = NULL;
    AjBool    bigfirst;
    ajuint nseqs;
    ajuint i;

    /* ACD File Processing */
    embInit("sizeseq", argc, argv);
    seqset      = ajAcdGetSeqset("sequences");
    bigfirst    = ajAcdGetBoolean("descending");
    seqout      = ajAcdGetSeqoutall("outseq");

    /* Application logic */
    ajSeqsetSortLen(seqset);
    nseqs = ajSeqsetGetSize(seqset);
    
    if(bigfirst)
    {
        for(i=nseqs; i>0; i--)
            ajSeqoutWriteSeq(seqout, ajSeqsetGetseqSeq(seqset,i-1));
    }
    else
    {
        for(i=0; i<nseqs; i++)
            ajSeqoutWriteSeq(seqout, ajSeqsetGetseqSeq(seqset,i));
    }
    

    /* Memory management and exit */
    ajSeqsetDel(&seqset);
    ajSeqoutClose(seqout);
    ajSeqoutDel(&seqout);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:40,代码来源:sizeseq.c

示例15: main

int main(int argc, char **argv)
{
    AjPSeqall seqall;
    AjPFile outf;
    AjPSeq seq = NULL;
    AjPList xrefs = NULL;
    ajuint nrefs;
    AjPSeqXref xref = NULL;

    embInit("seqxref", argc, argv);

    outf = ajAcdGetOutfile("outfile");
    seqall = ajAcdGetSeqall("sequence");

    xrefs = ajListNew();

    while(ajSeqallNext(seqall, &seq))
    {
        nrefs = ajSeqGetXrefs(seq, xrefs);
        ajSeqxreflistSort(xrefs);

        ajFmtPrintF(outf, "#%S: %u\n", ajSeqGetUsaS(seq), nrefs);

        while(ajListPop(xrefs, (void**)&xref))
        {
            ajFmtPrintF(outf, "%S:%S\n", xref->Db, xref->Id);
            ajSeqxrefDel(&xref);
        }
    }

    ajListFree(&xrefs);
    ajSeqDel(&seq);
    
    ajFileClose(&outf);
    ajSeqallDel(&seqall);

    embExit();

    return 0;
}
开发者ID:WenchaoLin,项目名称:JAMg,代码行数:40,代码来源:seqxref.c


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