예제 #1
0
void carryMultiOption(char *option, struct dyString *dy)
/* Carry multi-valued option from our command line to paraNode's. Do
 * naive quoting */
{
struct slName *val;
for (val = optionMultiVal(option, NULL); val != NULL; val = val->next)
    dyStringPrintf(dy, " %s='%s'", option, val->name);
}
예제 #2
0
static struct chromSize *getChroms(char *db)
/* get list of chroms to use in tests */
{
struct slName *specs = optionMultiVal("chrom", NULL);
if (specs == NULL)
    return getLongestChrom(db);
else if (slNameInList(specs, "all"))
    return getAllChroms(db);
else
    return getChromsFromSpecs(db, specs);
}
예제 #3
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, optionSpecs);
if (argc != 7)
    usage();
keep = optionExists("keep");
loadDb = optionExists("loadDb");
statVals = optionMultiVal("stat", NULL);
if (statVals == NULL)
    {
    int i;
    for (i = 0; statValDefaults[i] != NULL; i++)
        slSafeAddHead(&statVals, slNameNew(statValDefaults[i]));
    }
ccdsMkTables(argv[1], argv[2], sqlSigned(argv[3]), argv[4], argv[5], argv[6]);
return 0;
}
예제 #4
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);
if (argc != 3)
    usage();
clGenePredExt = optionExists("genePredExt");
doSimple = optionExists("simple");
clIgnoreGroupsWithoutExons = optionExists("ignoreGroupsWithoutExons");
clAllErrors = optionExists("allErrors");
clSourcePrefixes = optionMultiVal("sourcePrefix", NULL);
if (optionExists("impliedStopAfterCds"))
    clGxfOptions |= genePredGxfImpliedStopAfterCds;
if (optionExists("geneNameAsName2"))
    clGxfOptions |= genePredGxfGeneNameAsName2;

gtfToGenePred(argv[1], argv[2], optionVal("infoOut", NULL));
if (badGroupCount > 0)
    errAbort("%d errors", badGroupCount);
return 0;
}
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, optionSpecs);
if (argc != 2)
    usage();
maxProcs = optionInt("cpu", 1);
umaskVal = optionInt("umask", 0002);
userPath = optionVal("userPath", userPath);
sysPath = optionVal("sysPath", sysPath);
envExtra = optionMultiVal("env", NULL);
randomDelay = optionInt("randomDelay", randomDelay);

/* Look up IP addresses. */
localIp = lookupIp("localhost");
hubName = optionVal("hub", NULL);
if (hubName != NULL)
    hubIp = lookupIp(hubName);
paraDaemonize("paraNode");
paraNode();
return 0;
}
void netFilter(int inCount, char *inFiles[])
/* netFilter - Filter out parts of net.. */
{
FILE *f = stdout;
int i;
boolean doLine = optionExists("line");

tHash = hashCommaOption("t");
notTHash = hashCommaOption("notT");
qHash = hashCommaOption("q");
notQHash = hashCommaOption("notQ");
minScore = optionInt("minScore", -BIGNUM);
maxScore = optionFloat("maxScore", 9e99);
qStartMin = optionInt("qStartMin", -BIGNUM);
qStartMax = optionInt("qStartMax", BIGNUM);
qEndMin = optionInt("qEndMin", -BIGNUM);
qEndMax = optionInt("qEndMax", BIGNUM);
tStartMin = optionInt("tStartMin", -BIGNUM);
tStartMax = optionInt("tStartMax", BIGNUM);
tEndMin = optionInt("tEndMin", -BIGNUM);
tEndMax = optionInt("tEndMax", BIGNUM);
qOverlapStart = optionInt("qOverlapStart", -BIGNUM);
qOverlapEnd = optionInt("qOverlapEnd", BIGNUM);
tOverlapStart = optionInt("tOverlapStart", -BIGNUM);
tOverlapEnd = optionInt("tOverlapEnd", BIGNUM);
doSyn = optionExists("syn");
minTopScore = optionFloat("minTopScore", minTopScore);
minSynScore = optionFloat("minSynScore", minSynScore);
minSynSize = optionFloat("minSynSize", minSynSize);
minSynAli = optionFloat("minSynAli", minSynAli);
maxFar = optionFloat("maxFar", maxFar);
doChimpSyn = optionExists("chimpSyn");
doNonSyn = optionExists("nonsyn");
minGap = optionInt("minGap", minGap);
minAli = optionInt("minAli", minAli);
minSizeT = optionInt("minSizeT", minSizeT);
minSizeQ = optionInt("minSizeQ", minSizeQ);
fillOnly = optionExists("fill");
gapOnly = optionExists("gap");
types = optionMultiVal("type", types);
noRandom = optionExists("noRandom");
noHap = optionExists("noHap");

for (i=0; i<inCount; ++i)
    {
    struct lineFile *lf = lineFileOpen(inFiles[i], TRUE);
    if (doLine)
        {
	netLineFilter(lf, f);
	}
    else
	{
	struct chainNet *net;
	while ((net = chainNetRead(lf)) != NULL)
	    {
	    boolean writeIt = TRUE;
	    if (tHash != NULL && !hashLookup(tHash, net->name))
		writeIt = FALSE;
	    if (notTHash != NULL && hashLookup(notTHash, net->name))
		writeIt = FALSE;
	    if (noRandom && (endsWith(net->name, "_random")
			     || startsWith("chrUn", net->name)
			     || sameWord("chrNA", net->name) /* danRer */
			     || sameWord("chrU", net->name)))  /* dm */
	        writeIt = FALSE;
	    if (noHap && stringIn("_hap",net->name))
		writeIt = FALSE;
	    if (writeIt)
		{
		writeFiltered(net, f);
		}
	    chainNetFree(&net);
	    }
	}
    lineFileClose(&lf);
    }
}