699bed02317b5aa434c08fd446099623c4f7f54a braney Thu May 5 14:51:21 2016 -0700 working on bigMaf doc diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 6efff4b..772fa1e 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -7041,30 +7041,40 @@ } void htcBigPslAli(char *acc) /* Show alignment for accession in bigPsl file. */ { struct psl *psl; char *aliTable; int start; unsigned int cdsStart = 0, cdsEnd = 0; /* Print start of HTML. */ writeFramesetType(); puts("<HTML>"); aliTable = cartString(cart, "aliTable"); +if (isCustomTrack(aliTable)) + { + struct customTrack *ctList = getCtList(); + struct customTrack *ct = NULL; + for (ct = ctList; ct != NULL; ct = ct->next) + if (sameString(aliTable, ct->tdb->track)) + break; + tdb = ct->tdb; + } +else tdb = hashFindVal(trackHash, aliTable); printf("<HEAD>\n<TITLE>%s vs Genomic [%s]</TITLE>\n</HEAD>\n\n", acc, aliTable); /* Get some environment vars. */ start = cartInt(cart, "l"); int end = cartInt(cart, "r"); char *chrom = cartString(cart, "c"); char *seq, *cdsString = NULL; struct lm *lm = lmInit(0); char *fileName = bbiNameFromSettingOrTable(tdb, NULL, tdb->table); struct bbiFile *bbi = bigBedFileOpen(fileName); struct bigBedInterval *bb, *bbList = bigBedIntervalQuery(bbi, chrom, start, end, 0, lm); char *bedRow[32]; char startBuf[16], endBuf[16]; @@ -20705,47 +20715,51 @@ footPrinterSampleClick(conn, tdb, item, start, num); } printTrackHtml(tdb); freez(&dupe); hFreeConn(&conn); } void hgCustom(char *trackId, char *fileItem) /* Process click on custom track. */ { char *fileName, *itemName; struct customTrack *ctList = getCtList(); struct customTrack *ct; struct bed *bed = (struct bed *)NULL; int start = cartInt(cart, "o"); +int end = cartInt(cart, "t"); +char *item = cartString(cart, "i"); char *type; fileName = nextWord(&fileItem); for (ct = ctList; ct != NULL; ct = ct->next) if (sameString(trackId, ct->tdb->track)) break; if (ct == NULL) errAbort("Couldn't find '%s' in '%s'", trackId, fileName); type = ct->tdb->type; cartWebStart(cart, database, "Custom Track: %s", ct->tdb->shortLabel); itemName = skipLeadingSpaces(fileItem); printf("<H2>%s</H2>\n", ct->tdb->longLabel); if (sameWord(type, "array")) doExpRatio(ct->tdb, fileItem, ct); else if (sameWord(type, "encodePeak")) doEncodePeak(ct->tdb, ct, fileName); else if (sameWord(type, "bigWig")) bigWigCustomClick(ct->tdb); +else if (sameWord(type, "bigPsl")) + genericBigPslClick(NULL, ct->tdb, item, start, end); else if (sameWord(type, "bigBed") || sameWord(type, "bigGenePred")) bigBedCustomClick(ct->tdb); #ifdef USE_BAM else if (sameWord(type, "bam")) doBamDetails(ct->tdb, itemName); #endif//def USE_BAM #ifdef USE_TABIX else if (sameWord(type, "vcfTabix")) doVcfTabixDetails(ct->tdb, itemName); #endif//def USE_TABIX 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)