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/hgc/hgc.c src/hg/hgc/hgc.c index 98760f2f6c4..41dba1418d8 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -22947,32 +22947,32 @@ doBigDbSnp(ct->tdb, item); else if (sameWord(type, "bigBed") || sameWord(type, "bigGenePred") || sameWord(type, "bigLolly") || sameWord(type, "bigMethyl")) bigBedCustomClick(ct->tdb); else if (startsWith("bigRmsk", type)) doBigRmskRepeat(ct->tdb, item); else if (sameWord(type, "bigBarChart") || sameWord(type, "barChart")) doBarChartDetails(ct->tdb, item); else if (sameWord(type, "bigInteract") || sameWord(type, "interact")) doInteractDetails(ct->tdb, item); else if (sameWord(type, "bam") || sameWord(type, "cram")) doBamDetails(ct->tdb, itemName); else if (sameWord(type, "vcfTabix") || sameWord(type, "vcfPhasedTrio")) doVcfTabixDetails(ct->tdb, itemName); else if (sameWord(type, "vcf")) doVcfDetails(ct->tdb, itemName); -else if (sameWord(type, "makeItems")) - doMakeItemsDetails(ct, fileName); // fileName is first word, which is, go figure, id +else if (cfgOptionBooleanDefault("doMyVariants", FALSE) && startsWith("myVariants_", trackId)) + doMyVariantsDetails(ct, item); else if (ct->wiggle) { if (ct->dbTrack) { struct sqlConnection *conn = hAllocConn(CUSTOM_TRASH); genericWiggleClick(conn, ct->tdb, fileItem, start); hFreeConn(&conn); } else genericWiggleClick(NULL, ct->tdb, fileItem, start); /* the NULL is for conn, don't need that for custom tracks */ } else if (ct->dbTrack && startsWith("bedGraph", ct->dbTrackType)) { printf("<P><A HREF=\"../cgi-bin/hgTables?db=%s&hgta_group=%s&hgta_track=%s" @@ -27183,39 +27183,39 @@ winEnd = cartUsualInt(cart, "r", 0); /* Allow faked-out c=0 l=0 r=0 (e.g. for unaligned mRNAs) but not just any * old bogus position: */ if (seqName == NULL) { if (winStart != 0 || winEnd != 0) webAbortNoHttpHeader("CGI variable error", "hgc: bad input variables c=%s l=%d r=%d", cartString(cart, "c"), winStart, winEnd); else seqName = hDefaultChrom(database); } struct customTrack *ct = NULL; -if (isCustomTrack(track)) +if (isCustomTrack(track) || startsWith("myVariants_", track)) { struct customTrack *ctList = getCtList(); for (ct = ctList; ct != NULL; ct = ct->next) if (sameString(track, ct->tdb->track)) break; } -if ((!isCustomTrack(track) && dbIsFound) +if ((!isCustomTrack(track) && !startsWith("myVariants_", track) && dbIsFound) || ((ct!= NULL) && (((ct->dbTrackType != NULL) && sameString(ct->dbTrackType, "maf"))|| sameString(ct->tdb->type, "bigMaf")))) { trackHash = makeTrackHashWithComposites(database, seqName, TRUE); if (sameString("htcBigPslAli", track) || sameString("htcBigPslAliInWindow", track) ) { char *aliTable = cartString(cart, "aliTable"); if (isHubTrack(aliTable)) tdb = hubConnectAddHubForTrackAndFindTdb( database, aliTable, NULL, trackHash); } else if (isHubTrack(track)) { tdb = hubConnectAddHubForTrackAndFindTdb( database, track, NULL, trackHash); } if (parentWigMaf) { @@ -27841,31 +27841,31 @@ { doMouseOrtho(tdb, item); } else if (sameWord(table, USER_PSL_TRACK_NAME)) { doUserPsl(table, item); } else if (sameWord(table, PCR_RESULT_TRACK_NAME)) { doPcrResult(table, item); } else if (sameWord(table, "softPromoter")) { hgSoftPromoter(table, item); } -else if (isCustomTrack(table)) +else if (isCustomTrack(table) || startsWith("myVariants_", table)) { if (tdb != NULL) { char *origTrackName = trackDbSetting(tdb, "origTrackName"); if (origTrackName) table = origTrackName; } hgCustom(table, item); } else if (sameWord(table, "snpTsc") || sameWord(table, "snpNih") || sameWord(table, "snpMap")) { doSnpOld(tdb, item); } else if (sameWord(table, "snp")) {