4bb9e8caea515342ba98d3871da76cd4ec69916f chmalee Fri May 1 14:10:00 2026 -0700 Initial myVariants implementation: a form on hgTracks where users can enter item details in one of three ways: hgvs/item search, simple bed form, advanced bed form where additional non-bed fields can dynamically created. Allows changing the color of items, writing descriptions, and editing the items after creation. Show overlaps with hardcoded tracks when hgc page is open (not in the hgc dialog). Next commit has implementation of sharing these tracks with other users diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index 7cb2fcb501a..beb66b30785 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -1233,40 +1233,65 @@ /* Set up common bigBed methods used by several track types that depend on the bigBed format. */ void bigBedMethods(struct track *track, struct trackDb *tdb, int wordCount, char *words[]); /* Set up bigBed methods for tracks that are type bigBed. */ void chromGraphMethods(struct track *tg); /* Fill in chromGraph methods for built in track. */ void chromGraphMethodsCt(struct track *tg); /* Fill in chromGraph methods for custom track. */ void factorSourceMethods(struct track *track); /* Set up special methods for factorSource type tracks. */ -void makeItemsMethods(struct track *track); -/* Set up special methods for makeItems type tracks. */ +void myVariantsMethods(struct track *track); +/* Set up special methods for myVariants type tracks. */ -void makeItemsJsCommand(char *command, struct track *trackList, struct hash *trackHash); +void myVariantsJsCommand(char *command, struct track *trackList, struct hash *trackHash); /* Execute some command sent to us from the javaScript. All we know for sure is that - * the first word of the command is "makeItems." We expect it to be of format: - * makeItems <trackName> <chrom> <chromStart> <chromEnd> - * If it is indeed of this form then we'll create a new makeItemsItem that references this + * the first word of the command is "myVariants." We expect it to be of format: + * myVariants <trackName> <chrom> <chromStart> <chromEnd> + * If it is indeed of this form then we'll create a new myVariants that references this * location and stick it in the named track. */ +struct track *myVariantsTg(); +/* Make track that will ultimately have the data from: + * customData.myVariants_userName table */ + +boolean myVariantsTrackEnabled(); +/* Return TRUE if the "My Variants" feature is enabled in hg.conf + * and the current request comes from a valid user */ + +void myVariantsShareApiHandler(char *action); +/* Handle share API requests. Outputs JSON to stdout and calls exit(0). + * Called from main() before cartHtmlShell. */ + +void notify(char *msg, char *msgId); +/* print a message into a hidden DIV tag, and call Javascript to move the DIV + * under the tableHeaderForm element and un-hide it. */ + +void myVariantsProcessShareParam(); +/* Check for myVarShare CGI param, validate the share token, and store + * the share reference in the cart. Must be called before track loading. */ + +void myVariantsProcessSharedEdits(); +/* Process pending edits for shared tracks before any track loading. + * This ensures edits are committed to the database before both the + * owner's track and the shared track query for items. */ + void wigMafPMethods(struct track *track, struct trackDb *tdb, int wordCount, char *words[]); void wigMafMethods(struct track *track, struct trackDb *tdb, int wordCount, char *words[]); int wigTotalHeight(struct track *tg, enum trackVisibility vis); /* Wiggle track will use this to figure out the height they use as defined in the cart */ /* Make track for wig - wiggle tracks. */ /* Make track group for maf track with wiggle. */ void rnaSecStrMethods(struct track *tg); /* Make track which visualizes RNA secondary structure annotation. */