コード例 #1
0
int main(int argc, char *argv[])
/* Process command line. */
{
char *task;
optionInit(&argc, argv, options);
if (argc < 2)
    usage("must supply a task");
task = argv[1];
gMaxRows = optionInt("maxRows", gMaxRows);
gMinRows = optionInt("minRows", gMinRows);
gNeedRows = optionInt("minRows", gNeedRows);
gWhere = optionVal("where", gWhere);
gChrom = optionVal("chrom", gChrom);
gOutput = optionVal("output", gOutput);

if (sameString(task, "readTable"))
    {
    if (argc != 4)
        usage("readTable task requires two arguments");
    readTableTask(argv[2], argv[3]);
    }
else if (sameString(task, "readFile"))
    {
    if (argc != 3)
        usage("readFile task requires one argument");
    readFile(argv[2]);
    }
else 
    {
    usage("invalid task");
    }


return 0;
}
コード例 #2
0
ファイル: altAnalysis.c プロジェクト: ucscGenomeBrowser/kent
int main(int argc, char *argv[])
{
char *altGraphXOutName = NULL;
char *altLogFileName = NULL;
char *bedViewOutFileName =NULL;
if(argc < 6)
    usage();
optionHash(&argc, argv);
doSScores = optionExists("doSScores");
altGraphXOutName = optionVal("altGraphXOut", NULL);
minConfidence = optionInt("minConf", 0);
altLogFileName = optionVal("altLogFile", NULL);
flankingSize = optionInt("flankingSize", 100);
bedViewOutFileName = optionVal("bedViewFile", NULL);
minControlConf = optionInt("minControlConf", 0);
warn("Flanking size is: %d", flankingSize);
if(altLogFileName != NULL)
    altLogFile = mustOpen(altLogFileName, "w");
if(bedViewOutFileName != NULL)
    bedViewOutFile = mustOpen(bedViewOutFileName, "w");
if(altGraphXOutName)
    {
    warn("Writing alts to %s", altGraphXOutName);
    altGraphXOut = mustOpen(altGraphXOutName, "w");
    }
altSummary(argv[1], argv[2], argv[3], argv[4], argv[5]);
if(altGraphXOut != NULL)
    carefulClose(&altGraphXOut);
if(altLogFile != NULL)
    carefulClose(&altLogFile);
if(bedViewOutFile != NULL)
    carefulClose(&bedViewOutFile);
return 0;
}
コード例 #3
0
ファイル: server.c プロジェクト: davidhoover/kent
int main(int argc, char *argv[])
/* Process command line. */
{
char *command;
bzpTime(NULL);
dnaUtilOpen();
setMaxAlloc(2LL*1024LL*1024LL*1024LL);
optionInit(&argc, argv, options);
port = optionInt("port", port);
host = optionVal("host", host);
netParseSubnet(optionVal("subnet", NULL), subnet);
cpuCount = optionInt("cpu", cpuCount);
if (argc < 2)
    usage();
command = argv[1];
if (sameWord(command, "start"))
    {
    if (argc < 3)
        usage();
    serverStart(argv+2, argc-2);
    }
else if (sameWord(command, "stop"))
    {
    serverStop();
    }
else if (sameWord(command, "status"))
    {
    serverStatus();
    }
else
    usage();
return 0;
}
コード例 #4
0
ファイル: gbGetTestSubset.c プロジェクト: davidhoover/kent
int main(int argc, char* argv[])
/* parse command line */
{
int numMrnas;
int numEsts;
char *accList, *selectAccFile;
char *database, *relName, *outDir;

verboseSetLevel(0);
optionInit(&argc, argv, optionSpecs);
if (argc != 4)
    usage();
relName = argv[1];
database = argv[2];
outDir = argv[3];
numMrnas = optionInt("numMrnas", 10);
numEsts = optionInt("numEsts", 10);
accList = optionVal("accList",  NULL);
selectAccFile = optionVal("selectAcc",  NULL);
gbVerbInit(optionInt("verbose", 0));
if (verboseLevel() > 0)
    setlinebuf(stderr);

getTestSubset(numMrnas, numEsts, accList, selectAccFile,
              relName, database, outDir);

return 0;
}
コード例 #5
0
ファイル: checkTableCoords.c プロジェクト: maximilianh/kent
int main(int argc, char *argv[])
{
char *exclude = NULL;
int daysOld = 0;

optionInit(&argc, argv, optionSpecs);
theTable     = optionVal("table", theTable);
daysOld      = optionInt("daysOld", daysOld);
hoursOld     = optionInt("hoursOld", hoursOld) + (24 * daysOld);
exclude      = optionVal("exclude", exclude);
ignoreBlocks = optionExists("ignoreBlocks");
verboseBlocks= optionExists("verboseBlocks");
justList     = optionExists("justList");

processExcludes(exclude);

db = argv[1];
/* Allow "checkTableCoords db table" usage too: */
if (theTable == NULL && argc == 3)
    {
    theTable = argv[2];
    argc = 2;
    }
if (argc != 2)
    usage();
verboseSetLogFile("stdout");
return checkTableCoords(argv[1]);
}
コード例 #6
0
ファイル: twoBitToFa.c プロジェクト: blumroy/kentUtils
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
clSeq = optionVal("seq", clSeq);
clStart = optionInt("start", clStart);
clEnd = optionInt("end", clEnd);
clSeqList = optionVal("seqList", clSeqList);
clBpt = optionVal("bpt", clBpt);
clBed = optionVal("bed", clBed);
clBedPos = optionExists("bedPos");
noMask = optionExists("noMask");
udcSetDefaultDir(optionVal("udcDir", udcDefaultDir()));

if (clBedPos && !clBed) 
    errAbort("the -bedPos option requires the -bed option");
if (clBed != NULL)
    {
    if (clSeqList != NULL)
	errAbort("Can only have seqList or bed options, not both.");
    if (clSeq != NULL)
        errAbort("Can only have seq or bed options, not both.");
    }
if ((clStart > clEnd) && (clSeq == NULL))
    errAbort("must specify -seq with -start and -end");
if ((clSeq != NULL) && (clSeqList != NULL))
    errAbort("can't specify both -seq and -seqList");

dnaUtilOpen();
twoBitToFa(argv[1], argv[2]);
return 0;
}
コード例 #7
0
int main(int argc, char* argv[])
{
char *relName, *updateName, *typeAccPrefix, *database, *sep;
struct gbIndex* index;
struct gbSelect select;
struct gbSelect* prevSelect = NULL;
struct gbAlignInfo alignInfo;
boolean noMigrate;
ZeroVar(&select);

optionInit(&argc, argv, optionSpecs);
if (argc != 5)
    usage();
maxFaSize = optionInt("fasize", -1);
workDir = optionVal("workdir", "work/align");
noMigrate = optionExists("noMigrate");
createPolyASizes = optionExists("polyASizes");
gbVerbInit(optionInt("verbose", 0));
relName = argv[1];
updateName = argv[2];
typeAccPrefix = argv[3];
database = argv[4];

/* parse typeAccPrefix */
sep = strchr(typeAccPrefix, '.');
if (sep != NULL)
    *sep = '\0';
select.type = gbParseType(typeAccPrefix);
if (sep != NULL)
    {
    select.accPrefix = sep+1;
    *sep = '.';
    }
select.orgCats = gbParseOrgCat(optionVal("orgCats", "native,xeno"));

index = gbIndexNew(database, NULL);
select.release = gbIndexMustFindRelease(index, relName);
select.update = gbReleaseMustFindUpdate(select.release, updateName);
gbVerbMsg(0, "gbAlignGet: %s/%s/%s/%s", select.release->name,
          select.release->genome->database, select.update->name,
          typeAccPrefix);

/* Get the release to migrate, if applicable */
if (!noMigrate)
    prevSelect = gbAlignGetMigrateRel(&select);

alignInfo = gbAlignGet(&select, prevSelect);

/* always print stats */
fprintf(stderr, "gbAlignGet: %s/%s/%s/%s: align=%d, migrate=%d\n",
        select.release->name, select.release->genome->database,
        select.update->name, typeAccPrefix,
        alignInfo.align.accTotalCnt, alignInfo.migrate.accTotalCnt);
gbIndexFree(&index);

/* print alignment and migrate count, which is read by the driver program */
printf("alignCnt: %d %d\n", alignInfo.align.accTotalCnt, alignInfo.migrate.accTotalCnt);
return 0;
}
コード例 #8
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
minSize = optionInt("minSize", minSize);
minTrim = optionInt("minTrim", minTrim);
cdwFastqPolyFilter(argv[1], argv[2]);
return 0;
}
コード例 #9
0
int main(int argc, char *argv[])
/* Process command line. */
{
    optionHash(&argc, argv);
    if (argc != 5)
        usage();
    maxErr = optionInt("maxErr", maxErr);
    maxWarn = optionInt("maxWarn", maxWarn);
    hgClonePos(argv[1], argv[2], argv[3], argv[4]);
    return 0;
}
コード例 #10
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
dotEvery = optionInt("dots", 0);
numThreads = optionInt("threads", DEFTHREADS);
if (argc != 5)
    usage();
hgExpDistance(argv[1], argv[2], argv[3], argv[4]);
return 0;
}
コード例 #11
0
ファイル: vgLoadJax.c プロジェクト: ucscGenomeBrowser/kent
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
testMax = optionInt("testMax", testMax);
oneSubmissionSet = optionInt("oneSubmissionSet", oneSubmissionSet);
if (argc != 4)
    usage();
vgLoadJax(argv[1], argv[2], argv[3]);
return 0;
}
コード例 #12
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionHash(&argc, argv);
if (argc < 4)
    usage();
chunkSize = optionInt("chunkSize", chunkSize);
maxLines = optionInt("maxLines", maxLines);
stripVer = optionExists("stripVer");
pslSplit(argv[1], argv[2], &argv[3], argc-3);
return 0;
}
コード例 #13
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, optionSpecs);
dots = optionInt("dots", dots);
pad = optionInt("pad", pad);
inclHap = optionExists("inclHap");
if (argc != 5)
    usage();
chainPreNet(argv[1], argv[2], argv[3], argv[4]);
return 0;
}
コード例 #14
0
ファイル: pslPartition.c プロジェクト: Nicholas-NVS/kentUtils
int main(int argc, char *argv[])
/* Process command line. */
{
    optionInit(&argc, argv, optionSpecs);
    if (argc != 3)
        usage("wrong # args");
    gOutLevels = optionInt("outLevels", gOutLevels);
    gPartSize = optionInt("partSize", gPartSize);
    gDropContained = optionExists("dropContained");
    pslPartition(argv[1], argv[2]);
    return 0;
}
コード例 #15
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionHash(&argc, argv);
minGapSize = optionInt("minGapSize", minGapSize);
scaffoldGapSize = optionInt("scaffoldGapSize", scaffoldGapSize);

if (argc != 2)
    usage();
scaffoldFaToAgp(argv[1]);
return 0;
}
コード例 #16
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
clJoinSize = optionInt("joinSize", clJoinSize);
clMinCluster = optionInt("minCluster", clMinCluster);
clHist = optionExists("hist");
if (argc != 3)
    usage();
edwClusterMethylBed(argv[1], argv[2]);
return 0;
}
コード例 #17
0
void netToBed(char *inName, char *outName)
/* netToBed - Convert target coverage of net to a bed file.. */
{
if (optionExists("maxGap") || optionExists("minFill"))
    {
    maxGap = optionInt("maxGap", maxGap);
    minFill = optionInt("minFill", minFill);
    netToBedDetailed(inName, outName, maxGap, minFill);
    }
else
    netToBedSimple(inName, outName);
}
コード例 #18
0
int main(int argc, char *argv[])
/* Process command line. */
{
    optionInit(&argc, argv, options);
    blockSize = optionInt("blockSize", blockSize);
    itemsPerSlot = optionInt("itemsPerSlot", (blockSize+1)/2);
    noCheckSort = optionExists("noCheckSort");
    if (argc != 3)
        usage();
    crTreeIndexBed(argv[1], argv[2]);
    return 0;
}
コード例 #19
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
chrom = optionVal("chrom", NULL);
minGap = optionInt("minGap", minGap);
minRepeat = optionInt("minRepeat", minRepeat);
if (argc != 4)
    usage();
mafSplitPos(argv[1], argv[2], argv[3]);
return 0;
}
コード例 #20
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
clChrom = optionVal("chrom", clChrom);
clStart = optionInt("start", clStart);
clEnd = optionInt("end", clEnd);
udcSetDefaultDir(optionVal("udcDir", udcDefaultDir()));
bigWigToWig(argv[1], argv[2]);
return 0;
}
コード例 #21
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
blockSize = optionInt("blockSize", blockSize);
itemsPerSlot = optionInt("itemsPerSlot", itemsPerSlot);
bedFields = optionInt("bedFields", bedFields);
as = optionVal("as", as);
if (argc != 4)
    usage();
bedToBigBed(argv[1], argv[2], argv[3]);
return 0;
}
コード例 #22
0
ファイル: chainNet.c プロジェクト: elmargb/kentUtils
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;
}
コード例 #23
0
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;
}
コード例 #24
0
ファイル: axtSplitByTarget.c プロジェクト: blumroy/kentUtils
int main(int argc, char *argv[])
/* Process command line. */
{
optionHash(&argc, argv);
if (argc != 3)
    usage();
tStartSize = optionInt("tStartSize", 0);
chunkSize = optionInt("chunkSize", 0);
if (chunkSize && tStartSize)
    usage();
tSS = (double)tStartSize;
axtSplitByTarget(argv[1], argv[2]);
return 0;
}
コード例 #25
0
ファイル: regBedStats.c プロジェクト: davidhoover/kent
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
chromColIx = optionInt("chromColIx", chromColIx);
startColIx = optionInt("startColIx", startColIx);
endColIx = optionInt("endColIx", endColIx);
scoreColIx = optionInt("scoreColIx", scoreColIx);

regBedStats(argv[1], argv[2]);
return 0;
}
コード例 #26
0
int main(int argc, char *argv[])
/* Process command line. */
{
    optionInit(&argc, argv, options);
    if (argc != 4)
        usage();
    name = optionVal("name", "chrUn");
//vOption = optionExists("v");
//minSize = optionInt("minSize", -1);
    maxOutputSize = optionInt("maxOutputSize", maxOutputSize);
    gapSize = optionInt("gapSize", 25);
    faCat(argv[1],argv[2], argv[3]);
    return 0;
}
コード例 #27
0
ファイル: calcGap.c プロジェクト: blumroy/kentUtils
int main(int argc, char *argv[])
/* Process command line. */
{
optionHash(&argc, argv);
scale = optionFloat("scale", scale);
maxGap = optionInt("maxGap", maxGap);
near = optionInt("near", near);
sampleList = optionVal("samples", cloneString(sampleList));

if (argc != 2)
    usage();
calcGap(argv[1]);
return 0;
}
コード例 #28
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, optionSpecs);
test = optionExists("test");
mergeGap = optionInt("mergeGap", mergeGap);
minSize = optionInt("minSize", minSize);
maxSize = optionInt("maxSize", maxSize);
minSeqSize = optionInt("minSeqSize", minSeqSize);
if (argc != 4)
    usage();
database = argv[1];
hgLoadMafSummary(database, argv[2], argv[3]);
return 0;
}
コード例 #29
0
ファイル: alphaChain.c プロジェクト: davidhoover/kent
int main(int argc, char *argv[])
/* Process command line. */
{
warn("Program obsolete - try using alphaAsm instead");
optionInit(&argc, argv, options);
if (argc != 4)
    usage();
maxChainSize = optionInt("size", maxChainSize);
outSize = optionInt("outSize", outSize);
fullOnly = optionExists("fullOnly");
int seed = optionInt("seed", (int)time(0));
srand(seed);
alphaChain(argv[1], argv[2], argv[3]);
return 0;
}
コード例 #30
0
ファイル: wordChain.c プロジェクト: bowhan/kent
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 2)
    usage();
maxChainSize = optionInt("size", maxChainSize);
minUse = optionInt("minUse", minUse);
maxNonsenseSize = optionInt("maxNonsenseSize", maxNonsenseSize);
lower = optionExists("lower");
unpunc = optionExists("unpunc");
fullOnly = optionExists("fullOnly");
wordChain(argv[1], maxChainSize);
return 0;
}