7a46e5f195b269e0f0e1639e850c4b35bf5bd9f9 tdreszer Fri Oct 14 16:49:23 2011 -0700 Slight adjustment to one API diff --git src/hg/lib/hgMaf.c src/hg/lib/hgMaf.c index af1a023..4acdd39 100644 --- src/hg/lib/hgMaf.c +++ src/hg/lib/hgMaf.c @@ -408,35 +408,37 @@ wigTable = fields[i]; if (hTableExists(db, wigTable)); { AllocVar(wig); wig->table = cloneString(wigTable); wigLabel = (i+1 == fieldCt ? DEFAULT_CONS_LABEL : fields[i+1]); wig->leftLabel = cloneString(wigLabel); wigLabel = (i+2 >= fieldCt ? wig->leftLabel : fields[i+2]); wig->uiLabel = cloneString(wigLabel); slAddTail(&wigList, wig); } } return wigList; } -char *wigMafWiggleVar(char *prefix, struct consWiggle *wig) -/* Return name of cart variable for this cons wiggle */ +char *wigMafWiggleVar(char *prefix, struct consWiggle *wig,char **suffix) +// Return name of cart variable (and optionally the suffix) for this cons wiggle { char option[128]; safef(option, sizeof option, "%s.cons.%s", prefix, wig->leftLabel); +if (suffix != NULL) + *suffix = option + strlen(prefix) + 1; return (cloneString(option)); } struct consWiggle *consWiggleFind(char *db,struct trackDb *parent,char *table) /* Return conservation wig if it is found in the parent. */ { if(parent == NULL || !startsWith("wigMaf", parent->type)) return NULL; struct consWiggle *wig, *wiggles = wigMafWiggles(db, parent); for (wig = wiggles; wig != NULL && differentString(wig->table,table); wig = wig->next) {} return wig; }