d3752edc12da1bf08427946150f564dbdd5d2254 angie Thu Oct 24 13:55:51 2019 -0700 bigDbSnp track handler code - initial commit. refs #23283 * dnautil: Added trimRefAltLeft to get left-justified trimming (a la VCF not HGVS). * bigBedClick: do hReplaceGbdb up front in parseDetailsTablUrls instead of waiting until endpoint. * trackDbCustom.c: consolidating type-handling for wig/bigWig vs. bigBed-based big*. diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index de048ab..9352a3e 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -1467,31 +1467,31 @@ char *idUrl = replaceInUrl(url, idForUrl, cart, database, seqName, winStart, winEnd, tdb->track, encode, NULL); printf("%s", idUrl, itemName); } printf("\n"); freeMem(slIds); //freeMem(idNames); } int extraFieldsStart(struct trackDb *tdb, int fieldCount, struct asObject *as) /* return the index of the first extra field */ { int start = 0; char *type = cloneString(tdb->type); char *word = nextWord(&type); -if (word && (sameWord(word,"bed") || sameWord(word,"bigBed") || sameWord(word,"bigGenePred") || sameWord(word,"bigPsl") || sameWord(word,"bigBarChart")|| sameWord(word,"bigLolly"))) +if (word && (sameWord(word,"bed") || startsWith("big", word))) { if (NULL != (word = nextWord(&type))) start = sqlUnsigned(word); else // custom beds and bigBeds may not have full type "begBed 9 +" start = max(0,slCount(as->columnList) - fieldCount); } return start; } struct slPair *getExtraFields(struct trackDb *tdb, char **fields, int fieldCount) /* return the extra field names and their values as a list of slPairs. */ { struct asObject *as = asForDb(tdb, database); if (as == NULL) return NULL; @@ -4277,30 +4277,34 @@ } else if (sameString(type, "altGraphX")) { doAltGraphXDetails(tdb,item); } //add bedDetail here else if (startsWith("bedDetail", type)) { doBedDetail(tdb, NULL, item); } else if (sameString(type, "bigLolly") ) { int num = 12; genericBigBedClick(conn, tdb, item, start, end, num); } + else if (sameString(type, "bigDbSnp") ) + { + doBigDbSnp(tdb, item); + } else if (sameString(type, "interaction") ) { int num = 12; genericBedClick(conn, tdb, item, start, num); } else if (startsWith("gvf", type)) { doGvf(tdb, item); } else if (sameString(type, "bam")) doBamDetails(tdb, item); else if ( startsWith("longTabix", type)) doLongTabix(tdb, item); else if (sameWord("interact", type) || sameWord("bigInteract", type)) doInteractDetails(tdb, item); @@ -21331,30 +21335,32 @@ doExpRatio(ct->tdb, fileItem, ct); else if ( startsWith( "longTabix", type)) doLongTabix(ct->tdb, item); else if (sameWord(type, "encodePeak")) doEncodePeak(ct->tdb, ct, fileName); else if (sameWord(type, "bigNarrowPeak")) doBigEncodePeak(ct->tdb, NULL, item); else if (sameWord(type, "bigWig")) bigWigCustomClick(ct->tdb); else if (sameWord(type, "bigChain")) genericChainClick(NULL, ct->tdb, item, start, "seq"); else if (sameWord(type, "bigPsl")) genericBigPslClick(NULL, ct->tdb, item, start, end); else if (sameWord(type, "bigMaf")) genericMafClick(NULL, ct->tdb, item, start); +else if (sameWord(type, "bigDbSnp")) + doBigDbSnp(ct->tdb, item); else if (sameWord(type, "bigBed") || sameWord(type, "bigGenePred")) bigBedCustomClick(ct->tdb); 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")) doBamDetails(ct->tdb, itemName); else if (sameWord(type, "vcfTabix")) 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 (ct->wiggle)